Nixpkgs Stdenv | 226 Members | |
| 74 Servers |
| Sender | Message | Time |
|---|---|---|
| 23 Nov 2024 | ||
| 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 | |
| There are definitely situations | 10:22:26 | |
| But not many | 10:22:27 | |
| I actually wanted that in stdenv for a while now | 10:22:37 | |
| 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 | ||
| 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 | |
| p14: uh-oh.
| 03:28:29 | |
In reply to @rosscomputerguy:matrix.org(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 | |
In reply to @rosscomputerguy: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) | 03:35:20 | |
In reply to @emilazy:matrix.orgGotcha, yeah that's why I was asking before making a reply. We probably should discuss what to add for it. | 03:36:08 | |
In reply to @emilazy:matrix.orgThat error drives me crazy, especially when the extra arguments are out of your control. | 06:17:30 | |
| I think this might be a regression from the patch → wrapper change | 06:18:31 | |
In reply to @emilazy:matrix.orgHow are you hitting this? Is there any other context I have missed other than your message? | 11:44:37 | |
irods on staging | 11:44:55 | |
| no context, I'm just wondering if this is our first unexpected consequence of the patch :) | 11:45:08 | |
| I 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 | |
| it was during an autoconf thing I think. I forget already | 11:47:30 | |
| it's probably the package being silly | 11:47:48 | |
| What is the minimal rebuild way of observing this issue? Also, are there logs somewhere? | 11:49:36 | |
| dug it up https://gist.github.com/emilazy/5453176c2e317b5d104b83bdefc910ae | 11:52:57 | |
nix build github:NixOS/nixpkgs/staging#irods reproduces | 11:54:09 | |
| but of course has a lot of rebuilds | 11:54:13 | |
it's nanodbc.override { stdenv = llvmPackages_13.libcxxStdenv; } I guess | 11:57:02 | |
In reply to @emilazy:matrix.org 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 | |
In reply to @emilazy:matrix.org* 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 | |
| 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 | |
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 | |
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 | |
| The 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 | |
| I 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 | |