Huh. I thought the 3.3 llvm problems only happened when building ghc. Oops. Your absolutely right. Ghc < 7.7 does not generate in general, IR that llvm >= 3.3 will be happy with.
On Thursday, August 15, 2013, Ozgur Akgun wrote:
Hi.On 15 August 2013 20:35, Carter Schonwald <carter.schonwald@gmail.com> wrote:
I wonder what makes you think this is the case.At this moment in time, `brew install llvm` will install llvm-3.3.Using llvm-3.3, I get warnings and errors. Using llvm-3.2, I get warnings but I never got any errors. This is not to say that they cannot happen on other packages.I've just uninstalled 3.2, installed 3.3, and tried to compile a project of mine. One of its dependencies, data-default-class, failed to compile.The following is what happened on my computer.
Hope this helps,Ozgur.$ ghc --versionThe Glorious Glasgow Haskell Compilation System, version 7.6.3$ cabal --versioncabal-install version 1.16.0.2using version 1.16.0 of the Cabal library$ cabal install --force-reinstalls --disable-documentation --disable-library-profiling --disable-executable-profiling --ghc-options="-fllvm" data-default-class
Resolving dependencies...Configuring data-default-class-0.0.1...Building data-default-class-0.0.1...Preprocessing library data-default-class-0.0.1...[1 of 1] Compiling Data.Default.Class ( Data/Default/Class.hs, dist/build/Data/Default/Class.o )You are using a new version of LLVM that hasn't been tested yet!We will try though...wrong initalizer for intrinsic global variable[0 x i8*] undefBroken module found, compilation aborted!0 libLLVM-3.3.dylib 0x000000010223faee llvm::sys::PrintStackTrace(__sFILE*) + 401 libLLVM-3.3.dylib 0x000000010223fef5 SignalHandler(int) + 2412 libsystem_c.dylib 0x00007fff8601f94a _sigtramp + 263 libsystem_c.dylib 0x0000000102a10a00 _sigtramp + 20907993124 libLLVM-3.3.dylib 0x000000010223fd6d abort + 225 libLLVM-3.3.dylib 0x0000000101f08466 (anonymous namespace)::Verifier::abortIfBroken() + 2366 libLLVM-3.3.dylib 0x0000000101f07b97 (anonymous namespace)::Verifier::doFinalization(llvm::Module&) + 34777 libLLVM-3.3.dylib 0x0000000101ef63a4 llvm::FPPassManager::doFinalization(llvm::Module&) + 568 libLLVM-3.3.dylib 0x0000000101ef5e52 llvm::FunctionPassManagerImpl::doFinalization(llvm::Module&) + 629 libLLVM-3.3.dylib 0x0000000101ef5d43 llvm::FunctionPassManager::doFinalization() + 2110 opt 0x0000000101be19aa std::vector<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >, std::allocator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >*, std::vector<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >, std::allocator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > > > >, std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > const&) + 698811 libdyld.dylib 0x00007fff8959c7e1 start + 012 libdyld.dylib 0x0000000000000006 start + 1990604837Stack dump:0. Program arguments: opt /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.ll -o /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc -O1 --enable-tbaa=truellc: /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc: error: Could not open input file: No such file or directoryFailed to install data-default-class-0.0.1cabal: Error: some packages failed to install:data-default-class-0.0.1 failed during the building phase. The exception was:ExitFailure 1