Closed thedrow closed 5 years ago
It looks like it's picking up a different version of the C++ standard library than the system libLLVM.so was built against. I think you can check that by setting the environment variable RUSTFLAGS="-C link-arg=-Wl,-verbose"
to print verbose info during the link step.
What's this linuxbrew thing? Could it be a newer toolchain that is incompatible with the system libLLVM.so? We've tested on Ubuntu 18.04 without the linuxbrew toolchain, so if you can get it to use the system one you should be fine.
Linuxbrew is Homebrew for Linux.
You may need to use the libLLVM and clang from homebrew then so its version matches that of the libstdc++. https://github.com/immunant/c2rust/blob/master/docs/README-developers.md#building-with-system-llvm-libraries has some extra environment variables to control paths to LLVM and its libraries.
Alternatively, can you use the Ubuntu system compiler and linker instead of the homebrew version? That's more likely to work for you while using the system libLLVM.
I've installed LLVM through Linuxbrew.
I'm now trying LLVM_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/llvm/bin/llvm-config cargo +nightly-2019-04-12 install c2rust
.
Yes, that worked. Should we edit the README to include linuxbrew in the installation instructions?
Maybe the build process should automatically detect if brew is installed and if brew --prefix llvm
provides a result.
Should we open an issue about that?
@thedrow good point, we updated the README. Let me know if the instructions look good to you.
I have followed the instructions to the letter. I installed the nightly version you have specified in the README, installed all system dependencies through
apt
and I got this:I'm using Ubuntu 18.04.2 if that helps.