Hi, several proprietary java games fail to run with dev-java/openjdk:17 with the following error: Inconsistency detected by ld.so: dl-lookup.c: 107: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed! A list of such games can be found here: - https://forge.dotslashplay.it/play.it/games/-/issues/880 The fix proposed on this link is to build OpenJDK17 without the --as-needed ld flag or equivalently with the --no-as-needed flag. I have tested this locally and can confirm that it fixes the issue. On Gentoo the --as-needed flag is set by the default/linux profile, so I expect every Gentoo user to be affected. dev-java/openjdk-bin:17 is not affected by this issue as Eclipse Temurin already build OpenJDK without the --as-needed flag. Thanks
Can you provide full error output with LD_DEBUG=all ? export LD_DEBUG=all Run your game from same shell. This error comes from glibc/stdc++ and not from jdk it seems. Not sure if passing -no-as-needed for source build is a good idea. Temurin is built differently and they can do it, source version can have problems with it. Like being broken by dependency updates and being unable to rebuild itself.
Created attachment 852718 [details] game console output with LD_DEBUG=all Arf, this seems like the kind of bug that does not happen when someone is looking too much at it. >< So, I’ve run the game after adding LD_DEBUG=all to its environment, and… it doesn’t crash. It doesn’t run either, it just hangs forever (I’ve let it hang for three hours, then I SIGINTed it). I’m attaching the debug output, until the point where it hangs (there’s more output when I SIGINT it, but I guess it’s irrelevant). It’s compressed with bzip2 as the original text file is more than 24MB.
thanks for upload. I'll check it but it's probably does not contain what I want, because bug is not reproduced with debug active... I found a small reproducer on ubuntu bugtracker, will try to poke it. but both debian and ubuntu refused to build with --no-as-needed for valid reasons. it may be gcc/glibc/binutils bug after all, not jdk. need more investigation. something fails looking up symbol of one of prebuilt libraries that are shipped with the game. meanwhile please use -bin for those games. did you know you can set java used per application? you can still have openjdk set system-wide and have openjdk-bin installed. GENTOO_VM=openjdk-bin-17 java -jar blablabla.jar it will run it with -bin. you can edit .desktop file for that game too Exec=env GENTOO_VM=openjdk-bin-17 .... as long as game calls /usr/bin/java (it's a shell script) - it will use GENTOO_VM jdk. list of jdks to use for GENTOO_VM ls -1 /usr/lib/jvm/
Debian fixed the issue by linking with --no-as-needed[0]. One of Debian developpers also gave a pretty complete explanation of the reasons behind this assertion failure[1]. Hope this helps you in finding a solution to this issue. [0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031521#34 [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031521#29