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

Error bootstrapping on CentOS #71227

Open
alexreg opened this issue Apr 16, 2020 · 6 comments
Open

Error bootstrapping on CentOS #71227

alexreg opened this issue Apr 16, 2020 · 6 comments
Labels
C-bug Category: This is a bug. O-linux Operating system: Linux T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@alexreg
Copy link
Contributor

alexreg commented Apr 16, 2020

It looks like the bootstrapper does not use cmake3 on CentOS (i.e., CMake 3.x) but instead cmake (i.e., version 2.x). This results in the error CMake 3.4.3 or higher is required. You are running version 2.8.12.2. The fix would seem to be obvious: check for cmake3 before falling back to cmake.

Relevant section of console output:

    Finished release [optimized + debuginfo] target(s) in 49.26s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building LLVM for x86_64-unknown-linux-gnu
running: "cmake" "/home/alexreg/src/rust-devel/trait-upcasting/src/llvm-project/llvm" "-DLLVM_ENABLE_ASSERTIONS=ON" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DWITH_POLLY=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=32" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" "-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DPYTHON_EXECUTABLE=/usr/bin/python" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=cc" "-DCMAKE_CXX_COMPILER=c++" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_INSTALL_PREFIX=/home/alexreg/src/rust-devel/trait-upcasting/build/x86_64-unknown-linux-gnu/llvm" "-DCMAKE_BUILD_TYPE=Release"
CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
  CMake 3.4.3 or higher is required.  You are running version 2.8.12.2


-- Configuring incomplete, errors occurred!
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /home/alexreg/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
	finished in 0.027
failed to run: /home/alexreg/src/rust-devel/trait-upcasting/build/bootstrap/debug/bootstrap -i test src/test/ui/traits/trait-upcasting
Build completed unsuccessfully in 0:01:59
@alexreg alexreg added the C-bug Category: This is a bug. label Apr 16, 2020
@Mark-Simulacrum
Copy link
Member

I would accept a PR doing what you suggest is obvious.

@alexreg
Copy link
Contributor Author

alexreg commented Apr 17, 2020

Also, is there a reason that the bootstrapping script uses python rather than python3?

@Mark-Simulacrum
Copy link
Member

We have a number of fallbacks, but it was my perspective that we should prefer python and fallback to python3, at least for now; I suspect systems may prefer to install to python rather than python3. We work with both 2.7 and 3.

@alexreg
Copy link
Contributor Author

alexreg commented Apr 17, 2020

Okay, thanks for clarifying. Makes detecting whether cmake3 exists slightly more annoying, but not a huge deal.

@Alexendoo Alexendoo added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 22, 2020
@jyn514
Copy link
Member

jyn514 commented Jan 1, 2021

@alexreg on CentOS 8, cmake --version gives cmake version 3.11.4. What version of CentOS are you on?

@jyn514
Copy link
Member

jyn514 commented May 24, 2023

EOL for CentOS 7 is June 30, 2024; if we haven't heard back by then i think this issue should just be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-linux Operating system: Linux T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
5 participants