-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
libtool,libtool_1_5: don't fix libtool #180018
Conversation
For the same reason we disable shebang patching in these derivations, we want to disable the patching of libtool scripts stdenv does. Otherwise, libtool will install scripts into other packages that are already "fixed", but for the environment libtool was built in. These scripts won't be fixed properly by stdenv anymore, because it will think they were already fixed. This fixes the build of pkgsStatic.libwebp, which was failing because its libtool script wasn't being patched properly. Another problem "fixing" the scripts in the libtool package would cause is that package tarballs generated on NixOS would contain libtool scripts that didn't make sense on other distros. I've tested this change by building pkgsStatic.libwebp, which now works, as well as by testing the build of the bootstrap files for mips64el to make sure that didn't regress from 97c4382 ("fixLibtool(): patch ./configure, add `file` to common-path.nix").
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.
as well as by testing the build of the bootstrap files and Nix for mips64el to make sure that didn't regress from 97c4382 ("fixLibtool(): patch ./configure, add file to common-path.nix").
Thanks for checking this.
97c4382 is only needed for dealing with packages that vendor pieces of libtool older than 1.4.7 (which is still a lot of software). So it is definitely safe to disable it for libtool 1.5.
I'm re-running the mips64el bootstrap with this commit. It will take a day or two to finish but I don't expect any problems.
@amjoseph-nixpkgs, we good to go? :) |
I think so. My build has not finished, but I don't want to hold things up here. All of my mipsen are busy doing builds based on #180223 right now. That PR will commit a bootstrap-files hash for mips64el which does not include this PR. So if this PR causes problems (very unlikely) dealing with it won't require a new bootstrap-files. I think this PR should merge. |
Interesting, the description and changes make sense. Indeed it seems like a good idea to not 'fix' the scripts at the wrong point in time 😄. (I should try out 'cross-compiling' from x86_64 to x86_64 sometime, I remember it was failing before and rereading the commit that caused this fixup reminds me that it should be fixed) |
I have a bit more time now and was able to look at this more closely than "won't break anything"...
Just to be clear, the problematic "fixing" you refer to is 97c4382 has no effect on libtool>=2.4.7; it's a no-op. When it does have an effect, that effect is independent of the build environment. If I overlooked the case of |
Happily, libtool 1.5 is actually too old to have the Older versions of libtool like libtool-1.5 don't try to be clever and detect the linker flags; they just let the linker decide. This is exactly what we want. Since nixpkgs builds a separate linker binary for each target instead of trying to share a linker for multiple targets, our linkers always have enough information to make the correct choice. So, retroactively,
We good. :) |
Description of changes
For the same reason we disable shebang patching in these derivations, we want to disable the patching of libtool scripts stdenv does.
Otherwise, libtool will install scripts into other packages that are already "fixed", but for the environment libtool was built in. These scripts won't be fixed properly by stdenv anymore, because it will think they were already fixed.
This fixes the build of
pkgsStatic.libwebp
, which was failing because its libtool script wasn't being patched properly.Another problem "fixing" the scripts in the libtool package would cause is that package tarballs generated on NixOS would contain libtool scripts that didn't make sense on other distros.
I've tested this change by building
pkgsStatic.libwebp
, which now works, as well as by testing the build of the bootstrap files and Nix for mips64el to make sure that didn't regress from 97c4382 ("fixLibtool(): patch ./configure, addfile
to common-path.nix").Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notescc @amjoseph-nixpkgs