-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
bash: don't install loadables dir for static build #270975
base: staging
Are you sure you want to change the base?
Conversation
76340af
to
1663ed9
Compare
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.
This looks good to me. I can reproduce the reported non-reproducibility. It disappears with this change applied. All made changes make sense to me. The comments are clear.
infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) | ||
-( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) | ||
-( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) | ||
+ifeq (,$(findstring -static,$(STATIC_LD))) |
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.
Can you try upstreaming this, too?
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.
Sure, I can give it a shot.
1663ed9
to
399a9b7
Compare
399a9b7
to
f679aa0
Compare
The dynamic build ships a bunch of sample loadable builtins and installs them to `$out/lib/bash`. When building statically with musl, the target fails as it cannot produce any of the dynamically linked loadable builtins. Although the failure is not fatal, it also introduces an impurity due to the heavy parallelization: _sometimes_ the files `loadables.h` and `Makefile.sample` end up in `$out/lib/bash` depending on how fast the compilation of the loadable builtins fails. Try the following to reproduce the issue: nix build --rebuild --cores 48 nixpkgs#pkgsStatic.bash This commit skips building and installing the loadable builtins altogether if building statically.
f679aa0
to
12c4c49
Compare
Awesome, thanks! I'd like to wait a little bit to see what upstream says, in case we can avoid carrying the patch. |
The dynamic build ships a bunch of sample loadable builtins and installs them to
$out/lib/bash
. When building statically with musl, the target fails as it cannot produce any of the dynamically linked loadable builtins.Although the failure is not fatal, it also introduces an impurity due to the heavy parallelization: sometimes the files
loadables.h
andMakefile.sample
end up in$out/lib/bash
depending on how fast the compilation of the loadable builtins fails. Try the following to reproduce the issue:This commit skips building and installing the loadable builtins altogether if building statically.
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Priorities
Add a 👍 reaction to pull requests you find important.