4.22 fails to build for rhel9 (centos-stream-9): gcc: error: unrecognized command-line option '--print-target-triple'
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Prerequisites
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues
Description
lean4-4.22.0 fails to build for epel9:
https://download.copr.fedorainfracloud.org/results/petersen/lean4/epel-9-x86_64/09434008-lean4/builder-live.log.gz
:
[ 54%] Performing configure step for 'stage0'
cd /builddir/build/BUILD/lean4-4.22.0/redhat-linux-build/stage0 && /usr/bin/cmake -DSTAGE=0 -DUSE_GITHASH=OFF -DCMAKE_COMMAND=/usr/bin/cmake -DCMAKE_CPACK_COMMAND=/usr/bin/cpack -DCMAKE_CTEST_COMMAND=/usr/bin/ctest -DCMAKE_EDIT_COMMAND=/usr/bin/ccmake -DCMAKE_EXTRA_GENERATOR= -DCMAKE_FIND_PACKAGE_REDIRECTS_DIR=/builddir/build/BUILD/lean4-4.22.0/redhat-linux-build/CMakeFiles/pkgRedirects "-DCMAKE_GENERATOR=Unix Makefiles" -DCMAKE_GENERATOR_INSTANCE= -DCMAKE_GENERATOR_PLATFORM= -DCMAKE_GENERATOR_TOOLSET= -DCMAKE_ROOT=/usr/share/cmake -DUSE_MIMALLOC=OFF "-GUnix Makefiles" -S /builddir/build/BUILD/lean4-4.22.0/stage0/src -B /builddir/build/BUILD/lean4-4.22.0/redhat-linux-build/stage0
Re-run cmake no build system arguments
-- The CXX compiler identification is GNU 11.5.0
-- The C compiler identification is GNU 11.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
gcc: error: unrecognized command-line option '--print-target-triple'
gcc: fatal error: no input files
compilation terminated.
-- No build type selected, default to Release
:
Context
Fedora builds of lean4:
- https://github.com/fedora-haskell/lean4/blob/main/lean4.spec
- https://copr.fedorainfracloud.org/coprs/petersen/lean4/build/9434008/
Steps to Reproduce
- Build lean4 4.22.0 on epel9 (rhel9/centos-stream 9) with gcc
- See above rpm spec file
Expected behavior: successful build as usual
Actual behavior: fails as above
Versions
4.22.0
Centos Stream 9 x86_64 + EPEL 9
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Contributor guide
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 builder-live.log.gz output and the Fedora lean4.spec referenced in the issue, then inspect the stage0 CMake configure step under stage0/src to locate why --print-target-triple is passed to GCC. Reproduce the build on EPEL 9 and consider the issue resolved when Lean 4.22.0 builds successfully there.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100