!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

265 Members
82 Servers

Load older messages


SenderMessageTime
11 Aug 2023
@tpw_rules:matrix.orgtpw_rulescp itself also prints "invalid argument" and returns nonzero16:17:47
@tpw_rules:matrix.orgtpw_rulesah, this was caused by the coreutils 9.3 upgrade likely16:21:15
@tpw_rules:matrix.orgtpw_rulesthat's kind of awkard...16:23:21
13 Aug 2023
@10leej:matrix.orgnevoyu joined the room.01:27:28
15 Aug 2023
@cafkafk:nixos.devChristina Sørensen changed their profile picture.14:57:25
@10leej:matrix.orgnevoyu left the room.19:34:39
17 Aug 2023
@lxsameer:matrix.orglxsameer joined the room.11:57:33
22 Aug 2023
@charlotte:vanpetegem.mechvp changed their profile picture.13:06:48
27 Aug 2023
@abose:matrix.orgcatch22 joined the room.22:08:35
29 Aug 2023
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/25185319:05:05
3 Sep 2023
@p14:matrix.orgp14

I would like to address https://github.com/NixOS/nixpkgs/issues/111010#issuecomment-1536424163 but it will require changing the cc-wrapper.

[fix is to account for$NIX_CFLAGS_LINK when computing the link type].

Anyone see any problems with doing so, or any suggestions on implementation, can I submit a fix to staging?

09:45:32
@rick:matrix.ciphernetics.nlMindaviOne way to find out if it gives problems, go for it10:49:15
@p14:matrix.orgp14Doing a local build with an obvious fix before I send it, let's see how that pans out.10:49:39
@p14:matrix.orgp14
diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh
index 9dcd29c64431..fbc62144ab3f 100644
--- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh
+++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh
@@ -30,7 +30,7 @@ cxxInclude=1
 cxxLibrary=1
 cInclude=1
 
-expandResponseParams "$@"
+expandResponseParams "$@" ${NIX_CFLAGS_LINK_@suffixSalt@:-}
 linkType=$(checkLinkType "${params[@]}")
 
 declare -ag positionalArgs=()

In case anyone has suggestions/criticisms. I should have a build of some nontrivial software within an hour or two.

10:50:55
@p14:matrix.orgp14 Darn, that doesn't seem to be right. Should I be putting NIX_CFLAGS_LINK there rather than NIX_CFLAGS_LINK_@suffixSalt@, or possibly even both? 11:03:19
@p14:matrix.orgp14I guess that's also not right because we don't want to inject the link flags into the params so early anyway (even if it might be nice to have the CFLAGS_LINK response-expanded...11:06:46
@p14:matrix.orgp14Candidate fix. I've been able to build/run pkgsStatic.pkgsLLVM.hello using this (on staging, also using LLVM 16) https://github.com/NixOS/nixpkgs/pull/25311612:54:32
@p14:matrix.orgp14 Artturin: I also tried building pkgsStatic.pkgsLLVM.clang.cc -- for this I hit the error message you described in https://github.com/NixOS/nixpkgs/issues/22060 ( file RPATH_CHANGE could not write new RPATH:) while installing llvm. 12:55:49
@p14:matrix.orgp14 * Artturin: I also tried building pkgsStatic.pkgsLLVM.clang.cc -- for this I hit the error message you described in https://github.com/NixOS/nixpkgs/issues/22060 ( file RPATH_CHANGE could not write new RPATH:) while in the ninja install phase of llvm. 12:56:00
@p14:matrix.orgp14Is there any testing machinery someone can run #253116 through, is it possible to have a hydra job for it?12:57:51
@artturin:matrix.orgArtturin Running nix build -f tests.cc-wrapper 13:07:16
@artturin:matrix.orgArtturin* Im running nix build -f tests.cc-wrapper13:07:48
@artturin:matrix.orgArtturin* Im running `nix build -f tests.cc-wrapper`13:07:59
@artturin:matrix.orgArtturinit built14:28:22
@p14:matrix.orgp14Artturin: What next? Any opinion as to whether it may go into staging?14:31:08
@p14:matrix.orgp14
In reply to @p14:matrix.org
Artturin: I also tried building pkgsStatic.pkgsLLVM.clang.cc -- for this I hit the error message you described in https://github.com/NixOS/nixpkgs/issues/22060 ( file RPATH_CHANGE could not write new RPATH:) while in the ninja install phase of llvm.
For this it seems I want to set -DCMAKE_SKIP_INSTALL_RPATH=On to avoid the cmake error. Would it make sense to inhibit this in general with the static build stdenv adaptor?
15:29:31
@p14:matrix.orgp14 Hmm, it's not clear where to put such logic. Essentially "if we're building static binaries, we don't have an rpath and we don't want cmake to do rpath manipulation". Feels like it could go into makeStaticBinaries. 15:37:36
@p14:matrix.orgp14Success, I was able to build pkgsStatic.pkgsLLVM.clang.cc, and it also appears to work.15:58:26
@p14:matrix.orgp14

Needed this to fix cmake builds though, does it seem reasonable?

diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index f29bdf671c8c..dbc80e6bfbe0 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -64,8 +64,9 @@ rec {
         configureFlags = (finalAttrs.configureFlags or []) ++ [
-            "--disable-shared" # brrr...
-          ];
+          "--disable-shared" # brrr...
+        ];
+        cmakeFlags = (finalAttrs.cmakeFlags or []) ++ ["-DCMAKE_SKIP_INSTALL_RPATH=On"];
       }));
     } // lib.optionalAttrs (stdenv0.hostPlatform.libc == "glibc") {

15:59:30
@artturin:matrix.orgArtturin
In reply to @p14:matrix.org

Needed this to fix cmake builds though, does it seem reasonable?

diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index f29bdf671c8c..dbc80e6bfbe0 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -64,8 +64,9 @@ rec {
         configureFlags = (finalAttrs.configureFlags or []) ++ [
-            "--disable-shared" # brrr...
-          ];
+          "--disable-shared" # brrr...
+        ];
+        cmakeFlags = (finalAttrs.cmakeFlags or []) ++ ["-DCMAKE_SKIP_INSTALL_RPATH=On"];
       }));
     } // lib.optionalAttrs (stdenv0.hostPlatform.libc == "glibc") {

superficially ok but put it in a separate PR
16:11:25

Show newer messages


Back to Room ListRoom Version: 9