[Haskell-iPhone] building LLVM 3.0 on OSX 10.8

Alex Carter alrunner4 at gmail.com
Tue Dec 18 17:18:33 CET 2012


You can use the last homebrew formula before llvm updated to 3.1, which
worked for me:

brew install
https://raw.github.com/mxcl/homebrew/8022bf4dc0f814d527965ed8ec7048f647c44ec5/Library/Formula/llvm.rb

- Alex
On Dec 18, 2012 3:02 AM, "Stefan Kersten" <sk at k-hornz.de> wrote:

> hi luke,
>
> On 18.12.2012, at 11:47, Luke Iannini <lukexipd at gmail.com> wrote:
> > 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?
>
> 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.
>
> here's the error with llvm 3.1:
>
> "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
> Unsupported calling convention
> UNREACHABLE executed at ARMISelLowering.cpp:1142!
> 0  llc               0x000000010077f99b void*
> llvm::object_creator<std::vector<std::string, std::allocator<std::string> >
> >() + 6987
> 1  llc               0x000000010077fcb4 void*
> llvm::object_creator<std::vector<std::string, std::allocator<std::string> >
> >() + 7780
> 2  libsystem_c.dylib 0x00007fff8d6e18ea _sigtramp + 26
> 3  libsystem_c.dylib 0x0000000000000010 _sigtramp + 18446603338143360832
> 4  llc               0x000000010077f916 void*
> llvm::object_creator<std::vector<std::string, std::allocator<std::string> >
> >() + 6854
> 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
> 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
> 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
> 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
> 9  llc               0x00000001004094f7 char*
> std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&,
> std::forward_iterator_tag) + 35851
> 10 llc               0x0000000100409b80 char*
> std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&,
> std::forward_iterator_tag) + 37524
> 11 llc               0x00000001004ca083 void
> llvm::ViewGraph<llvm::MachineFunction const*>(llvm::MachineFunction const*
> const&, llvm::Twine const&, bool, llvm::Twine const&,
> llvm::GraphProgram::Name) + 1409
> 12 llc               0x000000010073639b
> llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
> const*>::OptionInfo, false>::grow(unsigned long) + 18031
> 13 llc               0x0000000100732e89
> llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
> const*>::OptionInfo, false>::grow(unsigned long) + 4445
> 14 llc               0x0000000100736158
> llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
> const*>::OptionInfo, false>::grow(unsigned long) + 17452
> 15 llc               0x0000000100736cc3
> llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
> const*>::OptionInfo, false>::grow(unsigned long) + 20375
> 16 llc               0x0000000100736d0f
> llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
> const*>::OptionInfo, false>::grow(unsigned long) + 20451
> 17 llc               0x00000001000025ba
> 18 llc               0x0000000100000d34
> Stack dump:
> 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
> 1.      Running pass 'Function Pass Manager' on module
> '/var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc16484_0/ghc16484_0.bc'.
> 2.      Running pass 'ARM Instruction Selection' on function
> '@ghczmprim_GHCziMagic_inline_info'
>
> <sk>
>
>
> _______________________________________________
> iPhone mailing list
> iPhone at haskell.org
> http://www.haskell.org/mailman/listinfo/iphone
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/iphone/attachments/20121218/861cb471/attachment.htm>


More information about the iPhone mailing list