How to configure version of libc compiled against on Linux?
sebkur opened this issue · 2 comments
I'm building java-cef using a fork of https://github.com/jcefmaven/jcefbuild/ in order to work around a problem where
libjcef.so
seems to be linked against a too new version of glibc.
I'm trying to run java-cef on a system using Mint 20.3 (which is based on Ubuntu 20.04 LTS) where libc6
seems to be stuck on version 2.31 whereas the builds created seem to rely on 2.32. An obvious solution would be to upgrade my system to Mint 21.2 (which is based on Ubuntu 22.04 LTS). However, when I want to build an application using jcefmaven, I'll only be able to support Ubuntu 22.04 upwards and its derivatives. That's a pity as Ubuntu 20.04 and Mint 20.3 are LTS releases and will still get standard support until mid 2025 (and even extended support until 2030), so dismissing all users on those seems a bit harsh.
Thats's why I'm trying to find a way to build java-cef and specify the version of libc. Is that possible?
For the record, here's a stacktrace of an application that I try to run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/user/github/sebkur/test-jcef/jcef-bundle/libjcef.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/user/github/sebkur/test-jcef/jcef-bundle/li
bjcef.so)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at me.friwi.jcefmaven.impl.step.init.CefInitializer.initialize(CefInitializer.java:57)
at me.friwi.jcefmaven.CefAppBuilder.build(CefAppBuilder.java:308)
at de.topobyte.jcef.TestJcef.<init>(TestJcef.java:110)
at de.topobyte.jcef.TestJcef.main(TestJcef.java:251)
Related to jcefmaven/jcefmaven#87
The required version depends on the build system. You will need to build JCEF on a system (or VM, chroot, docker container) with the older GLIBC installed.
thanks!