<p dir="ltr">You can use the last homebrew formula before llvm updated to 3.1, which worked for me:</p>
<p dir="ltr">brew install <a href="https://raw.github.com/mxcl/homebrew/8022bf4dc0f814d527965ed8ec7048f647c44ec5/Library/Formula/llvm.rb">https://raw.github.com/mxcl/homebrew/8022bf4dc0f814d527965ed8ec7048f647c44ec5/Library/Formula/llvm.rb</a></p>
<p dir="ltr">- Alex</p>
<div class="gmail_quote">On Dec 18, 2012 3:02 AM, "Stefan Kersten" <<a href="mailto:sk@k-hornz.de">sk@k-hornz.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi luke,<br>
<br>
On 18.12.2012, at 11:47, Luke Iannini <<a href="mailto:lukexipd@gmail.com">lukexipd@gmail.com</a>> wrote:<br>
> I actually added the note to use the specific command flags "brew install llvm --all-targets --use-llvm" a few months ago when Mountain Lion was released to work around build problems. Did you use those flags when you tried to build?<br>
<br>
yes, but with homebrew's llvm 3.1 ghc-ios fails to build nonetheless (on both 10.6 and 10.8, see below), so i installed llvm 3.0 from the upstream sources.<br>
<br>
here's the error with llvm 3.1:<br>
<br>
"inplace/bin/ghc-stage1" -H64m -O2 -package-name ghc-prim-0.2.0.0 -hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/. -optP-include -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package rts-1.0 -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O2 -no-user-package-db -rtsopts -odir libraries/ghc-prim/dist-install/build -hidir libraries/ghc-prim/dist-install/build -stubdir libraries/ghc-prim/dist-install/build -hisuf hi -osuf o -hcsuf hc -c libraries/ghc-prim/./GHC/Magic.hs -o libraries/ghc-prim/dist-install/build/GHC/Magic.o<br>
Unsupported calling convention<br>
UNREACHABLE executed at ARMISelLowering.cpp:1142!<br>
0 llc 0x000000010077f99b void* llvm::object_creator<std::vector<std::string, std::allocator<std::string> > >() + 6987<br>
1 llc 0x000000010077fcb4 void* llvm::object_creator<std::vector<std::string, std::allocator<std::string> > >() + 7780<br>
2 libsystem_c.dylib 0x00007fff8d6e18ea _sigtramp + 26<br>
3 libsystem_c.dylib 0x0000000000000010 _sigtramp + 18446603338143360832<br>
4 llc 0x000000010077f916 void* llvm::object_creator<std::vector<std::string, std::allocator<std::string> > >() + 6854<br>
5 llc 0x000000010077332c std::vector<char const*, std::allocator<char const*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<char const**, std::vector<char const*, std::allocator<char const*> > >, char const* const&) + 27634<br>
6 llc 0x0000000100161b71 std::vector<llvm::EVT, std::allocator<llvm::EVT> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::EVT*, std::vector<llvm::EVT, std::allocator<llvm::EVT> > >, llvm::EVT const&) + 3833<br>
7 llc 0x0000000100168d93 std::vector<llvm::EVT, std::allocator<llvm::EVT> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::EVT*, std::vector<llvm::EVT, std::allocator<llvm::EVT> > >, llvm::EVT const&) + 33051<br>
8 llc 0x00000001003e1a8d std::_Rb_tree<llvm::EVT, std::pair<llvm::EVT const, llvm::SDNode*>, std::_Select1st<std::pair<llvm::EVT const, llvm::SDNode*> >, llvm::EVT::compareRawBits, std::allocator<std::pair<llvm::EVT const, llvm::SDNode*> > >::erase(llvm::EVT const&) + 67373<br>
9 llc 0x00000001004094f7 char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) + 35851<br>
10 llc 0x0000000100409b80 char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) + 37524<br>
11 llc 0x00000001004ca083 void llvm::ViewGraph<llvm::MachineFunction const*>(llvm::MachineFunction const* const&, llvm::Twine const&, bool, llvm::Twine const&, llvm::GraphProgram::Name) + 1409<br>
12 llc 0x000000010073639b llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo const*>::OptionInfo, false>::grow(unsigned long) + 18031<br>
13 llc 0x0000000100732e89 llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo const*>::OptionInfo, false>::grow(unsigned long) + 4445<br>
14 llc 0x0000000100736158 llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo const*>::OptionInfo, false>::grow(unsigned long) + 17452<br>
15 llc 0x0000000100736cc3 llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo const*>::OptionInfo, false>::grow(unsigned long) + 20375<br>
16 llc 0x0000000100736d0f llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo const*>::OptionInfo, false>::grow(unsigned long) + 20451<br>
17 llc 0x00000001000025ba<br>
18 llc 0x0000000100000d34<br>
Stack dump:<br>
0. Program arguments: /usr/local/bin/llc -O2 -relocation-model=static /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc16484_0/ghc16484_0.bc -o /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc16484_0/ghc16484_0.lm_s --enable-tbaa=true -mattr=+v7,+vfp3<br>
1. Running pass 'Function Pass Manager' on module '/var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc16484_0/ghc16484_0.bc'.<br>
2. Running pass 'ARM Instruction Selection' on function '@ghczmprim_GHCziMagic_inline_info'<br>
<br>
<sk><br>
<br>
<br>
_______________________________________________<br>
iPhone mailing list<br>
<a href="mailto:iPhone@haskell.org">iPhone@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/iphone" target="_blank">http://www.haskell.org/mailman/listinfo/iphone</a><br>
</blockquote></div>