Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GHC status on ARM64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
fredolic
n00b
n00b


Joined: 11 Jul 2005
Posts: 18

PostPosted: Sun May 29, 2022 8:42 pm    Post subject: GHC status on ARM64 Reply with quote

Dear all,

I would like to know what is the status of GHC on ARM64 in Gentoo. I need it to build pandoc. As far as I know there needs to be a binary ghc compiler or either I need to bootstrap it myself (but that would still require some sort of binary to start with). The machine is an ARM64 based M1 Apple silicon chip, so RAM and CPU shouldn't be an issue to be able to compile it. And in fact, I would like to avoid cross-compiling because this is the fastest machine that I have available for such a task.

I can't compiler GHC-9.0.1 neither GHC-9.0.1-r1 with USE binary, ghcbootstrap, or ghcmakebinary, or any of their combinations.


Does anyone have any clue on how to proceed?

Thank you very much.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54250
Location: 56N 3W

PostPosted: Sun May 29, 2022 10:39 pm    Post subject: Reply with quote

fredolic,

Since I tried this a few years ago on a Raspberry Pi 3, it looks like things are much improved.

Yo can get a Debian arm64 GHC.
It installs into /usr/local which is very user friendly.
After keywording ghc,
Code:
USE=ghcbootstrap emerge ghc -av
will try to build 9.0.1 for you.

Its complaining about my llvm-14.0.3 but its still going.
Code:
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3


I'm bothered that Debian is ahead of Gentoo, so when you get ghc-9.0.1, you may not like it.

-- edit --

Its midnight here and its still going.

-- more edit --

Code:
Pi4_GCC-12 ~ # genlop -c

 Currently merging 1 out of 1

 * dev-lang/ghc-9.0.1-r1

       current merge time: 9 hours, 47 minutes and 53 seconds.
       ETA: unknown.
That's with -j32 on a 3GHz system too.

Its buiiding ghc-9.0.1 now but ...
You are using an unsupported version of LLVM!
Code:
Currently only 9 is supported. System LLVM version: 14.0.3


It built eventually ...
Code:
     Mon May 30 10:10:45 2022 >>> dev-lang/ghc-9.0.1-r1
       merge time: 11 hours, 48 minutes and 11 seconds.

Its in my arm64 binhost. Thats built for 64 bit Raspberry Pi
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
fredolic
n00b
n00b


Joined: 11 Jul 2005
Posts: 18

PostPosted: Mon May 30, 2022 1:07 pm    Post subject: Reply with quote

NeddySeagoon,

Thank you very much for your input. It worked very well, indeed. I was able to very easily install the ghc from Debian and from that emerge it.

On another one, I am sorry to hear about the time is taken to merge.... because I used `time` to measure it for my case (Mac Studio Max, 8 performance cores, 3.2Ghz, 32 GB RAM).

Code:

real    41m49,341s
user    147m28,659s
sys     4m21,195s


Anyway, based on that I would like to be of use to the ARM64 gentoo community in the future.
Back to top
View user's profile Send private message
fredolic
n00b
n00b


Joined: 11 Jul 2005
Posts: 18

PostPosted: Mon May 30, 2022 1:09 pm    Post subject: Reply with quote

Let me add that I needed to install numactl before.
Back to top
View user's profile Send private message
fredolic
n00b
n00b


Joined: 11 Jul 2005
Posts: 18

PostPosted: Mon May 30, 2022 1:29 pm    Post subject: Reply with quote

I am afraid, however, that even if ghc is compiled, the issues is not yet fully resolved. As I mentioned, the idea is to install pandoc. And the problem now is that emerge is not able to move forward, and is stuck on some sort of cabal problem:

Code:

<command line>: cannot satisfy -package Cabal-


This error message happens when installing either dev-haskell/fail, dev-haskell/hashable, dev-haskell/binary or dev-haskell/haskell-updater.

I fear that in order to solve it one should have dev-haskell/cabal, but this has, as dependencies, the aforementioned packages.

So any suggestion on how to move on?

Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54250
Location: 56N 3W

PostPosted: Tue May 31, 2022 6:24 pm    Post subject: Reply with quote

fredolic,

After a bit of poking about, there are two things,

All the Gentoo Haskell action happens in the Haskell overlay. So use that rather than the main ::gentoo repo.

The Haskell ecosystem seems to be a bit like the Gentoo ecosystem, in that some packages depend on earlier versions of themselves.
It looks like ghc, cabal and a few others are like that.

The only way out of that is to find binaries and install them, in say, /usr/local then use those binaries to emerge your own.
Debian looks like a good starting point, it worked for ghc.

To support arm64 and find out what needs to be done, join Libera IRC, register your nick and talk to the people in #gentoo-arm.
You will need to discuss your interests and skill set as there is no point in indicating things that do not interest you or do not match your skills.
Its all supposed to be fun. That's the only reason for doing it.
You can say I sent you if you want.

There is an email alias for at arm64@gentoo.org but its very quiet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum