Skip to content
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

compiler trying to dynamically link to libLLVM-3.3.dylib, wrong path #33

Closed
nickdesaulniers opened this issue Sep 13, 2013 · 2 comments
Closed

Comments

@nickdesaulniers
Copy link

I just updated my copy of crystal source, and when I ran crystal -h I got a stack trace due to a failed dlopen call to libLLVM-3.3.dylib.

Compiler expects location:
/usr/local/lib/LLVM-3.3

Actual location:
/usr/local/lib//llvm-3.3/lib/libLLVM-3.3.dylib

This could be an OSX thing, since I used homebrew to install llvm-3.3. I thought I may have messed up an Env Var since I'm messing around with emscripten trying to compile Crystal to JavaScript. but printenv came up without anything related to LLVM.

I could symlink the DLL, but why not fix?

@asterite
Copy link
Member

Hm, it seems homebrew changed the location where llvm is installed. I had a previous version and it worked. Now I updated my code and I have the same problem.

I solved it by putting this in my ~/.bash_profile:

export DYLD_LIBRARY_PATH=`llvm-config-3.3 --libdir`

What we need to do is to make bin/crystal be a wrapper that sets DYLD_LIBRARY_PATH in the environment and invokes the compiler. I'll keep this ticket open until we do that.

@asterite
Copy link
Member

asterite commented Feb 1, 2014

Now that we download a copy of llvm to compile, and that the compiler has llvm statically linked, this issue is no longer an issue :-)

@asterite asterite closed this as completed Feb 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants