1

I would like to install Cabal on my POWER8 RHEL 7.9 system.

Instructions here and then here suggested to run this command.

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

Upon running this I answered all the questions with the default answer and then it said:-

Unknown architecture: ppc64le

So, how do I install haskell, and thus cabal on my system?

Morag Hughson
  • 7,255
  • 15
  • 44
  • Is this really a machine with Power ISA processor, or is it actually an x86-64 or ARM64 that's just misclassified for some reason? – leftaroundabout Aug 22 '23 at 13:43
  • If you're not sure, you may be able to learn more by poking around in `/proc/cpuinfo` and searching the web for info on what you see in there. – Daniel Wagner Aug 22 '23 at 14:02
  • It's really a power machine – Morag Hughson Aug 22 '23 at 21:51
  • Then I'm afraid it's going to be difficult. Though it seems there are people who have managed to port GHC to PowerPC, this is at any rate not officially maintained. I suspect the most realistic option for running Haskell code on such a machine is to compile to WebAssembly, though that will for sure limit what you can do with it. – leftaroundabout Aug 23 '23 at 07:27
  • All I actually want is shelltestrunner, so perhaps there is another way to get that instead of GHCup -> Haskell -> Cabal -> shelltestrunner – Morag Hughson Aug 23 '23 at 09:36
  • Well, I got cabal installed on my ppc64le system, but it doesn't understand the package index file that it has just downloaded! Anyway, that's another different question. – Morag Hughson Aug 26 '23 at 05:30

1 Answers1

1

PowerPC is a Tier 2 platform for GHC (See https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms). That means that it probably works, but it is not supported by the core development team.

https://www.haskell.org/ghc/distribution_packages has details of where you can get various of the tier 2 platforms from, and specifically for ppc64le which you are after, there is a section titled, "Fedora and EPEL" which suggests you can install it thus:-

dnf install ghc.

Of course, first you'll have to install dnf which is in the EPEL.

Failing that you'll probably have to compile GHC from source. You can try following the instructions here: https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian, but that is going to take some effort.

Morag Hughson
  • 7,255
  • 15
  • 44
Noughtmare
  • 9,410
  • 1
  • 12
  • 38