Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: 8.2.9004 linux artifact depend on GLIBC 2.33 #2520

Closed
Mizux opened this issue Apr 21, 2021 · 3 comments
Closed

Java: 8.2.9004 linux artifact depend on GLIBC 2.33 #2520

Mizux opened this issue Apr 21, 2021 · 3 comments
Assignees
Labels
Bug Feature Request Missing Feature/Wrapper Lang: Java Java wrapper issue OS: Linux GNU/Linux OS
Milestone

Comments

@Mizux
Copy link
Collaborator

Mizux commented Apr 21, 2021

Summary

Need to generate a new 8.2 release but this time having the linux artifact built in an ubuntu:18.04 docker container so the linux artifact will depends on GLIBC 2.27 instead of 2.33

HowTo check

  1. Download the jar https://search.maven.org/artifact/com.google.ortools/ortools-linux-x86-64/8.2.9004/jar
  2. Extract the jar using unzip
    $ unzip  ortools-linux-x86-64-8.2.9004.jar 
    Archive:  ortools-linux-x86-64-8.2.9004.jar
    creating: META-INF/
    inflating: META-INF/MANIFEST.MF    
    creating: linux-x86-64/
    inflating: linux-x86-64/libjniortools.so  
    inflating: linux-x86-64/libortools.so  
    creating: META-INF/maven/
    creating: META-INF/maven/com.google.ortools/
    creating: META-INF/maven/com.google.ortools/ortools-linux-x86-64/
    inflating: META-INF/maven/com.google.ortools/ortools-linux-x86-64/pom.xml  
    inflating: META-INF/maven/com.google.ortools/ortools-linux-x86-64/pom.properties
  3. inspect the lib:
$ objdump -p linux-x86-64/libortools.so
  required from libc.so.6:
  ...
  0x069691b3 0x00 11 GLIBC_2.33

Annexes

My investigations

Ubuntu 18.04 LTS

$ docker run --rm -it ubuntu:18.04
# apt update -y
# apt install -y binutils
# find /lib /lib64 -type f -iname "libc-*.so" | xargs objdump -p
...
29 0x00 0x0963cf85 GLIBC_PRIVATE
	GLIBC_2.27 

Ubuntu 16.04 LTS

$ docker run --rm -it ubuntu:16.04
# apt update -y
# apt install -y binutils
# find /lib /lib64 -type f -iname "libc-*.so" | xargs objdump -p
...
25 0x00 0x0963cf85 GLIBC_PRIVATE
	GLIBC_2.23 

Centos-8

$ docker run --rm -it centos:8
# objdump -p p /lib64/libc-2.28.so
...
30 0x00 0x0963cf85 GLIBC_PRIVATE
	GLIBC_2.28
@Mizux Mizux added Bug Feature Request Missing Feature/Wrapper OS: Linux GNU/Linux OS Lang: Java Java wrapper issue labels Apr 21, 2021
@Mizux Mizux added this to the v9.0 milestone Apr 21, 2021
@Mizux Mizux self-assigned this Apr 21, 2021
@Mizux Mizux mentioned this issue Apr 22, 2021
18 tasks
@Mizux
Copy link
Collaborator Author

Mizux commented Apr 22, 2021

As spotted by the community we also must take care of the libstdc++ used
And unfortunately Ubuntu ppa toolchain-r pull 3.4.28 -_-

distro GCC GLIBC GLIBCXX
Ubuntu 16.04 LTS 5.4.0 2.23 3.4.21
Ubuntu 16.04 LTS + gcc-7 7.5.0 2.23 3.4.28
Ubuntu 16.04 LTS + gcc-9 9.3.0 2.23 3.4.28
Ubuntu 18.04 LTS 7.5.0 2.27 3.4.25
Centos 7 4.8.5 2.17 3.4.19
Centos 7 + gcc-9 9.3.1 2.17 3.4.19
Centos 8 8.3.1 2.28 3.4.25
Debian 9 6.3.0 2.24 3.4.22
Debian 10 8.3.0 2.28 3.4.25

note: ubuntu-toolchain-r seems to pull libstdc++ 3.4.28 meaning the library built won't work on any fresh Ubuntu 18.04 LTS/Centos 9/Debian 10/ -_-

note:

gcc --version
find / -type f -iname "libstdc++*.so*"
find / -type f -iname "libc*.so*"
objdump -p libXXX.so

or inside a container

find / -type f -iname "libstdc++*.so*" -exec bash -c "echo {}: ; objdump -p {} | grep --color GLIBCXX_3.4.2" \;

Trace: Ubuntu 18.04 gcc-11

root@65c8f599d89d:/# find / -type f -iname "libstdc++*.so*" -exec bash -c "echo {}: ; objdump -p {} | grep --color GLIBCXX_3.4.2" \;
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29:
4 0x00 0x02297f82 GLIBCXX_3.4.2
	GLIBCXX_3.4.2 
22 0x00 0x0297f870 GLIBCXX_3.4.20
23 0x00 0x0297f871 GLIBCXX_3.4.21
	GLIBCXX_3.4.20 
24 0x00 0x0297f872 GLIBCXX_3.4.22
	GLIBCXX_3.4.21 
25 0x00 0x0297f873 GLIBCXX_3.4.23
	GLIBCXX_3.4.22 
26 0x00 0x0297f874 GLIBCXX_3.4.24
	GLIBCXX_3.4.23 
27 0x00 0x0297f875 GLIBCXX_3.4.25
	GLIBCXX_3.4.24 
28 0x00 0x0297f876 GLIBCXX_3.4.26
	GLIBCXX_3.4.25 
29 0x00 0x0297f877 GLIBCXX_3.4.27
	GLIBCXX_3.4.26 
30 0x00 0x0297f878 GLIBCXX_3.4.28
	GLIBCXX_3.4.27 
31 0x00 0x0297f879 GLIBCXX_3.4.29
	GLIBCXX_3.4.28 

@Mizux
Copy link
Collaborator Author

Mizux commented Apr 23, 2021

So a good candidate could be a Centos-7 based docker image...

@Mizux
Copy link
Collaborator Author

Mizux commented Apr 27, 2021

First test with 8.2.9025 (which has been built using a fresh Centos-7 seems ok)
Working example against an Ubuntu 16.04 LTS https://github.com/or-tools/java_or-tools/actions/runs/786806066

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Feature Request Missing Feature/Wrapper Lang: Java Java wrapper issue OS: Linux GNU/Linux OS
Projects
None yet
Development

No branches or pull requests

1 participant