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

Fix enableRelocatedStaticLibs. #1430

Closed

Conversation

TravisWhitaker
Copy link
Contributor

No description provided.

@hamishmack
Copy link
Collaborator

bors try

iohk-bors bot added a commit that referenced this pull request Apr 8, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 8, 2022

try

Build failed:

@michaelpj
Copy link
Collaborator

Do these settings need some comments explaining why we need them?

@hamishmack
Copy link
Collaborator

I think this might be causing hydra to fail to build windows cross compiler due to Log limit exceeded error https://hydra.iohk.io/build/13649681

@TravisWhitaker
Copy link
Contributor Author

I'd love to add an explanation here, but unfortunately I don't know one. As far as I can tell -fexternal-dynamic-refs is an undocumented GHC option, and I only know that it's necessary in addition to -fPIC to produce position independent code on X86_64 via experimentation.

The enableRelocatedStaticLibs option is definitely broken without this change, though.

@cdepillabout
Copy link
Contributor

I'd love to add an explanation here, but unfortunately I don't know one.

We had this same conversation in Nixpkgs: NixOS/nixpkgs#162374 (comment)

@TravisWhitaker
Copy link
Contributor Author

@hamishmack @michaelpj What's necessary to merge this? It's required to build working relocatable machine code on x86_64.

@hamishmack
Copy link
Collaborator

We need to find a fix for this https://hydra.iohk.io/build/13649664

Comment on lines +123 to +124
GhcLibHcOpts += -fexternal-dynamic-refs
GhcLibHcOpts += -fexternal-dynamic-refs
Copy link
Contributor

@mklca mklca Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a typo, surely? GhcLibHcOpts is the target of both assignments.

I've had success building a statically linked x86_64-unknown-linux-musl binary using projectCross.musl64 and ghc923 with this version.

@hamishmack
Copy link
Collaborator

Merged in #1569

@hamishmack hamishmack closed this Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants