Hi Dominic,<br><br>You need to build/install LLVM with shared libraries.<br><br>Then, install llvm-general with -fshared-llvm (or, use my fork, which the stack.yaml files point to).<br><br><br>-Trev<br><br>P.S. On mobile, apologies for the terse reply.<br><div class="gmail_quote"><div dir="ltr">On Wed, 22 Feb 2017 at 10:34 AM, Dominic Steinitz <<a href="mailto:idontgetoutmuch@gmail.com">idontgetoutmuch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am trying to build accelerate-llvm but getting the ghc panics below. Here’s my config<br class="gmail_msg">
<br class="gmail_msg">
> bash-3.2$ ghc-pkg list | grep llvm<br class="gmail_msg">
> ghc-pkg list | grep llvm<br class="gmail_msg">
>     llvm-general-3.8.0.0<br class="gmail_msg">
>     llvm-general-pure-3.5.0.0<br class="gmail_msg">
>     llvm-general-pure-3.5.1.0<br class="gmail_msg">
>     llvm-general-pure-3.8.0.0<br class="gmail_msg">
> bash-3.2$ ghc-pkg list | grep acc<br class="gmail_msg">
> ghc-pkg list | grep acc<br class="gmail_msg">
>     accelerate-1.0.0.0<br class="gmail_msg">
> bash-3.2$ ghc --version<br class="gmail_msg">
> ghc --version<br class="gmail_msg">
> The Glorious Glasgow Haskell Compilation System, version 7.10.2<br class="gmail_msg">
<br class="gmail_msg">
If anyone has any ideas, I’d be very grateful.<br class="gmail_msg">
<br class="gmail_msg">
> bash-3.2$ ~/Library/Haskell/bin/cabal build<br class="gmail_msg">
> ~/Library/Haskell/bin/cabal build<br class="gmail_msg">
> Building accelerate-llvm-1.0.0.0...<br class="gmail_msg">
> Preprocessing library accelerate-llvm-1.0.0.0...<br class="gmail_msg">
> ghc:<br class="gmail_msg">
> lookupSymbol failed in relocateSection (RELOC_GOT)<br class="gmail_msg">
> /usr/local/Cellar/llvm@3.8/3.8.1/lib/llvm-3.8/lib/libLLVMSupport.a: unknown symbol `___dso_handle'<br class="gmail_msg">
> [24 of 52] Compiling Data.Range.Range ( Data/Range/Range.hs, dist/build/Data/Range/Range.o )<br class="gmail_msg">
><br class="gmail_msg">
> <no location info>:<br class="gmail_msg">
>     ghc: panic! (the 'impossible' happened)<br class="gmail_msg">
>   (GHC version 7.10.2 for x86_64-apple-darwin):<br class="gmail_msg">
>       Dynamic linker not initialised<br class="gmail_msg">
><br class="gmail_msg">
> Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug" rel="noreferrer" class="gmail_msg" target="_blank">http://www.haskell.org/ghc/reportabug</a><br class="gmail_msg">
><br class="gmail_msg">
> [31 of 52] Compiling Data.Array.Accelerate.LLVM.Util ( Data/Array/Accelerate/LLVM/Util.hs, dist/build/Data/Array/Accelerate/LLVM/Util.o )<br class="gmail_msg">
><br class="gmail_msg">
> <no location info>:<br class="gmail_msg">
>     ghc: unable to load package `llvm-general-3.8.0.0'<br class="gmail_msg">
> [32 of 52] Compiling Data.Array.Accelerate.LLVM.CodeGen.Ptr ( Data/Array/Accelerate/LLVM/CodeGen/Ptr.hs, dist/build/Data/Array/Accelerate/LLVM/CodeGen/Ptr.o )<br class="gmail_msg">
><br class="gmail_msg">
> <no location info>:<br class="gmail_msg">
>     ghc: panic! (the 'impossible' happened)<br class="gmail_msg">
>   (GHC version 7.10.2 for x86_64-apple-darwin):<br class="gmail_msg">
>       Dynamic linker not initialised<br class="gmail_msg">
><br class="gmail_msg">
> Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug" rel="noreferrer" class="gmail_msg" target="_blank">http://www.haskell.org/ghc/reportabug</a><br class="gmail_msg">
><br class="gmail_msg">
> [33 of 52] Compiling Data.Array.Accelerate.LLVM.CodeGen.Monad[boot] ( Data/Array/Accelerate/LLVM/CodeGen/Monad.hs-boot, dist/build/Data/Array/Accelerate/LLVM/CodeGen/Monad.o-boot )<br class="gmail_msg">
> [34 of 52] Compiling <a href="http://Data.Array.Accelerate.LLVM.CodeGen.IR" rel="noreferrer" class="gmail_msg" target="_blank">Data.Array.Accelerate.LLVM.CodeGen.IR</a> ( Data/Array/Accelerate/LLVM/CodeGen/IR.hs, dist/build/Data/Array/Accelerate/LLVM/CodeGen/IR.o )<br class="gmail_msg">
><br class="gmail_msg">
> <no location info>:<br class="gmail_msg">
>     ghc: panic! (the 'impossible' happened)<br class="gmail_msg">
>   (GHC version 7.10.2 for x86_64-apple-darwin):<br class="gmail_msg">
>       Dynamic linker not initialised<br class="gmail_msg">
><br class="gmail_msg">
> Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug" rel="noreferrer" class="gmail_msg" target="_blank">http://www.haskell.org/ghc/reportabug</a><br class="gmail_msg">
><br class="gmail_msg">
> [44 of 52] Compiling Data.Array.Accelerate.LLVM.Execute.Environment ( Data/Array/Accelerate/LLVM/Execute/Environment.hs, dist/build/Data/Array/Accelerate/LLVM/Execute/Environment.o )<br class="gmail_msg">
><br class="gmail_msg">
> <no location info>:<br class="gmail_msg">
>     ghc: panic! (the 'impossible' happened)<br class="gmail_msg">
>   (GHC version 7.10.2 for x86_64-apple-darwin):<br class="gmail_msg">
>       Dynamic linker not initialised<br class="gmail_msg">
><br class="gmail_msg">
> Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug" rel="noreferrer" class="gmail_msg" target="_blank">http://www.haskell.org/ghc/reportabug</a><br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>