DNZHRecomp icon indicating copy to clipboard operation
DNZHRecomp copied to clipboard

Unable to build on macOS

Open eisnerguy1 opened this issue 3 months ago • 1 comments

So, I followed the build instructions and I'm getting an error on macOS 15.7.1 :

[47/1026] Building CXX object '/Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duk...source/DNZHRecomp/build/spirv-cross/CMakeFiles/spirv-cross-msl.dir/spirv_msl.cpp.o'
ninja: build stopped: subcommand failed.

Here's the complete build output if that helps at all:

eisnerguy1@MacBook-Pro DNZHRecomp % ./N64Recomp us.toml
Function count: 1517
Working dir: /Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duke Nukem Zero Hour/Recompiled/source/DNZHRecomp
[Info] Indirect tail call in recomp_entrypoint
Tail call in __moddi3_recomp to 0x800BAF10
[Info] Tail call in __udivdi3_recomp to 0x800BACB4
[Info] Tail call in __udivdi3_recomp to 0x800BABB8
Tail call in __divdi3_recomp to 0x800BAEF0
eisnerguy1@MacBook-Pro DNZHRecomp % ./RSPRecomp aspMain.us.toml
eisnerguy1@MacBook-Pro DNZHRecomp % cmake -S . -B build-cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -G Ninja -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is AppleClang 17.0.0.17000319
-- The CXX compiler identification is AppleClang 17.0.0.17000319
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The OBJC compiler identification is AppleClang 17.0.0.17000319
-- The OBJCXX compiler identification is AppleClang 17.0.0.17000319
-- Detecting OBJC compiler ABI info
-- Detecting OBJC compiler ABI info - done
-- Check for working OBJC compiler: /usr/bin/clang - skipped
-- Detecting OBJCXX compiler ABI info
-- Detecting OBJCXX compiler ABI info - done
-- Check for working OBJCXX compiler: /usr/bin/clang++ - skipped
CMake Deprecation Warning at lib/rt64/src/contrib/nativefiledialog-extended/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


