Opened 18 months ago

Closed 6 months ago

#8896 closed bug (worksforme)

ghci fails on Arm - "Illegal instruction"

Reported by: Ansible Owned by:
Priority: normal Milestone:
Component: GHCi Version: 7.8.1-rc2
Keywords: arm ghci Cc: hvr
Operating System: Linux Architecture: arm
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

With the help of qemu compiled ghc 7.8.1-rc2 for raspberry pi. Ghc is successful, and ghci compiles, but ghci gets an 'Illegal instruction' error. A sample session:

ccrma@satellite:~$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.0.20140228 ccrma@satellite:~$ ghci --version The Glorious Glasgow Haskell Compilation System, version 7.8.0.20140228 ccrma@satellite:~$ ghci GHCi, version 7.8.0.20140228: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... Illegal instruction ccrma@satellite:~$

Change History (10)

comment:1 Changed 18 months ago by Ansible

If its helpful, I have ghc 7.8.1-rc2 compiled and can make it available to anyone who wants to work on this. It took me about 4 days to compile it for the PI, so its a significant undertaking.

comment:3 follow-up: Changed 18 months ago by Ansible

Is that on the PI? I compiled using qemu instead of a real PI, and I used a 2G ram disk for swap. Without the swap the compile would not complete, nor would "cabal install cabal-install".

Here's my build of ghc on the PI:

https://dl.dropboxusercontent.com/u/80409492/ghc-7.8.1-rc2.zip

and here's my .cabal folder with cabal 1.18.?. Compiling cabal-install also required the ram disk.

https://dl.dropboxusercontent.com/u/80409492/pi_7.8.1-rc2-.cabal.zip

And this is the distro I was using:

https://ccrma.stanford.edu/~eberdahl/Satellite/

Last edited 18 months ago by Ansible (previous) (diff)

comment:4 Changed 18 months ago by nomeata

Is that on the PI?

No, on some other arm machine that happens to auto-build the Debian packages. I find the high number of different failure possibilities on arm this late in the release process worrying :-(

comment:5 in reply to: ↑ 3 Changed 17 months ago by AriePeterson

Replying to Ansible:

Here's my build of ghc on the PI: [...]

For reference, I tried to use your build on my rpi, under Raspbian, with some success. Ghci indeed doesn't work (the illegal instruction error even occurs one package earlier, when linking integer-gmp).

I compiled quite a few packages succesfully. However, installing vector-0.10.9.1 fails: when compiling the module Data.Vector.Fusion.Stream.Monadic, ghc tries to link in the integer-gmp package, and this fails. This reminds me of #8212.

Last edited 17 months ago by AriePeterson (previous) (diff)

comment:6 Changed 17 months ago by Ansible

Well glad you've gotten some use out of it, even if its not 100% success.

FWIW I've been able to use 7.6.3 under Arch linux on a 'wandboard' arm computer, and there ghci works. I didn't build ghc there, just installed it with pacman. I might give 7.8 a try on that machine, since it should be able to compile it (2G ram).

comment:7 Changed 10 months ago by thomie

  • Cc hvr added
  • Component changed from Compiler to GHCi
  • Status changed from new to infoneeded

@Ansible is this still a problem? Have you tried with 7.8.3?

comment:8 Changed 10 months ago by Ansible

I have not tried 7.8 lately on the PI. I don't know when I'll get back to that, it took me quite a while (days) to compile and I'm no longer developing a haskell project on it. I will give it a try when I get a chance though, on the pcduino perhaps where I can compile ghc on the device itself. Currently ghci does not work on the pcduino, but then its not running 7.8.3 either.

comment:9 follow-up: Changed 7 months ago by Ansible

Installed today on a banana pi running arch. Ghci works there. Maybe its the version of llvm.

[root@lemaker bananapi]# pacman -Q llvm
llvm 3.5.1-1
[root@lemaker bananapi]# ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.2
[root@lemaker bananapi]# ghci
GHCi, version 7.8.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 1 + 1
2

comment:10 in reply to: ↑ 9 Changed 6 months ago by thomie

  • Resolution set to worksforme
  • Status changed from infoneeded to closed

Replying to Ansible:

Installed today on a banana pi running arch. Ghci works there. Maybe its the version of llvm.

Please reopen if you're still having problems.

Note: See TracTickets for help on using tickets.