armv7 "invalid instruction" problem building cabal
I've been trying to get going with ghc 7.10.2 on armv7 debian, problem is described here: http://stackoverflow.com/questions/32124334/ghc-armv7-binary-cabal-illegal-i... thanks for any help! Ben
Ben Burdette wrote:
I've been trying to get going with ghc 7.10.2 on armv7 debian, problem is described here:
http://stackoverflow.com/questions/32124334/ghc-armv7-binary-cabal-illegal-i...
Sorry, I'll answer here instead of SO if thats OK. Mostly because I don't have an answer and need to ask you to provide more info. As a first step, what is the output of "ghc --info"? Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On 08/21/2015 03:16 PM, Erik de Castro Lopo wrote:
Ben Burdette wrote:
I've been trying to get going with ghc 7.10.2 on armv7 debian, problem is described here:
http://stackoverflow.com/questions/32124334/ghc-armv7-binary-cabal-illegal-i... Sorry, I'll answer here instead of SO if thats OK. Mostly because I don't have an answer and need to ask you to provide more info.
As a first step, what is the output of "ghc --info"?
Cheers, Erik No prob! Either forum is ok for me. get info output:
[("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv") ,("C compiler command","/usr/bin/gcc") ,("C compiler flags"," -fno-stack-protector") ,("C compiler link flags"," -fuse-ld=gold -Wl,-z,noexecstack") ,("Haskell CPP command","/usr/bin/gcc") ,("Haskell CPP flags","-E -undef -traditional ") ,("ld command","/usr/bin/ld.gold") ,("ld flags"," -z noexecstack") ,("ld supports compact unwind","YES") ,("ld supports build-id","YES") ,("ld supports filelist","NO") ,("ld is GNU ld","YES") ,("ar command","/usr/bin/ar") ,("ar flags","q") ,("ar supports at file","YES") ,("touch command","touch") ,("dllwrap command","/bin/false") ,("windres command","/bin/false") ,("libtool command","libtool") ,("perl command","/usr/bin/perl") ,("cross compiling","NO") ,("target os","OSLinux") ,("target arch","ArchARM {armISA = ARMv7, armISAExt = [VFPv3,NEON], armABI = HARD}") ,("target word size","4") ,("target has GNU nonexec stack","False") ,("target has .ident directive","True") ,("target has subsections via symbols","False") ,("Unregisterised","NO") ,("LLVM llc command","/usr/bin/llc-3.5") ,("LLVM opt command","/usr/bin/opt-3.5") ,("Project version","7.10.2") ,("Project Git commit id","0da488c4438d88c9252e0b860426b8e74b5fc9e8") ,("Booter version","7.6.3") ,("Stage","2") ,("Build platform","arm-unknown-linux") ,("Host platform","arm-unknown-linux") ,("Target platform","arm-unknown-linux") ,("Have interpreter","YES") ,("Object splitting supported","NO") ,("Have native code generator","NO") ,("Support SMP","YES") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn") ,("Support dynamic-too","YES") ,("Support parallel --make","YES") ,("Support reexported-modules","YES") ,("Support thinning and renaming package flags","YES") ,("Uses package keys","YES") ,("Dynamic by default","NO") ,("GHC Dynamic","YES") ,("Leading underscore","NO") ,("Debug on","False") ,("LibDir","/usr/local/lib/ghc-7.10.2") ,("Global Package DB","/usr/local/lib/ghc-7.10.2/package.conf.d") ]
Ben Burdette wrote:
No prob! Either forum is ok for me. get info output:
Ok, this:
,("ld command","/usr/bin/ld.gold")
means GHC uses ld.gold explicitly and this
,("LLVM llc command","/usr/bin/llc-3.5") ,("LLVM opt command","/usr/bin/opt-3.5")
means its using the right versions of the llvm tool. Try compiling and running a simple "Hello world" type program. Try compiling with and without optimisation. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Ben Burdette wrote:
I've been trying to get going with ghc 7.10.2 on armv7 debian, problem is described here:
http://stackoverflow.com/questions/32124334/ghc-armv7-binary-cabal-illegal-i...
I suspect your problem may be related to this one: https://ghc.haskell.org/trac/ghc/ticket/10375 which I started work on, got stuck and haven't had time to return to. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On 08/21/2015 04:00 PM, Erik de Castro Lopo wrote:
Ben Burdette wrote:
I've been trying to get going with ghc 7.10.2 on armv7 debian, problem is described here:
http://stackoverflow.com/questions/32124334/ghc-armv7-binary-cabal-illegal-i... I suspect your problem may be related to this one:
https://ghc.haskell.org/trac/ghc/ticket/10375
which I started work on, got stuck and haven't had time to return to.
Erik
That does seem to be the case. I was able to duplicate their ghci error: /GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help// //Prelude> data Planet = Mercury | Venus deriving Eq// //Prelude> Mercury == Mercury// //Illegal instruction// //bburdette@jessie-rpi:~$ // / And my hello world program: / main = do putStrLn "hello" /The results: / //bburdette@jessie-rpi:~$ ghc hello.hs // //[1 of 1] Compiling Main ( hello.hs, hello.o )// //Linking hello ...// //bburdette@jessie-rpi:~$ ls// //bin ghc-7.10.2-arm-unknown-linux.tar.xz hello.hi hello.o// //code hello hello.hs// //bburdette@jessie-rpi:~$ ./hello // //Illegal instruction// //bburdette@jessie-rpi:~$ ghc -O2 hello.hs// //bburdette@jessie-rpi:~$ ./hello // //Illegal instruction// //bburdette@jessie-rpi:~$ // // /Ok, thx for the help - I'll follow progress on the bug. Let me know if there's anything else you'd like be to try. Ben
participants (2)
-
Ben Burdette -
Erik de Castro Lopo