Comments (4)
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?
from rltk.
I have LLVM trunk checked out to ~/Code/llvm
. These are the exact steps I used to compile LLVM:
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 ~/Code/llvm/build/Debug+Asserts/bin
and ~/Code/llvm/build/Debug+Asserts/lib
, but neither directory has any *.so
files. What directory needs to be set to $LD_LIBRARY_PATH
?
I'm happy to recompile version 3.4, but shouldn't I be able to just $ brew install llvm
? (By the way, that also doesn't work; see Homebrew/legacy-homebrew#29733.) If I do have to compile LLVM from source, should I checkout the source into my project or keep it separate? I've never done much with compiled languages, so I appreciate your help.
If you don't mind me asking, what lexing/parsing libraries are you using?
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.
from rltk.
I remove LLVM and installed llvm34 via homebrew-version (as suggested by Homebrew/legacy-homebrew#29733). The version I got was 3.4.1
, so all the binaries look like llvm-config-3.4.1
.
What should I set $LD_LIBRARY_PATH
to?
Can I configure something so it works with 3.4.1
, or do I need to somehow install the 3.4
version?
from rltk.
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 LD_LIBRARY_PATH
. Usually, if you are using a package manager it should be installed in a directory that is already in the standard search path for libraries.
Any release of LLVM in the 3.4 series will work.
from rltk.
Related Issues (20)
- Fix EBNF/selector interplay bug
- Move to LLVM 3.6 HOT 1
- Remove support for LLVM::JIT in anticipation of LLVM 3.6 release
- Rejecting a clause in a production HOT 2
- A more complete example for error production HOT 2
- require 'rltk/ast' pollute main Object with #match method, leaking it in a global scope HOT 7
- RLTK::LexingError carries a wrong line_offset. HOT 6
- :pointer argument is not a valid pointer
- Calling #type on RLTK::CG::Value throws an error
- JITCompiler segfaults on OSX
- Split the LLVM bindings into their own project: RCGTK
- RLTK::Parser.finalize use: fails to load cache on Windows
- left/right associativity maintains separate precedence stacks
- LLVM HOT 2
- undefined method `subclass_of?' HOT 1
- Requires Ruby >= 2.4.0 due to Filigree HOT 1
- rltk (3.0.1) does not work with filigree (0.4.1) due to check_type signature
- Cannot Generate YARD documentation
- Make a release? HOT 2
- "String not in language" error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rltk.