[Haskell-cafe] Re: Troubles Building LLVM (Fixed)

Keith Sheppard keithshep at gmail.com
Sat Jun 19 14:34:24 EDT 2010

Hello, in case someone else hits this problem I was able to fix it by
installing the latest haskell platform via macports.

- I uninstalled ghc "sudo /Library/Frameworks/GHC.framework/Tools/Uninstaller"
- deleted ~/.ghc and ~/.cabal
- did a "sudo port install haskell-platform" (be prepared for this to
take a couple of hours). ghc --version gives 6.10.4
- cabal install llvm

I still don't know the root cause of the build error but now the llvm
examples build and run with no errors.


On Thu, Jun 17, 2010 at 10:46 PM, Keith Sheppard <keithshep at gmail.com> wrote:
> Hello All,
> I'm trying to get up and running with the very interesting llvm
> package[1] but I'm running into problems during the linking stage.
> keith at sugarglider-2:~/projects/third-party/llvm-hs-bindings/examples/>
> make clean all
> rm -f HelloJIT Fibonacci BrainF Vector Array DotProd Arith Align
> Struct Varargs *.o *.hi *.s *.bc Fib *.exe *.exe.manifest *~
> ghc -Wall -optl -w --make -o HelloJIT.exe -main-is HelloJIT.main HelloJIT.hs
> [1 of 1] Compiling HelloJIT         ( HelloJIT.hs, HelloJIT.o )
> Linking HelloJIT.exe ...
> Undefined symbols:
>  "_LLVMAddCondPropagationPass", referenced from:
>      _ssCM_info in libHSllvm-
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [HelloJIT.exe] Error 1
> It's probably something very simple that I'm doing wrong since this is
> my first Haskell build linking against foreign libs. Do you know what
> I might be doing wrong?
> Here are the versions:
> Mac OS X 10.5.8
> GHC 6.10.1 (waiting out a leopard installer bug [2])
> llvm-2.7 installed to default location
> llvm package version
> Thanks!
> BTW, the combination of this package plus the awesome Haskell parsers
> seem to make for a great compiler construction kit. I'm looking
> forward to playing around w/ llvm
> [1] http://hackage.haskell.org/package/llvm
> [2] http://trac.haskell.org/haskell-platform/ticket/110
> --
> keithsheppard.name


More information about the Haskell-Cafe mailing list