-
Notifications
You must be signed in to change notification settings - Fork 36
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
Recommended LLVM installation/configuration #31
Comments
The problem here is that the LLVM shared library is not in the library path. To allow the OS to load your library you need to add it's location to the LD_LIBRARY_PATH environmental variable. It will then search that directory for the necessary .so file. You can add this in your ~/.bashrc file. The second issue that you will run into is that RLTK requires a specific version of LLVM. At some point in the future it might be possible to allow it to use multiple different versions and enable/disable features based on which library it finds, but right now the RLTK trunk requires LLVM 3.4 (I plan on releasing a new Gem version based on trunk this weekend). Unless you have a very good reason for needing 3.5, I would recommend using 3.4 until LLVM 3.5 is released and RLTK is updated to use it. It will simplify your life considerably. I hope that helps, and let me know if you have any further questions. If you don't mind me asking, what lexing/parsing libraries are you using? |
I have LLVM trunk checked out to mkdir ~/Code/llvm
cd ~/Code/llvm
svn co http://llvm.org/svn/llvm-project/llvm/trunk .
cd tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ..
cd projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
cd ..
mkdir build && cd build
../configure
mkdir ../bin # then i ran this, thinking it would reconfigure, but i don't think it did anything. `~/Code/llvm/bin` dir is empty
../configure --prefix=/Users/thomas/Code/llvm/bin
make
make check-all I checked I'm happy to recompile version 3.4, but shouldn't I be able to just
Don't mind at all. I'm using Parslet. It's pretty fantastic. Take a look at my parser or transformer if you'd like to see how I'm using it. |
I remove LLVM and installed llvm34 via homebrew-version (as suggested by Homebrew/legacy-homebrew#29733). The version I got was What should I set Can I configure something so it works with |
So yes, I would recommend using pre-compiled packages. You'll need to make sure that the package includes the shared library (libLLVM3.4.so). Sometime these are separated out into another package, usually along the lines of llvm-libraries. Once you know where that library is located you can add it to Any release of LLVM in the 3.4 series will work. |
I've been working on a new programming language, Rip, for a while now. I am able to construct the AST. I didn't know about RLTK before I got started, so I'm just trying to use RLTK to generated LLVM IR. I've compiled LLVM 3.5 from source based on the official instructions. The binaries and libraries are in a non-standard location (
/Users/thomas/Code/llvm/build/Debug+Asserts/{bin,lib}
) though.Running
RLTK::CG::Module.new('foo_module')
results in the following error. What is the preferred way to install LLVM so I can use RLTK?The text was updated successfully, but these errors were encountered: