!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

230 Members
74 Servers

Load older messages


SenderMessageTime
24 Nov 2024
@emilazy:matrix.orgemilyno context, I'm just wondering if this is our first unexpected consequence of the patch :)11:45:08
@p14:matrix.orgp14I don’t understand how that can happen unless it is ending up as a link argument somehow and this is a problem.11:45:39
@emilazy:matrix.orgemilyit was during an autoconf thing I think. I forget already11:47:30
@emilazy:matrix.orgemilyit's probably the package being silly11:47:48
@p14:matrix.orgp14What is the minimal rebuild way of observing this issue? Also, are there logs somewhere?11:49:36
@emilazy:matrix.orgemilydug it up https://gist.github.com/emilazy/5453176c2e317b5d104b83bdefc910ae11:52:57
@emilazy:matrix.orgemily nix build github:NixOS/nixpkgs/staging#irods reproduces 11:54:09
@emilazy:matrix.orgemilybut of course has a lot of rebuilds11:54:13
@emilazy:matrix.orgemily it's nanodbc.override { stdenv = llvmPackages_13.libcxxStdenv; } I guess 11:57:02
@p14:matrix.orgp14
In reply to @emilazy:matrix.org
dug it up https://gist.github.com/emilazy/5453176c2e317b5d104b83bdefc910ae

Judging from the log, it's being passed to the linker, and the linker is rejecting it because of -Werror + unused commandline argument.

I think in addition to https://github.com/NixOS/nixpkgs/pull/356189, maybe we should have cc-cflags-compile, which just sends flags to the compiler invocation and not the linker?

14:47:18
@p14:matrix.orgp14
In reply to @emilazy:matrix.org
dug it up https://gist.github.com/emilazy/5453176c2e317b5d104b83bdefc910ae
*

Judging from the log, it's being passed to the linker, and the linker (link driver, i.e. clang) is rejecting it because of -Werror + unused commandline argument.

I think in addition to https://github.com/NixOS/nixpkgs/pull/356189, maybe we should have cc-cflags-compile, which just sends flags to the compiler invocation and not the linker?

14:48:05
@p14:matrix.orgp14 Otherwise, -Wno-error=no-unused-command-line-argument or --start-no-unused-arguments with --end-no-unused-arguments, but this was only introduced in clang 14: 50ec1306d060e46e0d53c9f5d8a052e1b0d10d3b 14:50:10
@paparodeo:matrix.orgreno it seems like a clang warning to me. clang hello.o -nostdlibinc generates a warning in unwrapped clang-13 and in the system clang on ubuntu (clang-14). seems like the package is just broken or expects to use a later clang 15:18:44
@p14:matrix.orgp14 Yes, when you do clang hello.o this is a link driver invocation (clang invokes the linker under the hood). The problem is then that the compiler is not being invoked; and it's the compiler which would consume the nostdlibinc flag. So the flag remains unused. 15:20:48
@p14:matrix.orgp14The problem is that we put nostdlibinc into the cc-cflags, and these flags go to both the linker and the compiler, with no way in nix currently to say that a flag should only go to the compiler invocation only.15:21:23
@paparodeo:matrix.orgrenoI see -- clang should consume unused compiler args if it ends up being a link only step, and it seems to on clang-19, but for whatever reason it is not for clang-13 / clang-14.15:39:37
@p14:matrix.orgp14Are you sure it's a compiler version difference and not a patched/unpatched difference? https://github.com/NixOS/nixpkgs/pull/356162/files#diff-7e3eb59be96c7378cf6880e19a4a800591680455a262eb5a5a083917ea67f8edL1015:45:26
@p14:matrix.orgp14The arg is claimed there.15:45:47
@p14:matrix.orgp14I just tried with clang 13 on nixos-unstable and don't see the warning behaviour (in wrapped clang).15:47:20
@p14:matrix.orgp14Not sure I understand why wrapping would make the warning go away15:47:36
@paparodeo:matrix.orgrenoI'm on staging15:47:40
@paparodeo:matrix.orgreno(happened to have both built)15:48:16
@paparodeo:matrix.orgreno https://github.com/llvm/llvm-project/blob/aafe934c0c0c1d274099228e7e47669770235284/clang/lib/Driver/Driver.cpp#L4131-L4137 should claim compile options for link stage. I am guessing that -nostdlibinc wasn't added to the correct group to get claimed until some change after clang-14 was released. 15:53:03
@p14:matrix.orgp14Good guess: https://github.com/llvm/llvm-project/commit/5b77e752dcd073846b89559d6c0e1a7699e5861515:54:17
@paparodeo:matrix.orgrenoI have an open PR that modifies that code, so was looking at it recently. https://github.com/llvm/llvm-project/pull/11647615:55:00
@emilazy:matrix.orgemilymaybe we can backport that19:22:19
@paparodeo:matrix.orgrenopatch applies to clang [14-16] will need to be adjusted for 12 & 13 due to failing to patch hunk 2 file 121:45:55
@paparodeo:matrix.orgreno
In reply to @emilazy:matrix.org
maybe we can backport that
backported with: https://github.com/NixOS/nixpkgs/pull/358836 currently building irods with patch. will mark as ready once completed.
22:40:59
@emilazy:matrix.orgemilysometimes it feels like we're backporting half the commits in LLVM to older versions22:43:03
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
sometimes it feels like we're backporting half the commits in LLVM to older versions
Well now it should be easier with the common stuff. Getting patches works nicely.
22:45:23

Show newer messages


Back to Room ListRoom Version: 9