rav1e: fix build with updated Darwin stdenv#234868
Conversation
The updated Darwin stdenv uses `llvm-strip`, but that causes issues for rav1e when using NASM and linking it with the cctools ld64. Stripping the debug information instead of everything fixes the problem.
|
Is there a way to override stdenv with another cctools to test this? |
|
rav1e was updated recently, so I’m going to test to see whether this fix is still necessary. I’m not able to reproduce using the following. The build succeeds. Note: Using a newer LLVM is required because the older one uses the |
|
I think this override is still not working, I put a This is on |
|
I have a build running against my clang 16 branch. If it fails there, I’ll try to find an override that properly includes |
|
Actually, rav1e uses |
toonn
left a comment
There was a problem hiding this comment.
Ah, that was key. Now I get a build failure on 9bb343d628ba (HEAD, upstream/master) Merge pull request #237548 from rnhmjoj/pr-fix-rel.
> nix-build --no-out-link --pure -E 'let ps = (import ./. {}); stdenvCCtools = ps.overrideCC ps.stdenv (ps.stdenv.cc.override { bintools = ps.stdenv.cc.bintools.override { bintools = ps.stdenv.cc.bintools.bintools.override { cctools = ps.darwin.cctools-llvm.override { llvmPackages = ps.llvmPackages_15; }; }; }; libc = ps.darwin.Libsystem; }); in ps.rav1e.override { stdenv = stdenvCCtools; rustPlatform = ps.makeRustPlatform (ps.rustPackages.buildRustPackages // { stdenv = stdenvCCtools; }); }'
[...]
> = note: ld: in /private/tmp/nix-build-rav1e-0.6.6.drv-0/rustcGil0X1/l
ibrav1e-c6b855765ab5a133.rlib(cdef_avx2.o), in section __TEXT,__text reloc 36: s
ymbol index out of range for architecture x86_64
> clang-11: error: linker command failed with exit code 1 (use
-v to see invocation)
>
>
> error: could not compile `rav1e` due to previous error
For full logs, run 'nix log /nix/store/b4nxhwhn82gzdzrjf256gag7hg7inlsn-r
av1e-0.6.6.drv'.
And it works with this PR cherry-picked.
Does this need to target staging? I'm not quite sure because OfBorg failed so there's no label. I'm running a nixpkgs-review to check now.
Running @ofborg eval |
|
Linux is showing 473 updates when I run I’d been using 500+ rebuilds as my threshold for staging versus master. If that’s too low, I can retarget. |
toonn
left a comment
There was a problem hiding this comment.
Definitely should go to staging.
LGTM
This is a similar issue to NixOS#234868, but it crashes instead of failing to link. The same fix applies (using `-S` instead of `-x` with `llvm-strip`).
Description of changes
The updated Darwin stdenv uses
llvm-strip, but that causes issues for rav1e when using NASM and linking it with the cctools ld64. Stripping the debug information instead of everything fixes the problem.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)