Closed peddie closed 10 years ago
Which version of llvm-general are you installing in the tutorial's sandbox? The tutorial currently is written against an explicit version of llvm-general == 3.4.1.0
in it's cabal file, which is a little behind Hackage and may not have some recent changes.
I used 3.4.1.0 originally, but I also experience the problem on the latest (3.4.2.2) llvm-general.
I haven't tackled supporting ghc 7.8 support yet - I'm still on 7.6.3. Thanks for the report.
Okay, I've finally had time to upgrade everything to work appropriately with ghc-7.8. Now I can take a look at this issue.
Looks like the new ghc is better at optimizing out unreferenced symbols. I'd been erroneously relying on just the presence of an FFI reference to the LinkInJIT/LinkInMCJIT symbols that pull in the rest of the JIT systems. Fix forthcoming.
Just a note that I am also suffering from this problem.
Oh and 'cabal install llvm-general -fshared-llvm --reinstall' is the workaround I am using.
Fixed (finally) in llvm-general-3.3.13.1 and llvm-general-3.4.4.1.
Hi,
I'm having a problem with GHC 7.8.2 where code using the default (static) build of llvm-general versions 3.4.2.2 and 3.4.1.0 fails at runtime, the first time I try to use MCJIT in a program:
This problem does not occur if I build llvm-general with --flags="shared-llvm". It also does not occur with the default build flags on GHC 7.6.3. My system is Debian i386, and I'm building against the llvm-3.4 packages from apt.
The easiest way to see this issue is by building and running Chapter 4 of Stephen Diehl's LLVM tutorial. To reproduce, clone that repository, install dependencies in a sandbox, then do
You should see the tutorial interpreter prompt
ready>
, at which point you can define some trivial functionand see the error. Blowing away the cabal sandbox and reinstalling llvm-general with shared flags fixes the problem.