where do i get llvm-config ? (trying to build crystal)

7,535 views
Skip to first unread message

K Rhodes

unread,
Aug 10, 2016, 8:37:12 AM8/10/16
to Crystal
Trying to build crystal because i wanted to make a patch to the parser_spec.cr

I keep getting 

Makefile:19: *** Could not locate llvm-config, make sure it is installed and in your PATH.  Stop.

which is because i don't have llvm-config anywhere in my path.  I've got llvm installed, I just don't seem to have llvm-config.... Where do I get it? Or, do i have it and i need to make a symlink somewhere?

running prepare_build gives me this

~/workspace/reference/crystal/crystal  ➜ ./bin/ci prepare_build
brew install llvm libevent pcre crystal-lang
Warning: llvm-3.8.1 already installed
Warning: libevent-2.0.22 already installed
Warning: pcre-8.39 already installed
Warning: crystal-lang-0.18.7_1 already installed
Warning: You are using a pre-release version of Xcode.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.


Jonne Haß

unread,
Aug 10, 2016, 8:59:08 AM8/10/16
to crysta...@googlegroups.com
CI adds /usr/local/opt/llvm/bin to the PATH, no idea what the proper permanent way to make it available on OS X would be. https://github.com/crystal-lang/crystal/wiki/All-required-libraries suggests brew link llvm --force.|
> --
> You received this message because you are subscribed to the Google
> Groups "Crystal" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crystal-lang...@googlegroups.com
> <mailto:crystal-lang...@googlegroups.com>.
> To post to this group, send email to crysta...@googlegroups.com
> <mailto:crysta...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/crystal-lang.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crystal-lang/8731041a-f5b5-41de-9973-f504c394c956%40googlegroups.com
> <https://groups.google.com/d/msgid/crystal-lang/8731041a-f5b5-41de-9973-f504c394c956%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Patrik VV.

unread,
Aug 10, 2016, 4:07:59 PM8/10/16
to Crystal
Maybe you're missing /usr/local/bin in your PATH variable?

On my system (OSX El Capitan with Homebrew, llvm installed), it's installed under /usr/local/bin/llvm-config.

The `brew link llvm --force` might be needed, not sure though.

Regards,
Patrik

K Rhodes

unread,
Aug 11, 2016, 8:05:55 AM8/11/16
to Crystal

brew link llvm --force was the correct answer. Thank you Jonne

for those curious here's where the new symlink points to: 

/usr/local/bin/llvm-config -> ../Cellar/llvm/3.8.1/bin/llvm-config

Terry Raimondo

unread,
Sep 7, 2016, 1:22:56 PM9/7/16
to Crystal
brew link llvm --force
Worked for me too !
Reply all
Reply to author
Forward
0 new messages