Skip to content

ispc: unbreak on darwin#458797

Merged
alexfmpe merged 2 commits intoNixOS:masterfrom
yzx9:ispc-darwin
Nov 11, 2025
Merged

ispc: unbreak on darwin#458797
alexfmpe merged 2 commits intoNixOS:masterfrom
yzx9:ispc-darwin

Conversation

@yzx9
Copy link
Contributor

@yzx9 yzx9 commented Nov 5, 2025

ispc was broken on darwin for a month:

error:

/private/tmp/nix-build-ispc-1.28.2.drv-0/source/src/util.cpp:50:11: error: exception specification in declaration does not match previous declaration
   50 | void std::__libcpp_verbose_abort(char const *format, ...)
      |           ^
/nix/store/1h3bqrd2kvj4afq9xkaxvx4skdnfbql2-libcxx-19.1.2+apple-sdk-15.5/include/c++/v1/__verbose_abort:24:49: note: previous declaration is here
   24 | _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...);
      |                                                 ^
1 error generated.

ZHF: #457852

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Nov 5, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 5, 2025
@nix-owners nix-owners bot requested a review from athas November 5, 2025 11:52
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Nov 5, 2025
@yzx9

This comment was marked as outdated.

@iedame
Copy link
Contributor

iedame commented Nov 5, 2025

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 458797
Commit: 699551b88170f4fd0c10ed8b7e957198094a7a48 (subsequent changes)
Merge: fa80d6f8251a5581ebcdfa00cbb706fa7f673657

Logs: https://github.com/iedame/nixpkgs-review-gha/actions/runs/19101402300


x86_64-linux

No rebuilds


aarch64-linux

No rebuilds


x86_64-darwin (sandbox = relaxed)

❌ 12 packages failed to build:
  • embree
  • f3d
  • ispc
  • meshlab
  • openimagedenoise
  • openusd
  • python312Packages.f3d
  • python312Packages.openusd
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • python313Packages.f3d
  • python313Packages.openusd
  • rbdoom-3-bfg

Error logs: `x86_64-darwin`
ispc
PASSRATE (1565/1567) = 99% 

1565 / 1576 tests PASSED
2 / 1576 tests FAILED compilation
./tests/func-tests/round-float16-uniform.ispc
./tests/func-tests/round-float16-varying.ispc
0 / 1576 tests FAILED execution
9 / 1576 tests SKIPPED
./tests/func-tests/select-short-vec-func.ispc
./tests/func-tests/transcendentals-10-0.ispc
./tests/func-tests/transcendentals-sincos-uniform-float16.ispc
./tests/func-tests/transcendentals-sincos-uniform.ispc
./tests/func-tests/transcendentals-sincos-varying-float16.ispc
./tests/func-tests/transcendentals-sincos-varying.ispc
./tests/func-tests/xe-task-count.ispc
./tests/func-tests/xe-task-index-1.ispc
./tests/func-tests/xe-task-index.ispc
NEW COMPFAILS:
./tests/func-tests/round-float16-uniform.ispc
./tests/func-tests/round-float16-varying.ispc


aarch64-darwin (sandbox = relaxed)

❌ 7 packages failed to build:
  • f3d
  • meshlab
  • openusd
  • python312Packages.f3d
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • python313Packages.f3d
  • rbdoom-3-bfg
✅ 5 packages built:
  • embree
  • ispc
  • openimagedenoise
  • python312Packages.openusd
  • python313Packages.openusd

