• Java issue with a proprietary game

    From =?iso-8859-1?Q?Ho=EBl_B=E9zier?=@21:1/5 to gentoo-dev on Mon Jan 30 08:43:55 2023
    Hi,

    Recently I’ve run into an issue with a proprietary java game called The Count
    Lucanor. It is distributed on GOG.com with a bundled Java 8 binary. Since bundled libraries are evil™, I’ve tried getting rid of it in favor of my system
    java binary.

    If the latter is Java 8, everything works as expected. However, using Java 17 the game crashes on start with the following error:

    Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

    This happened with dev-java/openjdk:17 but to my surprise didn’t with dev-java/openjdk-bin:17. I figured Eclipse Temurin had to build OpenJDK with different flags than I did, which fixed the issue.

    After running a bunch of tests, I managed to build a working java binary by removing -Wl,--as-needed from my LDFLAGS (or adding -Wl,--no-as-needed). This flag is set by my profile — default/linux/amd64/17.1 — so I expect mostly
    everyone to have it.

    Should I propose a patch to dev-java/openjdk:17 in order to filter out -Wl,--as-needed? I have no idea what this flag is for nor if removing it might result in other issues, which is why I’m asking on this mailing-list before doing so. Moreover, that would be in order to fix an issue with a proprietary game, and I don’t know what is Gentoo policy regarding that kind of bug.

    If I am to propose a patch, should I do so using filter-flag from flag-o-matic.eclass, or no-as-needed which is provided by the same eclass and is a no-op on clang? (My C compiler is gcc and I haven’t tested building OpenJDK17 with clang.)

    If I should propose a patch, should I first open a bug in gentoo bugtracker so that it may be referenced in the ebuild?

    Thanks
    Hoël

    PS: Using dev-java/openjdk:11 to run the game also fails, but with a different error which I did not try to fix. So this discussion is only about dev-java/openjdk:17.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEElZjiR4iQkYjVEGdt6jPCPrF3Nk0FAmPXdTsACgkQ6jPCPrF3 Nk2h8BAAze7xhtdg0Qd75wS8HvPoVdy+rJ9Omc1DiUhWvzJeixBduMjtetO0Kfb3 ANicRbUH1WfBzul6FGvyZblle8vjmHhU7144X/PkroVrQg56XssH6p0SsOFm8You 5C+0YfjIFXyESHrQneglY5SMy8nFC+UFXYENqk49c8TJAeU3r0lFwoLTrZjFvIEf 5GsZYlay3T4aAZE+j+k+tn/ON2JGOAj+PkiiwgY9IscQbuAsQ/Iw6fEzKxOudM8/ aRHaYzGCLqt4ZZDUDtDVSSljcwH8cTJRGQ166zK3TrQQXyFZ0tkJ0Qfp9IAM/muY AR5/6PnIMHX4odZ8rbEK4s3O2v/Lk1uN5wssT4fyGTk04EdcSdtj3sdgfUjX317I N+HYbH+Sj6gjKNv3BO2tkxL10hBsSz1brxRpLw67r7W1Zeyix5XlHqYkqjPznumC Se6biVpqwUySCzVRNbHyN9d1+GCQgjxMhpIjL/YZFZYtvgzE2+POuGTfyAssEUE5 /iRzKWjyaubr7vca6gFoR+S+y/+ciGWyAZjBb1cPOa2gd3ux6kNF4VZX0INiigYd wwfx+g674TLVi86C+FH0cyn0Hh1TUAr5QPGBrrwDmeSb9ZBRKSxMpitaYsQalrpl AGzlo9NtOKmMLg+dJEWo7MAYbZtcMRGmBbYSCt6/bGtLEVvFwPc=
    =CkQK
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Helmert III@21:1/5 to All on Mon Feb 6 11:30:02 2023
    On Mon, Jan 30, 2023 at 08:43:55AM +0100, Hoël Bézier wrote:
    Hi,

    Recently I’ve run into an issue with a proprietary java game called The Count
    Lucanor. It is distributed on GOG.com with a bundled Java 8 binary. Since bundled libraries are evil™, I’ve tried getting rid of it in favor of my system
    java binary.

    If the latter is Java 8, everything works as expected. However, using Java 17
    the game crashes on start with the following error:

    Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

    This happened with dev-java/openjdk:17 but to my surprise didn’t with dev-java/openjdk-bin:17. I figured Eclipse Temurin had to build OpenJDK with different flags than I did, which fixed the issue.

    After running a bunch of tests, I managed to build a working java binary by removing -Wl,--as-needed from my LDFLAGS (or adding -Wl,--no-as-needed). This
    flag is set by my profile — default/linux/amd64/17.1 — so I expect mostly
    everyone to have it.

    Should I propose a patch to dev-java/openjdk:17 in order to filter out -Wl,--as-needed? I have no idea what this flag is for nor if removing it might
    result in other issues, which is why I’m asking on this mailing-list before
    doing so. Moreover, that would be in order to fix an issue with a proprietary
    game, and I don’t know what is Gentoo policy regarding that kind of bug.

    If I am to propose a patch, should I do so using filter-flag from flag-o-matic.eclass, or no-as-needed which is provided by the same eclass and
    is a no-op on clang? (My C compiler is gcc and I haven’t tested building OpenJDK17 with clang.)

    If I should propose a patch, should I first open a bug in gentoo bugtracker so
    that it may be referenced in the ebuild?

    Thanks
    Hoël

    PS: Using dev-java/openjdk:11 to run the game also fails, but with a different
    error which I did not try to fix. So this discussion is only about dev-java/openjdk:17.

    Seems reasonable to open a bug, at least for posterity.

    -----BEGIN PGP SIGNATURE-----

    iHUEABYKAB0WIQQyG9yfCrmO0LPSdG2gXq2+aa/JtQUCY+DV7AAKCRCgXq2+aa/J tRtRAP4kCL0ABxgWyoXFApEiXeIJekmzRSTu8UththuciBQT1QEA5BBuZtJLv+0v sA9yYiWdEIPlTAiBWrohjbW5CUfsoAk=
    =wOeL
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)