Skip to content

Java: 8.2.9004 linux artifact depend on GLIBC 2.33 #2520

Closed

Description

@Mizux

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

Activity

  1. added this to the v9.0 milestone on Apr 21, 2021
  2. self-assigned this
    on Apr 21, 2021
  3. Mizux commented on Apr 22, 2021

    @Mizux
    CollaboratorAuthor

    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 
    
  4. Mizux commented on Apr 23, 2021

    @Mizux
    CollaboratorAuthor

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

  5. Mizux commented on Apr 27, 2021

    @Mizux
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions