Skip to content

vengi-tools: fix build on darwin#399609

Merged
emilazy merged 2 commits intoNixOS:masterfrom
booxter:vengi-tools-darwin
Apr 23, 2025
Merged

vengi-tools: fix build on darwin#399609
emilazy merged 2 commits intoNixOS:masterfrom
booxter:vengi-tools-darwin

Conversation

@booxter
Copy link
Contributor

@booxter booxter commented Apr 17, 2025

Also, move *.app bundles under /Applications/ directory.

Signed-off-by: Ihar Hrachyshka ihar.hrachyshka@gmail.com

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Apr 17, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 17, 2025
@nix-owners nix-owners bot requested a review from fgaz April 17, 2025 22:41
@booxter
Copy link
Contributor Author

booxter commented Apr 17, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 399609


x86_64-darwin

❌ 1 package failed to build:
  • vengi-tools

aarch64-darwin

✅ 1 package built:
  • vengi-tools

@booxter
Copy link
Contributor Author

booxter commented Apr 17, 2025

x86-64 build failure is an existing issue with darwin toolchain on 15.4:

[217/1028] Validate texture
FAILED: generated/shaders/render/TextureShader.h generated/shaders/render/TextureShader.cpp generated/shaders/render/TextureShaderConstants.h /tmp/nix-build-vengi-tools-0.0.35.d
rv-0/source/build/generated/shaders/render/TextureShader.h /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/TextureShader.cpp /tmp/nix-build-vengi-t
ools-0.0.35.drv-0/source/build/generated/shaders/render/TextureShaderConstants.h 
cd /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/src/modules/render && /nix/store/x9390krmrb55ymmxp9xclnyhprbdim49-cmake-3.31.6/bin/cmake -E env APP_HOMEPATH=/tmp/nix-bui
ld-vengi-tools-0.0.35.drv-0/source/build/src/modules/render/ LSAN_OPTIONS=exitcode=0 /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool -I /tmp/nix
-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders --shader /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders/texture --constantstemplate 
/tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderConstantsTemplate.h.in --headertemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shader
tool/ShaderTemplate.h.in --sourcetemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderTemplate.cpp.in --buffertemplate /tmp/nix-build-vengi-tools-0
.0.35.drv-0/source/src/tools/shadertool/UniformBufferTemplate.h.in --sourcedir /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/
dyld[53381]: Symbol not found: __ZTINSt3__117bad_function_callE
  Referenced from: <68068DCF-9C83-3402-BC24-6446165606F4> /private/tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool
  Expected in:     <F0AC1571-049A-3F10-BA96-5C6AD56E68C0> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Subprocess aborted
[218/1028] Validate color
FAILED: generated/shaders/render/ColorShader.h generated/shaders/render/ColorShader.cpp generated/shaders/render/ColorShaderConstants.h /tmp/nix-build-vengi-tools-0.0.35.drv-0/s
ource/build/generated/shaders/render/ColorShader.h /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/ColorShader.cpp /tmp/nix-build-vengi-tools-0.0.3
5.drv-0/source/build/generated/shaders/render/ColorShaderConstants.h 
cd /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/src/modules/render && /nix/store/x9390krmrb55ymmxp9xclnyhprbdim49-cmake-3.31.6/bin/cmake -E env APP_HOMEPATH=/tmp/nix-bui
ld-vengi-tools-0.0.35.drv-0/source/build/src/modules/render/ LSAN_OPTIONS=exitcode=0 /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool -I /tmp/nix
-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders --shader /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders/color --constantstemplate /t
mp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderConstantsTemplate.h.in --headertemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shaderto
ol/ShaderTemplate.h.in --sourcetemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderTemplate.cpp.in --buffertemplate /tmp/nix-build-vengi-tools-0.0
.35.drv-0/source/src/tools/shadertool/UniformBufferTemplate.h.in --sourcedir /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/
dyld[53165]: Symbol not found: __ZTINSt3__117bad_function_callE
  Referenced from: <68068DCF-9C83-3402-BC24-6446165606F4> /private/tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool
  Expected in:     <F0AC1571-049A-3F10-BA96-5C6AD56E68C0> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Subprocess aborted
[219/1028] Validate combine2
FAILED: generated/shaders/render/Combine2Shader.h generated/shaders/render/Combine2Shader.cpp generated/shaders/render/Combine2ShaderConstants.h /tmp/nix-build-vengi-tools-0.0.3
5.drv-0/source/build/generated/shaders/render/Combine2Shader.h /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/Combine2Shader.cpp /tmp/nix-build-ve
ngi-tools-0.0.35.drv-0/source/build/generated/shaders/render/Combine2ShaderConstants.h 
cd /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/src/modules/render && /nix/store/x9390krmrb55ymmxp9xclnyhprbdim49-cmake-3.31.6/bin/cmake -E env APP_HOMEPATH=/tmp/nix-bui
ld-vengi-tools-0.0.35.drv-0/source/build/src/modules/render/ LSAN_OPTIONS=exitcode=0 /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool -I /tmp/nix
-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders --shader /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders/combine2 --constantstemplate
 /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderConstantsTemplate.h.in --headertemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shade
rtool/ShaderTemplate.h.in --sourcetemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderTemplate.cpp.in --buffertemplate /tmp/nix-build-vengi-tools-
0.0.35.drv-0/source/src/tools/shadertool/UniformBufferTemplate.h.in --sourcedir /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/
dyld[53240]: Symbol not found: __ZTINSt3__117bad_function_callE
  Referenced from: <68068DCF-9C83-3402-BC24-6446165606F4> /private/tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool
  Expected in:     <F0AC1571-049A-3F10-BA96-5C6AD56E68C0> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Subprocess aborted
[220/1028] Validate convolution
FAILED: generated/shaders/render/ConvolutionShader.h generated/shaders/render/ConvolutionShader.cpp generated/shaders/render/ConvolutionShaderConstants.h /tmp/nix-build-vengi-to
ols-0.0.35.drv-0/source/build/generated/shaders/render/ConvolutionShader.h /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/ConvolutionShader.cpp /t
mp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/ConvolutionShaderConstants.h 
cd /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/src/modules/render && /nix/store/x9390krmrb55ymmxp9xclnyhprbdim49-cmake-3.31.6/bin/cmake -E env APP_HOMEPATH=/tmp/nix-bui
ld-vengi-tools-0.0.35.drv-0/source/build/src/modules/render/ LSAN_OPTIONS=exitcode=0 /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool -I /tmp/nix
-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders --shader /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/modules/render/shaders/convolution --constantstempl
ate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderConstantsTemplate.h.in --headertemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/sh
adertool/ShaderTemplate.h.in --sourcetemplate /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/src/tools/shadertool/ShaderTemplate.cpp.in --buffertemplate /tmp/nix-build-vengi-too
ls-0.0.35.drv-0/source/src/tools/shadertool/UniformBufferTemplate.h.in --sourcedir /tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/generated/shaders/render/
dyld[53309]: Symbol not found: __ZTINSt3__117bad_function_callE
  Referenced from: <68068DCF-9C83-3402-BC24-6446165606F4> /private/tmp/nix-build-vengi-tools-0.0.35.drv-0/source/build/shadertool/vengi-shadertool
  Expected in:     <F0AC1571-049A-3F10-BA96-5C6AD56E68C0> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Subprocess aborted
[221/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/MaterialColor.cpp.o
[222/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/SurfaceExtractor.cpp.o
[223/1028] Building CXX object src/modules/palette/CMakeFiles/palette.dir/private/PixeloramaPalette.cpp.o
[224/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/Face.cpp.o
[225/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/private/MarchingCubesSurfaceExtractor.cpp.o
[226/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/Mesh.cpp.o
[227/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/private/CubicSurfaceExtractor.cpp.o
[228/1028] Building CXX object src/modules/voxel/CMakeFiles/voxel.dir/MeshState.cpp.o
ninja: build stopped: subcommand failed.

@fgaz
Copy link
Member

fgaz commented Apr 18, 2025

x86-64 build failure is an existing issue with darwin toolchain on 15.4:

is this something that will be fixed in the toolchain, or should we mark this as broken for x86_64-darwin?

@booxter
Copy link
Contributor Author

booxter commented Apr 18, 2025

@fgaz this is being worked on in #398727 I believe.

@booxter booxter force-pushed the vengi-tools-darwin branch from 6b02301 to 02555a0 Compare April 18, 2025 15:07
@booxter booxter marked this pull request as draft April 18, 2025 15:25
Also, move *.app bundles under /Applications/ directory.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
@booxter booxter force-pushed the vengi-tools-darwin branch from 02555a0 to 3a2b22a Compare April 18, 2025 15:30
@booxter
Copy link
Contributor Author

booxter commented Apr 18, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 399609


x86_64-linux

❌ 1 package failed to build:
  • vengi-tools

aarch64-linux

✅ 1 package built:
  • vengi-tools

x86_64-darwin

❌ 1 package failed to build:
  • vengi-tools

aarch64-darwin

✅ 1 package built:
  • vengi-tools

It's a CLI tool and so should be available outside of an .app bundle.
This also fixes passthru.tests on darwin.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
@booxter
Copy link
Contributor Author

booxter commented Apr 18, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 399609


aarch64-linux

✅ 1 package built:
  • vengi-tools

x86_64-darwin

❌ 1 package failed to build:
  • vengi-tools

aarch64-darwin

✅ 1 package built:
  • vengi-tools

@booxter booxter marked this pull request as ready for review April 18, 2025 21:17
@booxter booxter requested a review from fgaz April 18, 2025 21:18
@booxter
Copy link
Contributor Author

booxter commented Apr 19, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 399609


x86_64-linux

✅ 1 package built:
  • vengi-tools

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge this to unblock Darwin deprecations for the 25.11 freeze deadline; hope you don’t mind, @fgaz!

Comment on lines +47 to +49
# Disable code signing on macOS
substituteInPlace cmake/macros.cmake --replace-fail "codesign" "true"
substituteInPlace cmake/system/apple.cmake --replace-fail "if(APPLE)" "if(false)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, adding sigtool to the nativeBuildInputs may suffice.

Comment on lines +51 to +52
# calls otool -L on /usr/lib/libSystem.B.dylib and fails because it doesn't exist
substituteInPlace cmake/applebundle.cmake --replace-fail 'fixup_bundle("''${TARGET_BUNDLE_DIR}" "" "")' ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a CMake bug we can hopefully fix for 25.11, but other packages are already working around it, so this seems fine.

@emilazy emilazy merged commit e9069b1 into NixOS:master Apr 23, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants