win 3.1 CI failure: error: passing argument 3 of 'rb_define_private_method' from incompatible pointer type [-Wincompatible-pointer-types]
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
从 ext/win32/resolv/resolv.c 开始,重点查看第 25 行附近的 get_dns_server_list 声明以及第 60 行附近的注册。重新执行 Windows 扩展的构建,或检查报告的编译器诊断,然后确认 Windows CI 编译能够成功完成,且不出现 incompatible-pointer-type 错误。
由索引模型根据 Issue 内容生成。
描述
This issue is about the Windows extension, which had this failure, in a build in #91 - here's the output
win32 ../../../../ext/win32/resolv/extconf.rb
checking for GetNetworkParams() in -liphlpapi... yes
creating Makefile
make.exe
generating resolv-x64-mingw-ucrt.def
compiling ../../../../ext/win32/resolv/resolv.c
../../../../ext/win32/resolv/resolv.c: In function 'InitVM_resolv':
../../../../ext/win32/resolv/resolv.c:60:60: error: passing argument 3 of 'rb_define_private_method' from incompatible pointer type [-Wincompatible-pointer-types]
60 | rb_define_private_method(singl, "get_dns_server_list", get_dns_server_list, 0);
| ^~~~~~~~~~~~~~~~~~~
| |
| VALUE ()(VALUE) {aka long long unsigned int ()(long long unsigned int)}
In file included from C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby/internal/anyargs.h:76,
from C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby/ruby.h:26,
from C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby.h:38,
from ../../../../ext/win32/resolv/resolv.c:1:
C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby/internal/intern/class.h:340:69: note: expected 'VALUE ()(void)' {aka 'long long unsigned int ()(void)'} but argument is of type 'VALUE ()(VALUE)' {aka 'long long unsigned int ()(long long unsigned int)'}
340 | void rb_define_private_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
| ~~~~~~~~^~~~~~~~~~~~~~
../../../../ext/win32/resolv/resolv.c:25:1: note: 'get_dns_server_list' declared here
25 | get_dns_server_list(VALUE self)
| ^~~~~~~~~~~~~~~~~~~
make: *** [Makefile:254: resolv.o] Error 1
rake aborted!
Command failed with status (2): [make.exe]
D:/a/resolv/resolv/vendor/bundle/ruby/3.1.0/bundler/gems/ruby-core-tasks-81412ef540dc/lib/ruby-core/make.rb:20:in []' D:/a/resolv/resolv/vendor/bundle/ruby/3.1.0/bundler/gems/ruby-core-tasks-81412ef540dc/lib/ruby-core/extensiontask.rb:54:in block in define_extconf_task'
D:/a/resolv/resolv/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => test => compile => .build/3.1.7/x64-mingw-ucrt/win32/win32/resolv.so
(See full trace by running task with --trace)
mkdir -p .build/3.1.7/x64-mingw-ucrt/win32
Error: Process completed with exit code 1.
- 主要语言
- Ruby
- 星标
- 56
- 派生
- 46
- 平均合并
- 3 小时 46 分钟
- 30 天内合并 PR
- 8
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/resolv 的其他 Issue
-
getresources returns nothing for types created with Generic.create since 0.7.2可能已有人在做 @stephanmoneybird 于 17 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
ruby/resolv#68 · 3 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
`resolv.conf` on macOS sometimes has interface suffix which breaks `resolve.rb`.可能重新可做 @ioquatix 于 1269 天前认领,目前没有进行中的 PR。 未关闭
ruby/resolv#35 · 13 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
bugsnag
难度 2/5 1-3 小时 新手友好度 62/100
JoeMcB/improvcoaches#827 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
TheOdinProject/curriculum#31465 ·
维护者通常 1 天内回复
-
area: docs eco: ruby good first issue help wanted lane: free-agent roadmap size: XS type: docs
难度 1/5 1 小时以内 新手友好度 66/100
arminazimi/evergreen#465 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 1/5 1 小时以内 新手友好度 72/100
simp/puppetsync#120 ·
维护者通常 2 天内回复