Open nomeata opened 5 years ago
Looks like keyutils
is not able to build the static library.
krb5 has a conditional to disable keyutils
on bionic and llvm
https://github.com/NixOS/nixpkgs/blob/5ad0677aec2455e664992d93d063d5cb34a32e2f/pkgs/development/libraries/kerberos/krb5.nix#L44
We could either add a musl condition there, or apply cross-compilation tweaks to keyutils. (Gentoo seem to has this.)
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
I just needed keyutils
to get something else built statically. I managed to get it building with the following patch:
diff --git a/pkgs/os-specific/linux/keyutils/default.nix b/pkgs/os-specific/linux/keyutils/default.nix
index 553b0b87f41..1139fe5b5f4 100644
--- a/pkgs/os-specific/linux/keyutils/default.nix
+++ b/pkgs/os-specific/linux/keyutils/default.nix
@@ -23,10 +23,14 @@ stdenv.mkDerivation rec {
./conf-symlink.patch
];
+ postPatch = ''
+ sed -ie 's/\-shared/\-static/g' Makefile
+ '';
+
BUILDDATE = "1970-01-01";
outputs = [ "out" "lib" "dev" ];
- installFlags = [
+ makeFlags = [
"ETCDIR=$(out)/etc"
"BINDIR=$(out)/bin"
"SBINDIR=$(out)/sbin"
@@ -35,6 +39,8 @@ stdenv.mkDerivation rec {
"INCLUDEDIR=$(dev)/include"
"LIBDIR=$(lib)/lib"
"USRLIBDIR=$(lib)/lib"
+ "NO_ARLIB=0"
+ "NO_SOLIB=1"
];
meta = with stdenv.lib; {
I didn't do further research on this, however e.g. openssh
seems to break on pkgsStatic
as well.
@Ma27 You should open a PR with that patch (changes conditional on stdenv.targetPlatform.isStatic
)!
I marked this as stale due to inactivity. → More info
I tried to build a static version of
borgbackup
, but it failed:This is with
nixpkgs
revision 6cc7e33ac8ac7b255bd621e8fbfb29c1fd49966eIt is not super important to me, so if reports about a random package not building statically are not helpful at this point, feel free to just close this.