Closed tadman closed 3 years ago
Inexplicably this compiles just fine with Ruby 2.5.0, so that's a possible solution for anyone facing this problem.
@tadman Could you show me mkmf.log?
I'll have to set up a build environment to reproduce this, but Ruby < 2.5 seemed to have this issue consistently.
Ruby 2.4 is EOL, so I close this issue.
I'm having the same issue
irb(main):002:0> convertible_int('chtype', [["#undef MOUSE_MOVED\n"]]+curses)
checking for convertible type of chtype... failed
ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
And in mkmf.log
:
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/dorianmariefr/.asdf/installs/ruby/3.1.2/lib "clang -I/Users/dorianmariefr/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/arm64-darwin21 -I/Users/dorianmariefr/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/ruby/backward -I/Users/dorianmariefr/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0 -I. -I/Users/dorianmariefr/.asdf/installs/ruby/3.1.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe -Werror -c conftest.c"
error: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option]
checked program was:
/* begin */
1: #include "ruby.h"
2:·
3: #undef MOUSE_MOVED
4:·
5: #include <ncurses.h>
6:·
7: typedef chtype rbcv_typedef_;
8:·
9: extern rbcv_typedef_ foo();
10: extern unsigned long long foo();
/* end */
--------------------
When installing
curses
theextconf.rb
configuration crashes out onchecking for convertible type of chtype
:This is with RVM-built Ruby 2.4.1 on both Fedora 28 (ncurses 6.1) and Fedora 26 (ncurses 6.0) where the 6.1 version fails on the
chtype
check, but the 6.0 version is fine (unsigned int
).This pertains to the line in
extconf.rb
:Strangely the definition for
chtype
hasn't changed:It's not clear why
convertible_int
can't detect the type.