Summary: | dev-ruby/psych-5.0.1: undefined method `_native_parse' when remerging | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ethan Steinbrecher <egstein> |
Component: | Current packages | Assignee: | Gentoo Ruby Team <ruby> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | gentoo, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=835405 https://bugs.gentoo.org/show_bug.cgi?id=903891 https://bugs.gentoo.org/show_bug.cgi?id=891367 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Build log |
Description
Ethan Steinbrecher
2022-12-19 15:30:17 UTC
Can confirm this also happens to me with ruby31. Also breaks compilation of (at least): dev-ruby/bundler-2.4.1 dev-ruby/did_you_mean-1.6.3 net-libs/webkit-gtk-2.38.3-r500 net-libs/webkit-gtk-2.38.3 Downgrading to 4.0.6 seems to fix this issue as a workaround. Maybe flag =dev-ruby/psych-5.0.1? Huh, is it using the system version of psych and mixing it at install-time? (In reply to Sam James from comment #4) > Huh, is it using the system version of psych and mixing it at install-time? It seems so. I also had issues downgrading it with it throwing that error. I uninstalled it completely, and installed 4.0.6, and nothing gives me that error anymore. I can't seem to reproduce this so we'll need to figure out what additional conditions are needed to reproduce it. Someone hit this on the forums too at https://forums.gentoo.org/viewtopic-t-1162395.html. I think it's definitely related to bug 835405. I have met a similar incident, with; =dev-lang/ruby-3.1.3 =dev-lang/ruby-3.2.1 =dev-ruby/psych-5.1.0 =dev-ruby/bundler-2.4.6 I found a workaround (but unknown reason) as follows; 1. make.conf : RUBY_TARGETS="ruby32" (only, without any other version) USE=-doc 2. and successfully emerged dev-lang/ruby-3.2.1 dev-ruby/bundler-2.4.6 dev-ruby/date-3.3.3 dev-ruby/debug-1.7.1 dev-ruby/did_you_mean-1.6.3 dev-ruby/forwardable-1.3.3 dev-ruby/json-2.6.3 dev-ruby/kpeg-1.3.3 dev-ruby/matrix-0.4.2 dev-ruby/minitest-5.18.0 dev-ruby/net-ftp-0.2.0 dev-ruby/net-imap-0.3.4 dev-ruby/net-pop-0.1.2 dev-ruby/net-protocol-0.2.1 dev-ruby/net-smtp-0.3.3 dev-ruby/power_assert-2.0.3 dev-ruby/prime-0.1.2-r1 dev-ruby/psych-5.1.0 dev-ruby/racc-1.6.2 dev-ruby/rake-13.0.6-r1 dev-ruby/rbs-3.0.4 dev-ruby/rdoc-6.5.0 dev-ruby/rexml-3.2.5-r1 dev-ruby/rss-0.2.9-r1 dev-ruby/rubygems-3.4.6 dev-ruby/singleton-0.1.1 dev-ruby/stringio-3.0.5 dev-ruby/test-unit-3.5.7 dev-ruby/time-0.2.1 dev-ruby/timeout-0.3.2 dev-ruby/typeprof-0.21.7 virtual/ruby-ssl-13 virtual/rubygems-18 (In reply to Sam James from comment #7) > Someone hit this on the forums too at > https://forums.gentoo.org/viewtopic-t-1162395.html. > > I think it's definitely related to bug 835405. I suspect this was fixed by https://bugs.gentoo.org/835405#c5. I still get this with current ruby 3.1.4-r3, psych-5.1.0. It's not just re-emerging psych that's failing; even just using psych from ruby doesn't work. E.g., this small ruby script fails with the same error message: gem 'psych' require 'psych' Psych.safe_load('--- foo') After doing some digging into what's happening at runtime on my system, it seems the problem is that libruby31.so contains the visible symbol Init_psych_parser. This is part of the built-in psych 4.0.4 in ruby 3.1.4. The init function Init_psych of the extension module for psych-5.1.0 ends up calling the Init_psych_parser from libruby31 instead of the function Init_psych_parser from psych-5.1.0's psych.so. This mixing of symbols for psych 4.0.4 and psych 5.1.0 is clearly unintended and this means specifically the class Psych::Parser isn't initialized properly, which in turn causes this undefined method _native_parse. For comparison I've looked at the ruby:31 docker image. The libruby.so there doesn't have these conflicting symbols. As far as I can tell the difference is due to gentoo configuring ruby with --with-static-linked-ext when the static-libs USE flag is enabled (which it is on my system). Disabling static-libs for dev-lang/ruby works around the problem. (In reply to Willem Jan Palenstijn from comment #10) > I still get this with current ruby 3.1.4-r3, psych-5.1.0. > > [...] Thank you for the analysis! See also bug 891367. |