immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.79k stars 219 forks source link

rust-toolchain.toml is too old for 1.75 rust #1058

Closed tjyang closed 5 months ago

tjyang commented 5 months ago

Hi @kkysen

I can't build with this 1.65 toolchain defined in rust-toolchain.toml Can you pls update ?

kkysen commented 5 months ago

Hi, what errors are you getting when you try to compile?

tjyang commented 5 months ago

@kkysen ,

Thanks for the quick reply.

Caused by: process didn't exit successfully: /home/me/github/learnrust/c2rust/target/debug/build/c2rust-ast-exporter-62cbe6e61d2826ca/build-script-build (exit status: 101) --- stdout CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None HOST_CMAKE_TOOLCHAIN_FILE = None CMAKE_TOOLCHAIN_FILE = None CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None HOST_CMAKE_GENERATOR = None CMAKE_GENERATOR = None CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None HOST_CMAKE_PREFIX_PATH = None CMAKE_PREFIX_PATH = None CMAKE_x86_64-unknown-linux-gnu = None CMAKE_x86_64_unknown_linux_gnu = None HOST_CMAKE = None CMAKE = None running: "cmake" "/home/me/github/learnrust/c2rust/c2rust-ast-exporter/src" "-DLLVM_DIR=/usr/lib64/llvm14/lib/cmake/llvm" "-DClang_DIR=/usr/lib64/llvm14/lib/cmake/clang" "-DCMAKE_INSTALL_PREFIX=/home/me/github/learnrust/c2rust/target/debug/build/c2rust-ast-exporter-8e5ec6fbe6f94814/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug" -- The C compiler identification is GNU 11.4.1 -- The CXX compiler identification is GNU 11.4.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_FFI_CALL -- Performing Test HAVE_FFI_CALL - Success -- Found FFI: /usr/lib64/libffi.so -- Performing Test Terminfo_LINKABLE -- Performing Test Terminfo_LINKABLE - Success -- Found Terminfo: /usr/lib64/libtinfo.so -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") -- Configuring incomplete, errors occurred! See also "/home/me/github/learnrust/c2rust/target/debug/build/c2rust-ast-exporter-8e5ec6fbe6f94814/out/build/CMakeFiles/CMakeOutput.log".

--- stderr CMake Error at /usr/lib64/cmake/clang/ClangConfig.cmake:10 (find_package): Could not find a configuration file for package "LLVM" that exactly matches requested version "16.0.6".

The following configuration files were considered but not accepted:

  /usr/lib64/llvm14/lib/cmake/llvm/LLVMConfig.cmake, version: 14.0.5

Call Stack (most recent call first): CMakeLists.txt:62 (find_package)

thread 'main' panicked at ' command did not execute successfully, got: exit status: 1

build script failed, must exit now', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.50/src/lib.rs:1098:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... [me@rocky9t01a c2rust]$

kkysen commented 5 months ago

I'll look into that error in #1057, but I don't think there's anything wrong with the rust toolchain. Is there something I'm missing about the rust toolchain causing errors?

tjyang commented 5 months ago

Sorry, I can't re-produce this toolchain being too old when compiling the crates. Please look at this issue https://github.com/immunant/c2rust/issues/1059 I am closing this issue.

[me@rocky9t01a c2rust]$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/me/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-2022-08-08-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)

active toolchain
----------------

nightly-2022-08-08-x86_64-unknown-linux-gnu (overridden by '/home/me/github/learnrust/c2rust/rust-toolchain.toml')
rustc 1.65.0-nightly (d394408fb 2022-08-07)

[me@rocky9t01a c2rust]$