The only solution I found was to download the prebuilt binaries from the LLVM web site: http://llvm.org/releases/download.html
LLVM Opt missing in OS X 10.9.2
Domanda
I am using Haskell's GHC to create LLVM code but it cannot find opt
from LLVM. I googled the problem and it was recommended to install LLVM from homebrew, which I did, but there's no opt
binary on my path. I am wondering where I can get it from so I compile LLVM code from GHC?
Soluzione
Altri suggerimenti
Homebrew is quite explicit about how it installs LLVM:
~$ brew install llvm
==> Downloading https://homebrew.bintray.com/bottles/llvm-3.6.2.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/llvm-3.6.2.mavericks.bottle.tar.gz
==> Pouring llvm-3.6.2.mavericks.bottle.tar.gz
==> Caveats
LLVM executables are installed in /usr/local/opt/llvm/bin.
Extra tools are installed in /usr/local/opt/llvm/share/llvm.
This formula is keg-only, which means it was not symlinked into /usr/local.
OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/llvm/lib
CPPFLAGS: -I/usr/local/opt/llvm/include
==> Summary
🍺 /usr/local/Cellar/llvm/3.6.2: 811 files, 291M
so what I did was simply export PATH=/usr/local/opt/llvm:$PATH
prior to executing any GHC commands that required LLVM.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow