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

CMake CHECK_GLIBC_VERSION macro causes configure crashes on non-LC systems #115

Closed
ilumsden opened this issue Apr 3, 2024 · 1 comment · Fixed by #116
Closed

CMake CHECK_GLIBC_VERSION macro causes configure crashes on non-LC systems #115

ilumsden opened this issue Apr 3, 2024 · 1 comment · Fixed by #116
Labels
bug Something isn't working

Comments

@ilumsden
Copy link
Collaborator

ilumsden commented Apr 3, 2024

On some non-LC systems, the CHECK_GLIBC_VERSION macro in cmake/modules/SetupCompiler.cmake causes configuration failures. This is because the .so file for GLibc does not always include the version number. Additionally, the .so file for GLibc rarely includes a dash. Both of these things must be present for CHECK_GLIBC_VERSION to pass without a FATAL_ERROR.

An example of a case where this error occurs is the Docker container for the Flux tutorial. That container is based on Ubuntu 22.04 and uses an apt installed version of GCC 11. When I replicate the commands run by CHECK_GLIBC_VERSION using bash commands, I see the following:

$ echo "GLibc output: $(gcc -print-file-name=libc.so.6)"
GLibc output: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libc.so.6

$ echo "GLibc realpath: $(realpath $(gcc -print-file-name=libc.so.6))"
GLibc realpath: /usr/lib/x86_64-linux-gnu/libc.so.6

Since the path does not contain a dash nor does it contain the version, CHECK_GLIBC_VERSION fails with the following:

2.401 -- The C compiler identification is GNU 11.4.0
2.968 -- The CXX compiler identification is GNU 11.4.0
3.020 -- Detecting C compiler ABI info
3.793 -- Detecting C compiler ABI info - done
3.834 -- Check for working C compiler: /usr/bin/cc - skipped
3.835 -- Detecting C compile features
3.837 -- Detecting C compile features - done
3.849 -- Detecting CXX compiler ABI info
4.587 -- Detecting CXX compiler ABI info - done
4.626 -- Check for working CXX compiler: /usr/bin/c++ - skipped
4.627 -- Detecting CXX compile features
4.630 -- Detecting CXX compile features - done
4.640 -- CMAKE_INSTALL_LIBDIR lib
4.687 CMake Error at cmake/modules/SetupCompiler.cmake:38 (MESSAGE):
4.687   Unknown glibc version: libc.6
4.687 Call Stack (most recent call first):
4.687   cmake/modules/SetupCompiler.cmake:42 (CHECK_GLIBC_VERSION)
4.687   CMakeLists.txt:120 (include)
4.687
4.687
4.688 -- Configuring incomplete, errors occurred!
4.688 See also "/home/fluxuser/dyad/build/CMakeFiles/CMakeOutput.log".
@ilumsden ilumsden added the bug Something isn't working label Apr 3, 2024
@ilumsden
Copy link
Collaborator Author

Fixed by #116

@ilumsden ilumsden linked a pull request Oct 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant