!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

226 Members
74 Servers

Load older messages


SenderMessageTime
23 Nov 2024
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8) After spending too long debugging runtime oddities I tracked the issue back to bad symlinks.
Having read https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/make-symlinks-relative.sh, I made a setup hook which checks for broken (or reflexive) symlinks: https://github.com/ConnorBaker/cuda-packages/blob/main/upstreamable-packages/noBrokenSymlinksHook/no-broken-symlinks-hook.sh
Is there prior work for something similar?
This is also based on the assumption that broken or reflexive symlinks are symptoms of a packaging problem. Are there cases where they are intended?
08:57:48
@k900:0upti.meK900There are definitely situations10:22:26
@k900:0upti.meK900But not many10:22:27
@k900:0upti.meK900I actually wanted that in stdenv for a while now10:22:37
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8) I’d like to add the ability to detect cycles in references.
Additionally, I’d love to simplify the logging statements so I don’t have to prefix the strings with the name of the setup hook. Any ideas if that’s a thing?
19:53:57
24 Nov 2024
@rosscomputerguy:matrix.orgTristan Ross emily John Ericson Philip Taron (UTC-8) Randy Eckenrode & Artturin: have you guys seen this post (https://discourse.nixos.org/t/community-team-updates/56458) should we do a meeting to discuss things to add for a reply to the post or do we just want to message in here? 02:36:45
@emilazy:matrix.orgemily

p14: uh-oh.

clang-13: error: argument unused during compilation: '-nostdlibinc' [-Werror,-Wunused-command-line-argument]
03:28:29
@emilazy:matrix.orgemily
In reply to @rosscomputerguy:matrix.org
emily John Ericson Philip Taron (UTC-8) Randy Eckenrode & Artturin: have you guys seen this post (https://discourse.nixos.org/t/community-team-updates/56458) should we do a meeting to discuss things to add for a reply to the post or do we just want to message in here?
(I'm going to work on a reply for the Darwin team. not sure what there is to say re: stdenv for the most part)
03:34:52
@emilazy:matrix.orgemily
In reply to @rosscomputerguy:matrix.org
emily John Ericson Philip Taron (UTC-8) Randy Eckenrode & Artturin: have you guys seen this post (https://discourse.nixos.org/t/community-team-updates/56458) should we do a meeting to discuss things to add for a reply to the post or do we just want to message in here?
* (I'm going to work on a reply for the Darwin team (w/ Randy). not sure what there is to say re: stdenv for the most part)
03:35:20
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
(I'm going to work on a reply for the Darwin team (w/ Randy). not sure what there is to say re: stdenv for the most part)
Gotcha, yeah that's why I was asking before making a reply. We probably should discuss what to add for it.
03:36:08
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org

p14: uh-oh.

clang-13: error: argument unused during compilation: '-nostdlibinc' [-Werror,-Wunused-command-line-argument]
That error drives me crazy, especially when the extra arguments are out of your control.
06:17:30
@emilazy:matrix.orgemilyI think this might be a regression from the patch → wrapper change06:18:31
@p14:matrix.orgp14
In reply to @emilazy:matrix.org

p14: uh-oh.

clang-13: error: argument unused during compilation: '-nostdlibinc' [-Werror,-Wunused-command-line-argument]
How are you hitting this? Is there any other context I have missed other than your message?
11:44:37
@emilazy:matrix.orgemily irods on staging 11:44:55
@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.org@paparodeo:matrix.org 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.org@paparodeo:matrix.orgI 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

Show newer messages


Back to Room ListRoom Version: 9