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. <span></span><br><br>On Thursday, August 15, 2013, Ozgur Akgun wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi.</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 August 2013 20:35, Carter Schonwald <span dir="ltr"><<a href="javascript:_e({}, 'cvml', 'carter.schonwald@gmail.com');" target="_blank">carter.schonwald@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="overflow:hidden">Just brew install llvm should work fine. </div>
</blockquote><div><br></div><div>I wonder what makes you think this is the case.</div><div><br></div><div>At this moment in time, `brew install llvm` will install llvm-3.3.</div><div>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.</div>
<div><br></div><div>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.</div><div>The following is what happened on my computer.<br>
</div><div><br></div><div><div>Hope this helps,<br></div><div>Ozgur.</div></div><div><br></div><div><br></div><div><div>$ ghc --version</div><div>The Glorious Glasgow Haskell Compilation System, version 7.6.3</div><div>$ cabal --version</div>
<div>cabal-install version 1.16.0.2</div><div>using version 1.16.0 of the Cabal library</div></div><div>$ cabal install --force-reinstalls --disable-documentation --disable-library-profiling --disable-executable-profiling --ghc-options="-fllvm" data-default-class<br>
</div><div><div>Resolving dependencies...</div><div>Configuring data-default-class-0.0.1...</div><div>Building data-default-class-0.0.1...</div><div>Preprocessing library data-default-class-0.0.1...</div><div>[1 of 1] Compiling Data.Default.Class ( Data/Default/Class.hs, dist/build/Data/Default/Class.o )</div>
<div>You are using a new version of LLVM that hasn't been tested yet!</div><div>We will try though...</div><div>wrong initalizer for intrinsic global variable</div><div>[0 x i8*] undef</div><div>Broken module found, compilation aborted!</div>
<div>0 libLLVM-3.3.dylib 0x000000010223faee llvm::sys::PrintStackTrace(__sFILE*) + 40</div><div>1 libLLVM-3.3.dylib 0x000000010223fef5 SignalHandler(int) + 241</div><div>2 libsystem_c.dylib 0x00007fff8601f94a _sigtramp + 26</div>
<div>3 libsystem_c.dylib 0x0000000102a10a00 _sigtramp + 2090799312</div><div>4 libLLVM-3.3.dylib 0x000000010223fd6d abort + 22</div><div>5 libLLVM-3.3.dylib 0x0000000101f08466 (anonymous namespace)::Verifier::abortIfBroken() + 236</div>
<div>6 libLLVM-3.3.dylib 0x0000000101f07b97 (anonymous namespace)::Verifier::doFinalization(llvm::Module&) + 3477</div><div>7 libLLVM-3.3.dylib 0x0000000101ef63a4 llvm::FPPassManager::doFinalization(llvm::Module&) + 56</div>
<div>8 libLLVM-3.3.dylib 0x0000000101ef5e52 llvm::FunctionPassManagerImpl::doFinalization(llvm::Module&) + 62</div><div>9 libLLVM-3.3.dylib 0x0000000101ef5d43 llvm::FunctionPassManager::doFinalization() + 21</div><div>
10 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&) + 6988</div>
<div>11 libdyld.dylib 0x00007fff8959c7e1 start + 0</div><div>12 libdyld.dylib 0x0000000000000006 start + 1990604837</div><div>Stack dump:</div><div>0.<span style="white-space:pre-wrap">        </span>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=true</div>
<div>llc: /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc: error: Could not open input file: No such file or directory</div><div>Failed to install data-default-class-0.0.1</div><div>cabal: Error: some packages failed to install:</div>
<div>data-default-class-0.0.1 failed during the building phase. The exception was:</div><div>ExitFailure 1</div></div><div><br></div></div>
</div></div>
</blockquote>