Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: haskell: Make linkWithGold use gold also for compiling Setup.hs #46482

Closed
wants to merge 1 commit into from

Conversation

nh2
Copy link
Contributor

@nh2 nh2 commented Sep 10, 2018

Motivation for this change

linkWithGold only uses ld.gold for the final link, not for building Setup.hs (which currently takes up to ~3 seconds on my machine for each Haskell package, which can add up to some time.)

This doesn't work yet

This is WIP because it segfaults.

If I try it on the hello Haskell package, I get a segfault when running ./Setup:

niklas@ares:/tmp/nix-build-hello-1.0.0.2.drv-1/hello-1.0.0.2$ ./Setup 
Segmentation fault (core dumped)

gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7ad0c81 in frame_dummy ()
   from /nix/store/254rgj92dhkyg7sydb7al65gflnyjd7b-gmp-6.1.2/lib/libgmp.so.10
#2  0x0000000000000000 in ?? ()

and when I compile with integer-simple:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000040ac7d in frame_dummy ()
#2  0x0000000000000000 in ?? ()

Not sure what's going on, why does the Setup segfault if linked with ld.gold?

CC @basvandijk @peti

@GrahamcOfBorg GrahamcOfBorg added 6.topic: haskell 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 10, 2018
@ryantm ryantm added the 2.status: work-in-progress This PR isn't done label Feb 24, 2019
@mmahut
Copy link
Member

mmahut commented Aug 25, 2019

Are there any updates on this pull request, please?

@cdepillabout
Copy link
Member

I believe everything is built with gold now, so this should be okay to close.

@nh2 please feel free to re-open if this PR is still relevant.

@nh2
Copy link
Contributor Author

nh2 commented May 5, 2020

We should probably link the related PRs, should be #80466 and the things linked in there.

@cdepillabout
Copy link
Member

Ah, yeah, sorry I should have linked that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: work-in-progress This PR isn't done 6.topic: haskell 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants