When attempting to build elinks 0.19.0 with Ruby bindings enabled (against Ruby 3.4.7), we saw the following error:
../src/scripting/ruby/core.c: In function ‘init_erb_module’:
../src/scripting/ruby/core.c:222:58: error: passing argument 3 of ‘rb_define_module_function_01’ from incompatible pointer type [-Wincompatible-pointer-types]
222 | rb_define_module_function(erb_module, "message", (VALUE (*)(ANYARGS))erb_module_message, 1);
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:341:143: note: in definition of macro ‘rb_define_module_function’
341 | #define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
| ^~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:277:21: note: expected ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long unsigned int)’} but argument is of type ‘VALUE (*)(void)’ {aka ‘long unsigned int (*)(void)’}
277 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:259:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’
259 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
| ^~~
../src/scripting/ruby/core.c:223:65: error: passing argument 3 of ‘rb_define_module_function_m1’ from incompatible pointer type [-Wincompatible-pointer-types]
223 | rb_define_module_function(erb_module, "method_missing", (VALUE (*)(ANYARGS))erb_module_method_missing, -1);
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:341:143: note: in definition of macro ‘rb_define_module_function’
341 | #define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
| ^~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:277:21: note: expected ‘VALUE (*)(int, union <anonymous>, VALUE)’ {aka ‘long unsigned int (*)(int, union <anonymous>, long unsigned int)’} but argument is of type ‘VALUE (*)(void)’ {aka ‘long unsigned int (*)(void)’}
277 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:257:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’
257 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \
| ^~~
../src/scripting/ruby/core.c:224:52: error: passing argument 3 of ‘rb_define_module_function_m1’ from incompatible pointer type [-Wincompatible-pointer-types]
224 | rb_define_module_function(erb_module, "p", (VALUE (*)(ANYARGS))erb_stdout_p, -1);
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:341:143: note: in definition of macro ‘rb_define_module_function’
341 | #define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
| ^~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:277:21: note: expected ‘VALUE (*)(int, union <anonymous>, VALUE)’ {aka ‘long unsigned int (*)(int, union <anonymous>, long unsigned int)’} but argument is of type ‘VALUE (*)(void)’ {aka ‘long unsigned int (*)(void)’}
277 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:257:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’
257 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \
| ^~~
../src/scripting/ruby/core.c: In function ‘init_ruby’:
../src/scripting/ruby/core.c:241:56: error: passing argument 3 of ‘rb_define_singleton_method_01’ from incompatible pointer type [-Wincompatible-pointer-types]
241 | rb_define_singleton_method(rb_stdout, "write", (VALUE (*)(ANYARGS))erb_module_message, 1);
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:311:144: note: in definition of macro ‘rb_define_singleton_method’
311 | #define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
| ^~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:274:21: note: expected ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long unsigned int)’} but argument is of type ‘VALUE (*)(void)’ {aka ‘long unsigned int (*)(void)’}
274 | RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:259:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’
259 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
| ^~~
../src/scripting/ruby/core.c:242:40: error: passing argument 2 of ‘rb_define_global_function_m1’ from incompatible pointer type [-Wincompatible-pointer-types]
242 | rb_define_global_function("p", (VALUE (*)(ANYARGS))erb_stdout_p, -1);
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:350:136: note: in definition of macro ‘rb_define_global_function’
350 | #define rb_define_global_function(mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
| ^~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:278:21: note: expected ‘VALUE (*)(int, union <anonymous>, VALUE)’ {aka ‘long unsigned int (*)(int, union <anonymous>, long unsigned int)’} but argument is of type ‘VALUE (*)(void)’ {aka ‘long unsigned int (*)(void)’}
278 | RBIMPL_ANYARGS_DECL(rb_define_global_function, const char *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:257:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’
257 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \
| ^~~
When attempting to build elinks 0.19.0 with Ruby bindings enabled (against Ruby 3.4.7), we saw the following error:
An additional patch was needed to for Meson to detect Ruby correctly: