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

Revert "buildGoPackage: remove references in $out/libexec" #96534

Closed
wants to merge 1 commit into from
Closed

Revert "buildGoPackage: remove references in $out/libexec" #96534

wants to merge 1 commit into from

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Aug 28, 2020

This reverts commit b9ac86e.

Added in #92140 for docker which already has this:

preFixup = ''
find $out -type f -exec remove-references-to -t ${go} -t ${stdenv.cc.cc} '{}' +
'' + optionalString (stdenv.isLinux) ''
find $out -type f -exec remove-references-to -t ${stdenv.glibc.dev} '{}' +
'';

@Mic92
Copy link
Member

Mic92 commented Aug 28, 2020

Why not remove the preFixup in docker instead or change it to only remove stdenv.cc.cc and glibc.dev.

@zowoq
Copy link
Contributor Author

zowoq commented Aug 28, 2020

It's just noise in the build output of buildGoPackage, it would only be useful for 2 packages in total.

@@ -212,7 +212,6 @@ let

preFixup = preFixup + ''
find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
find $out/libexec -type f -exec ${removeExpr removeReferences} '{}' + || true
Copy link
Member

@Mic92 Mic92 Aug 28, 2020

Choose a reason for hiding this comment

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

less noise:

find $out/{bin,libexec} -type f 2>/dev/null | xargs -r -n 1 ${removeExpr removeReferences} || true

@zowoq
Copy link
Contributor Author

zowoq commented Aug 28, 2020

I'd rather just revert it TBH as it isn't useful. Also it doesn't match buildGoModule.

@Mic92
Copy link
Member

Mic92 commented Aug 28, 2020

It's just noise in the build output of buildGoPackage, it would only be useful for 2 packages in total.

Two packages we are aware of. The issue I see that this silently breaks cross-compilation.
Have a look at #96538
It does not significantly increase the complexity of buildGoModule/buildGoPackage.

@zowoq zowoq closed this Aug 28, 2020
@zowoq zowoq deleted the go-remove-ref branch August 28, 2020 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants