On Wed, Sep 9, 2015 at 11:46 AM, Karel Gardas <karel.gardas@centrum.cz> wrote:
On 09/ 9/15 04:21 PM, jmcf125@openmailbox.org wrote:
So ghc-stage1 is working. Good! Now just to find why your base is broken,
please rebuild ghc completely and this time does not use any -j 5 option.
It'll use just one core, but will stop on the first error. Let's see how far
you get.
Ah. Alright, it took a while longer.

  $ ./configure --target=arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc-sysroot --enable-unregisterised && make
(...)
"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H64m -O0    -this-package-key ghcpr_8TmvWUcS1U1IKHT0levwg3 -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-key rts -this-package-key ghc-prim -XHaskell2010 -O -fllvm  -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   -c libraries/ghc-prim/./GHC/CString.hs -o libraries/ghc-prim/dist-install/build/GHC/CString.o
You are using a new version of LLVM that hasn't been tested yet!
We will try though...

^ OK you can see this.

opt: /tmp/ghc23881_0/ghc_1.ll:7:6: error: unexpected type in metadata definition
!0 = metadata !{metadata !"top", i8* null}
      ^
libraries/ghc-prim/ghc.mk:4: recipe for target 'libraries/ghc-prim/dist-install/build/GHC/CString.o' failed
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/CString.o] Error 1
Makefile:71: recipe for target 'all' failed
make: *** [all] Error 2

This is weird, I think I'm not even using LLVM.

This is not weird at all! GHC does not provide ARM NCG and so it is using LLVM if you compile ARM registerised build.

But "./configure [...] --enable-unregisterised" should mean using the C backend, not LLVM, right? So this still looks strange. Also there is an explicit "-fllvm" on the failing ghc-stage1 command line.

What is in your build.mk? Maybe you are using one of the build flavors that sets -fllvm explicitly?

That said you can also try installing the supported version of LLVM for ghc 7.10, which is LLVM 3.5.

Regards,
Reid Barton