leanprover / leanprover/lean4

4.22 fails to build for rhel9 (centos-stream-9): gcc: error: unrecognized command-line option '--print-target-triple'

Open
#10,082 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug P-low
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Prerequisites
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:

Steps to Reproduce
  1. Build lean4 4.22.0 on epel9 (rhel9/centos-stream 9) with gcc
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.