Error logs: `aarch64-darwin`
meshlab
patching file src/external/levmar.cmake
patching file src/external/lib3mf.cmake
patching file src/external/libigl.cmake
patching file src/external/nexus.cmake
patching file src/CMakeLists.txt
patching file src/Config.cmake.in
patching file src/common/CMakeLists.txt
patching file src/meshlabplugins/io_base/CMakeLists.txt
applying patch /nix/store/cr374x9wf7qpfvwkjddf8kpjrmjcc2dh-no-plist.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- src/meshlab/CMakeLists.txt.orig	2025-10-05 23:04:12.786192073 +0200
|+++ src/meshlab/CMakeLists.txt	2025-10-05 23:04:16.379256637 +0200
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
rbdoom-3-bfg
[ 13%] Building CXX object extern/nvrhi/CMakeFiles/nvrhi_vk.dir/src/vulkan/vulkan-shader.cpp.o
[ 13%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Polynomial.cpp.o
[ 13%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Quat.cpp.o
[ 14%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Rotation.cpp.o
[ 14%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Simd.cpp.o
[ 14%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Simd_Generic.cpp.o
[ 14%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Simd_SSE.cpp.o
[ 14%] Building CXX object idlib/CMakeFiles/idlib.dir/math/VecX.cpp.o
[ 14%] Building CXX object idlib/CMakeFiles/idlib.dir/math/Vector.cpp.o
[ 15%] Building CXX object idlib/CMakeFiles/idlib.dir/sys/sys_assert.cpp.o
[ 15%] Building CXX object idlib/CMakeFiles/idlib.dir/sys/posix/posix_thread.cpp.o
[ 15%] Building CXX object extern/nvrhi/CMakeFiles/nvrhi_vk.dir/src/vulkan/vulkan-staging-texture.cpp.o
[ 16%] Building CXX object extern/nvrhi/CMakeFiles/nvrhi_vk.dir/src/vulkan/vulkan-state-tracking.cpp.o
[ 16%] Linking CXX static library libidlib.a
[ 16%] Built target idlib
[ 16%] Building CXX object extern/nvrhi/CMakeFiles/nvrhi_vk.dir/src/vulkan/vulkan-texture.cpp.o
[ 16%] Building CXX object extern/nvrhi/CMakeFiles/nvrhi_vk.dir/src/vulkan/vulkan-upload.cpp.o
[ 16%] Linking CXX static library libnvrhi_vk.a
[ 16%] Built target nvrhi_vk
make: *** [Makefile:136: all] Error 2

@yzx9
Copy link
Contributor Author

yzx9 commented Nov 5, 2025

Failures on aarch64-darwin are unrelated to this PR, while the x86_64-darwin error looks weird. Maybe we should mark x86_64-darwin again and wait for someone interested in investigating it, since I’m unable to fix it as I don’t have an x86_64-darwin device.

@alexfmpe
Copy link
Member

alexfmpe commented Nov 5, 2025

Do we know why we need to workaround this way? #445934 had no issue so maybe an update of some dep hit an edge case and we exposed an upstream bug.
I'm running a bisect to try to find the nixpkgs commit that broke this.

I don’t have an x86_64-darwin device.

With Rosetta you can do nix-build -A ispc --argstr system "x86_64-darwin" to have build/host be treated as x86_64-darwin, which will also run tests

@yzx9
Copy link
Contributor Author

yzx9 commented Nov 6, 2025

I would suspect that #407738, which changed the default LLVM from 19 to 21, might be the cause.

Update: I can now confirm it's related — the build works fine with LLVM 19 without any patches. I suspect this is due to an LLVM version mismatch: the build uses libcxx 19 (from darwin stdenv), while LLVM 21 is provided as a runtime dependency.

@yzx9
Copy link
Contributor Author

yzx9 commented Nov 6, 2025

@alexfmpe Thanks for your help! I've built it with Rosetta. Here’s the error message on x86_64-darwin:

> nix log /nix/store/kyl4kf4zi6la53g6b602abj13xmy661b-ispc-1.28.2.drv | grep ".ispc failed" -B2 -A5
Running:  ./tests/func-tests/ptr-null-func-arg.ispc.run
Running: /nix/var/nix/builds/nix-34069-4230430288/source/build/bin/ispc  -I /nix/var/nix/builds/nix-34069-4230430288/source/tests --pic --woff /nix/var/nix/builds/nix-34069-4230430288/source/tests/func-tests/1546.ispc -o ./tests/func-tests/1546.ispc.o --arch=x86-64 --target=sse2-i32x4 -DTEST_SIG=1 -O2 -h /nix/var/nix/builds/nix-34069-4230430288/source/tests/func-tests/1546.ispc.h
Compilation of test ./tests/func-tests/round-float16-uniform.ispc failed            
Undefined symbols for architecture x86_64:
  "_roundevenf", referenced from:
      _f_f___un_3C_unf_3E_un_3C_unf_3E_ in round-float16-uniform.ispc.o
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
--
Running: clang++ -O2 -I tests/ -m64 tests/test_static.cpp -DTEST_SIG=0 -DTEST_WIDTH=4 ./tests/func-tests/test-23.ispc.o -o ./tests/func-tests/test-23.ispc.run -fPIE -DTEST_HEADER="</nix/var/nix/builds/nix-34069-4230430288/source/tests/func-tests/test-23.ispc.h>"
Running: /nix/var/nix/builds/nix-34069-4230430288/source/build/bin/ispc  -I /nix/var/nix/builds/nix-34069-4230430288/source/tests --pic --woff /nix/var/nix/builds/nix-34069-4230430288/source/tests/func-tests/struct-forward-decl.ispc -o ./tests/func-tests/struct-forward-decl.ispc.o --arch=x86-64 --target=sse2-i32x4 -DTEST_SIG=1 -O2 -h /nix/var/nix/builds/nix-34069-4230430288/source/tests/func-tests/struct-forward-decl.ispc.h
Compilation of test ./tests/func-tests/round-float16-varying.ispc failed            
Undefined symbols for architecture x86_64:
  "_roundevenf", referenced from:
      _f_f___un_3C_unf_3E_un_3C_unf_3E_ in round-float16-varying.ispc.o
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

I also tried switching to LLVM 19, but that didn’t fix the issue on x86_64-darwin. I found a similar issue (ispc/ispc#3529), so we might be able to just skip these tests on x86_64-darwin.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 11, 2025
@yzx9 yzx9 added the 0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign label Nov 11, 2025
@alexfmpe alexfmpe added this pull request to the merge queue Nov 11, 2025
Merged via the queue into NixOS:master with commit 5590334 Nov 11, 2025
28 of 31 checks passed
@yzx9 yzx9 deleted the ispc-darwin branch November 11, 2025 12:56
hatch01 pushed a commit to hatch01/nixpkgs that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants