net-libs/webkit-gtk doesn't respect my RUBY_TARGETS setting. I had to manually hack "ruby30" out of the USE_RUBY variable in the ebuild to avoid pulling in a whole bunch of ruby30 dependencies. Not sure what exactly is causing them to be pulled in, probably the ${RUBY_DEPS} variable in BDEPEND from "inherit ruby-single"?
I'm pretty sure this is more of a generalized ruby issue than webkit-gtk, which seems to happen with packages using ruby-single (more apparent for ~testing users). e.g. # RUBY_TARGETS=ruby26 emerge -1 ocl-icd The following USE changes are necessary to proceed: [...] >=dev-ruby/minitest-5.14.3 ruby_targets_ruby27 If I mask >=dev-lang/ruby-2.7, the same command works without complaining and it uses ruby26, this makes the issue less apparent in stable given >=2.7 aren't marked stable. ruby27 happens to be the highest supported version for ocl-icd, and webkit-gtk is ruby30 so it asks for that one instead (same issue)
It's that we only need it at buildtime, and there's no ruby-any.eclass or some such to take care of it well. At one point portage was changed to strongly insist on the newest SLOT upgrade when all are allowed for some unrelated improvements, which made this worse for webkit-gtk, as it now forces the newest, even though any is fine at build-time only. I'm pretty sure there's an existing bug report on all this, but can't find it for some reason right now.
[1264/6188] /var/tmp/portage/net-libs/webkit-gtk-2.40.0-r410/work/webkitgtk-2.40.0/Source/JavaScriptCore/Scripts/postprocess-asm /usr/lib/ccache/bin/powerpc64le-unknown-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\> FAILED: Source/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.o /var/tmp/portage/net-libs/webkit-gtk-2.40.0-r410/work/webkitgtk-2.40.0/Source/JavaScriptCore/Scripts/postprocess-asm /usr/lib/ccache/bin/powerpc64le-unknown-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PRO> /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `require': cannot load such file -- rubygems/compatibility (LoadError) from /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `<top (required)>' from <internal:gem_prelude>:1:in `require' from <internal:gem_prelude>:1:in `<internal:gem_prelude>' ninja: build stopped: subcommand failed. * ERROR: net-libs/webkit-gtk-2.40.0-r410::gentoo failed (compile phase): * ninja -v -j32 -l0 failed I hade to eselect set ruby30 in order to get it working.
Same problem here with same message. Update available from net-libs/webkit-gtk-2.38.3-r410 to net-libs/webkit-gtk-2.38.5-r500 Ruby 2.7 selected gentoo ~ # eselect ruby list Available Ruby profiles: [1] ruby27 * [2] ruby30 (with Rubygems)
Can someone attach a full, compressed build.log of a failure with webkit-gtk? I'm wondering why the logic in the webkit-gtk ebuild isn't enough, even if it's not ideal. I have one idea where it might happen if ruby is being upgraded to a new slot in the same run as webkit-gtk, but that would be fairly niche I think.
Created attachment 859498 [details] emerge --info, eselect ruby, and webkit-gtk-2.38.5-r500 build log Here is a full webkit-gtk build log (It is not from me, it is from a IRC User - but, hope it helps)
(In reply to josef.95 from comment #6) > Created attachment 859498 [details] > emerge --info, eselect ruby, and webkit-gtk-2.38.5-r500 build log > > Here is a full webkit-gtk build log > (It is not from me, it is from a IRC User - but, hope it helps) Thanks, this is enormously helpful. The issue is: ``` FAILED: mSource/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.o /var/tmp/portage/net-libs/webkit-gtk-2.38.5-r500/work/webkitgtk-2.38.5/Source/JavaScriptCore/Scripts/postprocess-asm /usr/bin/x86_64-pc-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WebKit2GTK-5.0\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DPAS_BMALLOC=1 -DWEBKITGTK_API_VERSION_STRING=\"5.0\" -DPOSTPROCESS_ASM=llint/LowLevelInterpreter.cpp [...] ``` i.e. the postprocess-asm rule isn't invoked with ${RUBY_EXECUTABLE} (other stuff *is*) and postprocess-asm has a /usr/bin/env ruby shebang which it relies on instead: https://github.com/WebKit/WebKit/blob/8cd4575f261f6bfe2cce69c79812398b35988d50/Source/JavaScriptCore/Scripts/postprocess-asm. Short-term hack is to just sed the top line in the ebuild to ${RUBY} (or type -P ${RUBY}, w/e). Proper fix is to make upstream's CMake invoke it with ${RUBY_EXECUTABLE} like they do for other stuff.
Same problem and msg as Adrien D. then if I reset back to ruby 27 after compiling webkit-gtk: eselect ruby set 1 !!! Warning: Could not set gem symlink It appears you do not have RubyGems installed for this profile. If you need RubyGems, emerge dev-ruby/rubygems with the appropriate RUBY_TARGETS setting.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04ef8c2740346a58ae800cd9ba1dc189277d562c commit 04ef8c2740346a58ae800cd9ba1dc189277d562c Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-05 23:20:25 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-05 23:20:25 +0000 net-libs/webkit-gtk: respect RUBY_EXECUTABLE for whole build Closes: https://bugs.gentoo.org/771744 Signed-off-by: Sam James <sam@gentoo.org> .../webkit-gtk/files/2.40.0-respect-RUBY.patch | 30 ++++++++++++++++++++++ net-libs/webkit-gtk/webkit-gtk-2.38.5-r410.ebuild | 1 + net-libs/webkit-gtk/webkit-gtk-2.38.5-r500.ebuild | 1 + net-libs/webkit-gtk/webkit-gtk-2.38.5.ebuild | 1 + net-libs/webkit-gtk/webkit-gtk-2.40.0-r410.ebuild | 1 + net-libs/webkit-gtk/webkit-gtk-2.40.0-r600.ebuild | 1 + net-libs/webkit-gtk/webkit-gtk-2.40.0.ebuild | 1 + 7 files changed, 36 insertions(+)
After patching, webkit-gtk don't build. See the log, must i open a new bug for that ?
(In reply to Adrien D from comment #10) > After patching, webkit-gtk don't build. See the log, must i open a new bug > for that ? Please share the log.
Created attachment 859593 [details] webkit-gtk-2.38.5-r410/temp/build.log
(In reply to Adrien D from comment #12) > Created attachment 859593 [details] > webkit-gtk-2.38.5-r410/temp/build.log Thanks. ---- FAILED: [0mSource/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.o /usr/bin/ruby30 /var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/Scripts/postprocess-asm /usr/bin/x86_64-pc-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WebKit2GTK-4.1\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DPAS_BMALLOC=1 -DWEBKITGTK_API_VERSION_STRING=\"4.1\" -DPOSTPROCESS_ASM=llint/LowLevelInterpreter.cpp -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCore/Headers -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/API -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/assembler -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/b3 -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/b3/air -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/bindings -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/builtins -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/bytecode -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/bytecompiler -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/dfg -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/disassembler -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/disassembler/ARM64 -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/disassembler/zydis/Zydis -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/domjit -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/ftl -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/heap -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/debugger -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/inspector -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/inspector/agents -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/inspector/augmentable -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/inspector/remote -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/interpreter -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/jit -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/llint -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/parser -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/profiler -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/runtime -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/tools -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/wasm -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/wasm/js -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/yarr -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCore/DerivedSources -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCore/DerivedSources/inspector -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCore/DerivedSources/runtime -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCore/DerivedSources/yarr -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/API/glib -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCoreGLib/DerivedSources/jsc -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/JavaScriptCoreGLib/Headers -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/inspector/remote/glib -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/WTF/Headers -I/var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5_build/bmalloc/Headers -DNDEBUG -fdiagnostics-color=always -Wextra -Wall -pipe -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -O2 -pipe -march=native -fno-strict-aliasing -fno-exceptions -fno-rtti -fPIC -fvisibility=hidden -std=c++20 -fno-lto -MD -MT Source/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.o -MF Source/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.o -c /var/tmp/portage/net-libs/webkit-gtk-2.38.5-r410/work/webkitgtk-2.38.5/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `require': cannot load such file -- rubygems/compatibility (LoadError) from /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `<top (required)>' from <internal:gem_prelude>:1:in `require' from <internal:gem_prelude>:1:in `<internal:gem_prelude>' Error running cmd: pid 2418 exit 1 ---- so it invokes it with ruby30 but ruby27 still ends up used! :(
I used eselect to switch to ruby30 I updated world without webkit-gtk I removed orphans packages (so ruby27 removed) I updated world (so only webkit-gtk updated) All is okay. I don't know if manuals actions are needed, but it works. ruby27 is EOL, so my system is now clean, but maybe portage must update some actions ?
(In reply to Adrien D from comment #14) > I used eselect to switch to ruby30 > I updated world without webkit-gtk > I removed orphans packages (so ruby27 removed) > I updated world (so only webkit-gtk updated) > All is okay. > > I don't know if manuals actions are needed, but it works. > ruby27 is EOL, so my system is now clean, but maybe portage must update some > actions ? Yeah, I understand what you mean, but ebuilds should handle this themselves where possible.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9782fba13720c841ffedb919c6c62d153392b23a commit 9782fba13720c841ffedb919c6c62d153392b23a Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-03 23:52:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-08 21:42:29 +0000 ruby-single.eclass: depend on virtual/rubygems[ruby_targets_rubyNN(-)] for each impl Noticed when looking at bug 771744 which seems hard to trigger deliberately - the webkit-gtk ebuild already tries to check the chosen Ruby has rubygems available. Anyway, when looking at that, I noticed it's possible for Portage to queue the following, even if it's not what's happening in this case: - dev-lang/ruby:2.7 is already installed - virtual/rubygems[ruby_targets_ruby27] is already installed (PDEPEND of ruby) and then, in a fresh emerge: - dev-lang/ruby:3.0 is installed - app-misc/foo (with only USE_RUBY="ruby30") using ruby-single.eclass is queued and fails because the installed Ruby isn't fully usable yet, because the eclass only guarantees dev-lang/ruby:3.0 and virtual/rubygems is installed, not necessarily rubygems for that interpreter. - virtual/rubygems[ruby_targets_ruby30] is built (PDEPEND of ruby) This isn't a substitute for a ruby-any.eclass and/or a pkg_setup which helps enforcement, but that's another thing to handle. Followup to d078ec2a151d16b7ed045f1889bb5b97c4b9e6af ("Add virtual/rubygems to dependencies[...]"). Bug: https://bugs.gentoo.org/771744 Signed-off-by: Sam James <sam@gentoo.org> eclass/ruby-single.eclass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0515195fe51c244e1b85ce0a78b9cea3a7a5c2bc commit 0515195fe51c244e1b85ce0a78b9cea3a7a5c2bc Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-09 04:43:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-09 04:43:48 +0000 net-libs/webkit-gtk: handle more RUBY_EXECUTABLE cases postprocess-asm invokes another Ruby script by itself, so let's just fix the shebangs. Closes: https://bugs.gentoo.org/771744 Signed-off-by: Sam James <sam@gentoo.org> net-libs/webkit-gtk/webkit-gtk-2.38.5-r410.ebuild | 9 +++++++-- net-libs/webkit-gtk/webkit-gtk-2.38.5-r500.ebuild | 9 +++++++-- net-libs/webkit-gtk/webkit-gtk-2.38.5.ebuild | 9 +++++++-- net-libs/webkit-gtk/webkit-gtk-2.40.0-r410.ebuild | 9 +++++++-- net-libs/webkit-gtk/webkit-gtk-2.40.0-r600.ebuild | 9 +++++++-- net-libs/webkit-gtk/webkit-gtk-2.40.0.ebuild | 9 +++++++-- 6 files changed, 42 insertions(+), 12 deletions(-)