1 |
Hi, |
2 |
|
3 |
Recently I’ve run into an issue with a proprietary java game called The Count |
4 |
Lucanor. It is distributed on GOG.com with a bundled Java 8 binary. Since |
5 |
bundled libraries are evil™, I’ve tried getting rid of it in favor of my system |
6 |
java binary. |
7 |
|
8 |
If the latter is Java 8, everything works as expected. However, using Java 17 |
9 |
the game crashes on start with the following error: |
10 |
|
11 |
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed! |
12 |
|
13 |
This happened with dev-java/openjdk:17 but to my surprise didn’t with |
14 |
dev-java/openjdk-bin:17. I figured Eclipse Temurin had to build OpenJDK with |
15 |
different flags than I did, which fixed the issue. |
16 |
|
17 |
After running a bunch of tests, I managed to build a working java binary by |
18 |
removing -Wl,--as-needed from my LDFLAGS (or adding -Wl,--no-as-needed). This |
19 |
flag is set by my profile — default/linux/amd64/17.1 — so I expect mostly |
20 |
everyone to have it. |
21 |
|
22 |
Should I propose a patch to dev-java/openjdk:17 in order to filter out |
23 |
-Wl,--as-needed? I have no idea what this flag is for nor if removing it might |
24 |
result in other issues, which is why I’m asking on this mailing-list before |
25 |
doing so. Moreover, that would be in order to fix an issue with a proprietary |
26 |
game, and I don’t know what is Gentoo policy regarding that kind of bug. |
27 |
|
28 |
If I am to propose a patch, should I do so using filter-flag from |
29 |
flag-o-matic.eclass, or no-as-needed which is provided by the same eclass and |
30 |
is a no-op on clang? (My C compiler is gcc and I haven’t tested building |
31 |
OpenJDK17 with clang.) |
32 |
|
33 |
If I should propose a patch, should I first open a bug in gentoo bugtracker so |
34 |
that it may be referenced in the ebuild? |
35 |
|
36 |
Thanks |
37 |
Hoël |
38 |
|
39 |
PS: Using dev-java/openjdk:11 to run the game also fails, but with a different |
40 |
error which I did not try to fix. So this discussion is only about |
41 |
dev-java/openjdk:17. |