nfd Platform: PLATFORM_MACOS
nfd Compiler: COMPILER_GNU
-- Performing Test NFD_USE_ALLOWEDCONTENTTYPES
-- Performing Test NFD_USE_ALLOWEDCONTENTTYPES - Failed
CMake Deprecation Warning at lib/rt64/src/contrib/zstd/build/cmake/CMakeLists.txt:10 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The ASM compiler identification is AppleClang
-- Found assembler: /usr/bin/clang
-- ZSTD VERSION: 1.5.6
-- Performing Test C_FLAG_WALL
-- Performing Test C_FLAG_WALL - Success
-- Performing Test CXX_FLAG_WALL
-- Performing Test CXX_FLAG_WALL - Success
-- Performing Test C_FLAG_WEXTRA
-- Performing Test C_FLAG_WEXTRA - Success
-- Performing Test CXX_FLAG_WEXTRA
-- Performing Test CXX_FLAG_WEXTRA - Success
-- Performing Test C_FLAG_WUNDEF
-- Performing Test C_FLAG_WUNDEF - Success
-- Performing Test CXX_FLAG_WUNDEF
-- Performing Test CXX_FLAG_WUNDEF - Success
-- Performing Test C_FLAG_WSHADOW
-- Performing Test C_FLAG_WSHADOW - Success
-- Performing Test CXX_FLAG_WSHADOW
-- Performing Test CXX_FLAG_WSHADOW - Success
-- Performing Test C_FLAG_WCAST_ALIGN
-- Performing Test C_FLAG_WCAST_ALIGN - Success
-- Performing Test CXX_FLAG_WCAST_ALIGN
-- Performing Test CXX_FLAG_WCAST_ALIGN - Success
-- Performing Test C_FLAG_WCAST_QUAL
-- Performing Test C_FLAG_WCAST_QUAL - Success
-- Performing Test CXX_FLAG_WCAST_QUAL
-- Performing Test CXX_FLAG_WCAST_QUAL - Success
-- Performing Test C_FLAG_WSTRICT_PROTOTYPES
-- Performing Test C_FLAG_WSTRICT_PROTOTYPES - Success
-- Performing Test LD_FLAG_Z_NOEXECSTACK
-- Performing Test LD_FLAG_Z_NOEXECSTACK - Failed
-- Performing Test C_FLAG_QUNUSED_ARGUMENTS
-- Performing Test C_FLAG_QUNUSED_ARGUMENTS - Success
-- Performing Test CXX_FLAG_QUNUSED_ARGUMENTS
-- Performing Test CXX_FLAG_QUNUSED_ARGUMENTS - Success
-- Performing Test C_FLAG_WA_NOEXECSTACK
-- Performing Test C_FLAG_WA_NOEXECSTACK - Success
-- Performing Test CXX_FLAG_WA_NOEXECSTACK
-- Performing Test CXX_FLAG_WA_NOEXECSTACK - Success
-- CMAKE_INSTALL_PREFIX: /usr/local
-- CMAKE_INSTALL_LIBDIR: lib
-- ZSTD_LEGACY_SUPPORT not defined!
-- ZSTD_MULTITHREAD_SUPPORT is enabled
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- /Library/Frameworks/SDL2.framework/Headers;/Library/Frameworks/SDL2.framework SDL2::SDL2
CMake Deprecation Warning at lib/rt64/src/contrib/spirv-cross/CMakeLists.txt:22 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- SPIRV-Cross: Finding Git version for SPIRV-Cross.
-- Found Git: /opt/homebrew/bin/git (found version "2.49.0")
-- SPIRV-Cross: Git hash: vulkan-sdk-1.4.304.0-2-g6173e24b
-- Found Python3: /opt/homebrew/Frameworks/Python.framework/Versions/3.13/bin/python3.13 (found version "3.13.7") found components: Interpreter
SPIRV-Cross:  Testing will be disabled for SPIRV-Cross. Could not find glslang or SPIRV-Tools build under external/. To enable testing, run ./checkout_glslang_spirv_tools.sh and ./build_glslang_spirv_tools.sh first.
CMake Deprecation Warning at lib/lunasvg/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Found Freetype: /Library/Frameworks/freetype.framework (found version "2.13.3")
-- Found Freetype::Freetype - Freetype font engine enabled
-- Found lunasvg::lunasvg - SVG plugin enabled
CMake Deprecation Warning at lib/N64ModernRuntime/thirdparty/miniz/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- {fmt} version: 10.2.2
-- Build type: Release
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Configuring done (4.7s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duke Nukem Zero Hour/Recompiled/source/DNZHRecomp/build-cmake
eisnerguy1@MacBook-Pro DNZHRecomp % cmake --build build-cmake --target DNZHRecompiled -j$(nproc) --config Release
zsh: command not found: nproc
[30/1026] cd "/Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duke Nukem Zero Hour...ource/DNZHRecomp/patches" && /opt/homebrew/bin/cmake -E env CC=clang LD=ld.lld make
FAILED: CMakeFiles/PatchesBin /Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duke Nukem Zero Hour/Recompiled/source/DNZHRecomp/patches/patches.elf /Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duke Nukem Zero Hour/Recompiled/source/DNZHRecomp/build-cmake/CMakeFiles/PatchesBin 
cd "/Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duke Nukem Zero Hour/Recompiled/source/DNZHRecomp/patches" && /opt/homebrew/bin/cmake -E env CC=clang LD=ld.lld make
clang -target mips -mips2 -mabi=32 -O2 -G0 -mno-abicalls -mno-odd-spreg -mno-check-zero-division -fomit-frame-pointer -ffast-math -fno-unsafe-math-optimizations -fno-builtin-memset -Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-but-set-variable -Wno-missing-braces -Wno-unsupported-floating-point-opt -Wno-switch -nostdinc -DTARGET_N64 -DF3DEX_GBI_2 -D_LANGUAGE_C -D_FINALROM -D_MIPS_SZLONG=32 -DMIPS -I ../lib/DukeNukemZeroHour/include -I ../lib/DukeNukemZeroHour/libs/libultra/include/2.0I -I ../lib/rt64/include -I ../lib/N64ModernRuntime/N64Recomp/include print.c -MMD -MF print.d -c -o print.o
clang (LLVM option parsing): Unknown command line argument '-mno-check-zero-division'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--misched-fusion'?
clang (LLVM option parsing): Unknown command line argument '-mips-ssection-threshold=0'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--mfs-count-threshold=0'?
clang (LLVM option parsing): Unknown command line argument '-mgpopt'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--pgso'?
make: *** [print.o] Error 1
[47/1026] Building CXX object '/Users/eisnerguy1/Games/Build Engine/Duke Nukem/Duk...source/DNZHRecomp/build/spirv-cross/CMakeFiles/spirv-cross-msl.dir/spirv_msl.cpp.o'
ninja: build stopped: subcommand failed.
eisnerguy1@MacBook-Pro DNZHRecomp % 

Am I missing something super obvious? Any help would be greatly appreciated. Thanks! 👍🏻

eisnerguy1 avatar Oct 27 '25 15:10 eisnerguy1

Oh, here's what the directory looks like before running the cmake commands: Image

eisnerguy1 avatar Oct 27 '25 15:10 eisnerguy1