Closed Ning1253 closed 4 years ago
I can't reproduce this with 1.46.0 or nightly "rustc 1.48.0-nightly (623fb90b5 2020-09-26)". What version did you build with?
Ok so you talking about version made me think about trying to update cargo, since I had briefly seen the command somewhere whilst trying to search up how to fix the error. I did so, and to my surprise, the error went away!
However now it shows another error, which this time I could not fix: "error: failed to run custom build command for llvm-sys v100.2.0
", llvm-sys v100.2.0 being the new version after it was updated.
PS - The versions I am using: Rust 1.46.0, cargo is up to date, LLVM 8.0.0 . PPS - Damn it's really cool that you actually replied!! Solid commitment to a project! PPPS - I attatched the output from the command, since I can't make heads or tails of it - the llvm-config file which it says is missing IS actually missing, but I couldn't find online anywhere to download this file.
llvm-config is a command that's part of LLVM itself. llvm-sys is just a wrapper around the LLVM version installed on your system.
Do you have LLVM installed? What is the contents of C:\Program Files\LLVM\bin\
?
Well it has a bunch of files, starting with "api-ms-win-core..." and going to the .exe s. However there is no llvm-config in that folder, nor in any other folder in that directory -
it has a bunch of others, but not that one.
Hi @Ning1253,
regarding your question, I assume that you are using Windows and tried to install LLVM-8 via the Installer Executable. In Fact, this is the problem, because it wont install llvm-config.exe
(as explained here: https://stackoverflow.com/questions/17096804/where-is-llvm-config-in-windows). You now have two options:
Try to build LLVM 8 from source, which is an incredible mess (I tried it on two different systems and recieved tons of compilation errors, as described here: https://github.com/Playermet/codegoogle.tart/issues/35. I experienced that this only affects LLVM version 8, whereby version > 8 compiled with no errors. @Wilfred: It would be great to make the bfc run with llvm-version > 8, in order to bypass this problem)
Install a Ubuntu Subsystem on Windows and follow the LLVM build guide in the Readme (as I did)
I might try the Ubuntu subsystem then, thank you very much for looking into this!! I’ll update if I can get it to work
Update: I've installed the ubuntu subsystem, and installed rustup and llvm, as well as llvmenv, but now I get an error which I seem to remember having gotten before, saying that "LLVM_SYS_100_PREFIX" does not point to a valid installation, or something along those lines. I seem to remember fixing this, but I can't remember how...
This Error-Message basically says that either your LLVM installation failed or that you haven't set up your enviroment variables properly. This is a detailed instruction on how to compile the bfc on a Linux Subsystem:
tar -xf <pathtotarget>.tar.xz
) and add thebin
folder, inside the extracted directory, permanently to your Path enviroment variable (https://opensource.com/article/17/6/set-path-linux)curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo
and llvm-config
. Both commands should produce an output different to command not found
sudo apt-get update && sudo apt install build-essential zlib1g-dev libtinfo-dev libxml2-dev
cargo build --release
)omg thank you so much for this!!! I should be free to compile it this afternoon, thank you so much! This is so much clearer than anything else I could find online, thanks a lot!!
Update: sorry to cause you so much trouble, but now I am getting the error error: could not compile 'llvm-sys'.
. The problem is that once again, I can't find any solution to this online - it seems to be a problem with the path again since error: No suitable version of LLVM was found system-wide or pointed to by LLVM_SYS_100_PREFIX.
is once again showing. However, just in case I even locally set path as well as set it permamently - llvm-config works when I type it in, giving me the command options, so that works. Cargo also works, and llvm-config --version return LLVM 8.0.0 .
So once again I'm not really sure what to do from here.
Nevermind, I got it to work, time to have fun!! Thank you so much for the help, it's really nice of you to put in so much effort for this!
You're welcome. @Wilfred I think this issue can be closed now.
@Lxixnxuxs I've pushed 93f58fe which adds support for LLVM 10 :)
Hi, this project looks amazing!! I wanted to see whether I could make some cool and pretty fast bf programs with it, but I'm not really familiar with rust or LLVM, so I just followed the instructions you gave in building the files. However after running cargo build --release, I received the errors in the title - I also tried running cmd with administrator, but since I don't really know anything about the languages that was pretty much all I could do. Would you have any idea what would cause this?
PS - If you actually reply, that'll be so awesome, since it will mean you will still be looking at this github page after 4 years!! Dedication and a half.