View previous topic :: View next topic |
Author |
Message |
NTICompass Apprentice
Joined: 11 Jun 2008 Posts: 171 Location: /home/nticompass/
|
Posted: Thu Sep 18, 2014 12:14 pm Post subject: Haskell Compiler (ghc) with ld.gold |
|
|
I am using ld.gold (because I feel like it) and I was having trouble with dev-lang/ghc. Version 7.6.3-r1 won't compile because gold doesn't support the --hash-size=31 (or --reduce-memory-overheads) option. Even after changing the /usr/lib/ghc-7.6.3/settings file, it still didn't compile.
To try to fix this, I keyworded ghc-7.8.3 and tried to install it. It all worked... until the end. I got the error shown here: https://ghc.haskell.org/trac/ghc/ticket/7452
They have fixed that bug, and there are patches posted in the bug's comments.
Would it possible to apply the patch to gentoo's ghc-7.8.3 ebuild? Here's the patch: https://git.haskell.org/ghc.git/commitdiff/021b7978d14799bae779907faf7490cfd21b3f46
This should make ghc-7.8.3 work with gold. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Thu Sep 18, 2014 7:08 pm Post subject: |
|
|
NTICompass,
The ghc ghc-7.8.3 ebuild does not contain epatchuser or it would be easy. You need to do it the harder way.
Follow the Gentoo Handbook to set up a local overlay. Mine is in /usr/local/portage
This prevents emerge --sync removing all of your hard work.
Copy /usr/portage/dev-lang/ghc/* to your overlay, which will give you /usr/local/portage/dev-lang/ghc/
You don't need it all but its harmless.
Put your new patch into /usr/local/portage/dev-lang/ghc/files/ you can call it anything but you will need the name in the next step.
Edit /usr/local/portage/dev-lang/ghc/ghc-7.8.3.ebuild and add a new epatch line to the file at the end of the existing epatch statements.
Copy the last one Code: | epatch "${FILESDIR}"/${PN}-7.8.3-ia64-prim.patch | and edit the copy to apply your patch.
Save the change.
emerge will detect that the ebuild has be tampered with, to fix that run Code: | ebuild /usr/local/portage/dev-lang/ghc/ghc-7.8.3.ebuild manifest | to regenerate the digests.
If all is well, portage will use the ebuild from your overlay, which will apply the patch. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NTICompass Apprentice
Joined: 11 Jun 2008 Posts: 171 Location: /home/nticompass/
|
Posted: Thu Sep 18, 2014 7:25 pm Post subject: |
|
|
NeddySeagoon wrote: | NTICompass,
The ghc ghc-7.8.3 ebuild does not contain epatchuser or it would be easy. You need to do it the harder way.
Follow the Gentoo Handbook to set up a local overlay. Mine is in /usr/local/portage
This prevents emerge --sync removing all of your hard work.
Copy /usr/portage/dev-lang/ghc/* to your overlay, which will give you /usr/local/portage/dev-lang/ghc/
You don't need it all but its harmless.
Put your new patch into /usr/local/portage/dev-lang/ghc/files/ you can call it anything but you will need the name in the next step.
Edit /usr/local/portage/dev-lang/ghc/ghc-7.8.3.ebuild and add a new epatch line to the file at the end of the existing epatch statements.
Copy the last one Code: | epatch "${FILESDIR}"/${PN}-7.8.3-ia64-prim.patch | and edit the copy to apply your patch.
Save the change.
emerge will detect that the ebuild has be tampered with, to fix that run Code: | ebuild /usr/local/portage/dev-lang/ghc/ghc-7.8.3.ebuild manifest | to regenerate the digests.
If all is well, portage will use the ebuild from your overlay, which will apply the patch. |
Thanks a lot for showing me how to modify and use my own ebuilds!
If this patch is useful for others, would it be possible to include it with the ebuild officially? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Thu Sep 18, 2014 7:31 pm Post subject: |
|
|
NTICompass,
File a bug at bugs.gentoo.org
Include the patch in the bug, not a link to the source.
Also include a credit to the patch author(s) if you can find them. At least, make it clear its not your own work. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NTICompass Apprentice
Joined: 11 Jun 2008 Posts: 171 Location: /home/nticompass/
|
Posted: Thu Sep 18, 2014 7:33 pm Post subject: |
|
|
NeddySeagoon wrote: | NTICompass,
File a bug at bugs.gentoo.org
Include the patch in the bug, not a link to the source.
Also include a credit to the patch author(s) if you can find them. At least, make it clear its not your own work. |
OK. I'll test the patch out myself, and if it works, then I'll post a bug report with it |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Thu Sep 18, 2014 7:47 pm Post subject: |
|
|
NTICompass,
That sounds like a plan. Then you can detail how you tested it. Put your emerge --info output in the bug.
You can then say Works For Me (if it works).
The idea is to make the devs job easy, so they act on your bug report, with the solution attached. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|