Centos 7 build linked with glibc 2.27 instead of 2.17
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
First of all, thanks for supporting centos 7..
Encountered this error while trying to use the centos toolchain.
-- The C compiler identification is GNU 15.2.0
-- The CXX compiler identification is GNU 15.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/x86_64-centos7-linux-gnu-gcc
-- Check for working C compiler: /home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/x86_64-centos7-linux-gnu-gcc - broken
CMake Error at /home/myhome/cmake/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message):
The C compiler
"/home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/x86_64-centos7-linux-gnu-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /builds/cbuild/CMakeFiles/CMakeScratch/TryCompile-s5dgPf
Run Build Command(s):/bin/gmake -f Makefile cmTC_e95f0/fast && /bin/gmake -f CMakeFiles/cmTC_e95f0.dir/build.make CMakeFiles/cmTC_e95f0.dir/build
gmake[1]: Entering directory `/builds/cbuild/CMakeFiles/CMakeScratch/TryCompile-s5dgPf'
Building C object CMakeFiles/cmTC_e95f0.dir/testCCompiler.c.o
/home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/x86_64-centos7-linux-gnu-gcc -fPIE -std=gnu99 -o CMakeFiles/cmTC_e95f0.dir/testCCompiler.c.o -c /builds/cbuild/CMakeFiles/CMakeScratch/TryCompile-s5dgPf/testCCompiler.c
Linking C executable cmTC_e95f0
/home/myhome/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e95f0.dir/link.txt --verbose=1
/home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/x86_64-centos7-linux-gnu-gcc CMakeFiles/cmTC_e95f0.dir/testCCompiler.c.o -o cmTC_e95f0 -Wl,-rpath,/home/myhome/x-tools/x86_64-centos7-linux-gnu/x86_64-centos7-linux-gnu/lib64
/home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/../lib/gcc/x86_64-centos7-linux-gnu/15.2.0/../../../../x86_64-centos7-linux-gnu/bin/ld: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /home/myhome/x-tools/x86_64-centos7-linux-gnu/bin/../lib/gcc/x86_64-centos7-linux-gnu/15.2.0/../../../../x86_64-centos7-linux-gnu/bin/ld)
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_e95f0] Error 1
gmake[1]: Leaving directory `/builds/cbuild/CMakeFiles/CMakeScratch/TryCompile-s5dgPf'
gmake: *** [cmTC_e95f0/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:96 (project)
The issue apparantly is with ld build with glibc 2.27 instead of 2.17 (the centos 7) version..
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CentOS toolchain used by the CMake compiler check at CMakeLists.txt:96, then inspect how its ld executable is built and which glibc version it requires. Reproduce the failing CMake test and verify that the toolchain can link a simple C program using the CentOS 7 glibc 2.17 environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, centos, cmake, linux
- Domain
- build-system, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100