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
perlPackages: undefine LD per default in builder #29128
Conversation
Since CC Wrapper defines LD as 'ld', it interferes with MakeMaker which wants to set LD to CC, but cannot. This ensures that the Value which is defined by the perl package itself takes precedence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting it in the generic builder is fine, but please continue doing export LD=$CC
. Alternatively, maybe MakeMaker
could have a setup hook which does this?
@Ericson2314 Does setting it to $CC ensure that it resolves to $CXX if the compilation is done for XSpp? |
@timor It won't. Does that matter? |
I suppose I am comming around to this a bit, seeing that there isn't really a notion of cross-build a perl module. |
In a recent example (Slic3r, was not a perlPackage package though) there was the same symptom, and the fix was making sure that LD was eventually resolved to g++. As far as I can tell, the perl build process takes care that the correct linker command is chosen. Thus I think that unsetting LD may be more general. |
@timor In general, build systems shouldn't allowed to do their environment checks to decide these things---while not necessarily non-deterministic, it is overly dynamic and complex. Especially with cross compilation, they don't always do a very good job of choosing the right too either.
Anyways, so if cross-built perl derivations will never make sense, then I relent and |
Yeah, no idea which one is the correct one. Feel free to pick one, I'll change the pull request accordingly. |
Since CC Wrapper defines LD as 'ld', it interferes with MakeMaker
which wants to set LD to $CC, but cannot. This PR ensures that the Value
which is defined by the perl package itself takes precedence.
Motivation for this change
Several perl packages only build when setting LD to $CC or unsetting LD to let the perl build mechanism take care of figuring out the linker.
Things done
I tested a couple of perl packages locally, which wouldn't build before. It is unclear to me, however, how to test this completely, since it seems that perl packages are not very stable and regularly built by Hydra. It takes a long time to build all of them, and some fail due to other reasons as far as I can tell.
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)