tk
tk copied to clipboard
tk git head does not compile with ruby4.0.0dev (2025-12-06)
Trying with ruby 4.0.0dev (2025-12-06 master 0346206d3e) +PRISM [x86_64-linux]
https://github.com/ruby/ruby/commit/0346206d3eab2a8e659be0dd52aea6fc7b0ebb06
ruby/tk git head ( https://github.com/ruby/tk/commit/6f35a07ffe3ea507d3f108770724fcf0d2d896f1 ) fails to compile as:
[mockbuild@e1884f31a42d49c49e2b15f6c152e3f2 tkutil]$ make -j2 -k
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DHAVE_RB_OBJ_INSTANCE_EXEC -DHAVE_RB_SYM2STR -DHAVE_RB_ID2STR -DHAVE_RB_ARY_CAT -DHAVE_STRNDUP -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -m64 -o tkutil.o -c tkutil.c
tkutil.c: In function 'tk_eval_cmd':
tkutil.c:177:12: error: implicit declaration of function 'rb_eval_cmd_kw'; did you mean 'tk_eval_cmd'? [-Wimplicit-function-declaration]
177 | return rb_eval_cmd_kw(cmd, rest, 0);
| ^~~~~~~~~~~~~~
| tk_eval_cmd
make: *** [Makefile:252: tkutil.o] Error 1
make: Target 'all' not remade because of errors.
Most likely due to https://github.com/ruby/ruby/pull/15404 change.
Thank you for reporting this. Looks like we need to switch to rb_eval_cmd_call_kw in Ruby 4.
Actually, looks like the new rb_eval_cmd_call_kw is internal. So this will take more work to fix.