Open 573 opened 3 years ago
Related to https://github.com/curl/curl/issues/4564: patch selection needs more work than just disabling (failing patch):
building '/nix/store/n1bmsiw0y8ppljlzypjri7627qkq93pw-patched-nixpkgs.drv'... Applying patch /nix/store/5x5kk7h2pwr8x1d8svgpph8xhsd905jz-nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch patching file pkgs/development/libraries/openssl/default.nix Hunk #1 succeeded at 50 (offset 16 lines). Hunk #2 FAILED at 85. Hunk #3 FAILED at 116. Hunk #4 FAILED at 130. 3 out of 4 hunks FAILED -- saving rejects to file pkgs/development/libraries/openssl/default.nix.rej builder for '/nix/store/n1bmsiw0y8ppljlzypjri7627qkq93pw-patched-nixpkgs.drv' failed with exit code 1 error: build of '/nix/store/n1bmsiw0y8ppljlzypjri7627qkq93pw-patched-nixpkgs.drv' failed
nixpkgs faf5bbb6bf1a9e86b22cd45aecec339d4ade49bc: nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch updated.
Now with the patch inplace I get another patching error.
patching file pkgs/development/tools/misc/gdb/default.nix Hunk #1 FAILED at 26.
l. 112 syntax error in patched openssl/default.nix (illegal second +
). Fixed by https://github.com/nix-things-mobile/postgrest/commit/c06e5a11ffdb5c2c91326fcb14eb321adbf13c82
WIP:
CCLD libcurl.la /nix/store/30kg865p8ixsvblqypmfwzvqx72fglws-binutils-2.35.1/bin/ld: /nix/store/58nhrq3awcjdm6dj287b3hrd2n1s7kjg-libkrb5-1.18/lib/libkrb5.a(prompter.o): warning: relocation against
stdout' in read-only section
.text' /nix/store/30kg865p8ixsvblqypmfwzvqx72fglws-binutils-2.35.1/bin/ld: /nix/store/58nhrq3awcjdm6dj287b3hrd2n1s7kjg-libkrb5-1.18/lib/libgssapi_krb5.a(util_errmap.o): relocation R_X86_64_PC32 against symbol `stderr' can not be used when making a shared object; recompile with -fPIC /nix/store/30kg865p8ixsvblqypmfwzvqx72fglws-binutils-2.35.1/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: [Makefile:1537: libcurl.la] Error 1 make[2]: Leaving directory '/build/curl-7.76.1/lib' make[1]: [Makefile:1346: all] Error 2 make[1]: Leaving directory '/build/curl-7.76.1/lib' make: *** [Makefile:1255: all-recursive] Error 1
I. e.
NO_SHARED = !enableShared; actually, it is also needed to prevent
/nix/store/394p75bacqaiv0xvyna0kazf2lg16sjs-x86_64-unknown-linux-musl-binutils-2.31.1/bin/x86_64-unknown-linux-musl-ld: /nix/store/cmrar1sgj5jpr9h1ypf3s6sbphaxp8zk-x86_64-unknown-linux-musl-stage-final-gfortran-debug-9.2.0/lib/gcc/x86_64-unknown-linux-musl/9.2.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object /nix/store/394p75bacqaiv0xvyna0kazf2lg16sjs-x86_64-unknown-linux-musl-binutils-2.31.1/bin/x86_64-unknown-linux-musl-ld: /nix/store/cmrar1sgj5jpr9h1ypf3s6sbphaxp8zk-x86_64-unknown-linux-musl-stage-final-gfortran-debug-9.2.0/lib/gcc/x86_64-unknown-linux-musl/9.2.0/crtend.o: relocation R_X86_64_32 against `.ctors' can not be used when making a shared object; recompile with -fPIC /nix/store/394p75bacqaiv0xvyna0kazf2lg16sjs-x86_64-unknown-linux-musl-binutils-2.31.1/bin/x86_64-unknown-linux-musl-ld: final link failed: nonrepresentable section on output
_Originally posted by @FRidh in https://github.com/NixOS/nixpkgs/pull/76832#discussion_r362755838_
~DONT Try this patch~:
diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix
index ebec5936b54..9d430bfa047 100644
--- a/pkgs/development/libraries/kerberos/krb5.nix
+++ b/pkgs/development/libraries/kerberos/krb5.nix
@@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
# krb5's ./configure does not allow passing --enable-shared and --enable-static at the same time.
# See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737
++ optional staticOnly [ "--enable-static" "--disable-shared" ]
+ ++ optional (!staticOnly) [ "--disable-static" "--enable-shared" ]
++ optional stdenv.isFreeBSD ''WARN_CFLAGS=""''
++ optionals (stdenv.buildPlatform != stdenv.hostPlatform)
[ "krb5_cv_attr_constructor_destructor=yes,yes"
Does not fix it.
TODO Are the patches applied in any case ?
Maybe stdenv.hostPlatform.isMusl
is too narrow ?
Description of issue
excerpt, full log here:
(Steps to reproduce: Include a minimal SQL definition plus how you make the request to PostgREST and the response body) Checkout upgrade branch (some patches disabled f.) and run
nix-build -A postgrestStatic
.