Help wanted: macOS testers for incoming PR #14 (macOS build support) #15
Replies: 2 comments
-
|
PR author has kindly provided a screen recording showing the macOS build working as expected, so I’m no longer looking for macOS testers on this specific PR. That said, I’d still love to hear from developers on other platforms, especially Linux. If anyone is interested in helping with Linux builds or any other areas (Windows, docs, testing, features, etc.), please feel free to reach out:) |
Beta Was this translation helpful? Give feedback.
-
|
LLM helps me to setup the MacOS environment (using nixpkgs as package manager), shared the process here: Build Guide — macOS (Apple Silicon)This document describes how to build Infernux on macOS using the Prerequisites
Step 1: Install System ToolsXcode Command Line Toolsxcode-select --installVerify the SDK path: xcrun --show-sdk-path
# /Library/Developer/CommandLineTools/SDKs/MacOSX*.sdkCMake# via Homebrew
brew install cmake
# via Nix
nix profile install nixpkgs#cmakeNinjaNinja is required by the # via Homebrew
brew install ninja
# via Nix
nix profile install nixpkgs#ninjaStep 2: Install Dependencies via NixThe project relies on several system-level libraries. Using Nix is the cleanest way # Vulkan SDK (via MoltenVK for macOS)
nix profile install nixpkgs#vulkan-loader
nix profile install nixpkgs#vulkan-headers
nix profile install nixpkgs#vulkan-tools
# SPIRV-Cross (shader reflection)
nix profile install nixpkgs#spirv-cross
# zlib (required by Assimp)
nix profile install nixpkgs#zlib
nix profile add nixpkgs#zlib.dev # for zlib.h headersStep 3: Setup Python EnvironmentThe project requires Python ≥ 3.12. uv venv
uv pip install -r requirements.txt
.venv/bin/python -mensurepip
source .venv/bin/activateOnce activated, CMake's Step 4: Configure with CMakeThe CMake auto-discovers Nix packages via Critical: Clear the build directory before each configure attempt to avoid rm -rf out/build/*
cmake --preset release-macos \
-DCMAKE_PREFIX_PATH="${HOME}/.nix-profile"What
|
| CMake command | Finds automatically |
|---|---|
find_package(Vulkan) |
~/.nix-profile/include/vulkan/vulkan.h + ~/.nix-profile/lib/libvulkan.dylib |
find_package(ZLIB) |
~/.nix-profile/include/zlib.h + ~/.nix-profile/lib/libz.dylib |
find_library(spirv-cross-core) |
~/.nix-profile/lib/libspirv-cross-core.a |
find_library(spirv-cross-glsl) |
~/.nix-profile/lib/libspirv-cross-glsl.a |
find_library(spirv-cross-cpp) |
~/.nix-profile/lib/libspirv-cross-cpp.a |
find_library(spirv-cross-reflect) |
~/.nix-profile/lib/libspirv-cross-reflect.a |
Step 5: Build
cmake --build --preset release-macosThis command:
- Compiles all C++ source files (engine core + pybind11 bindings)
- Builds external dependencies (SDL3, Assimp, JoltPhysics, glslang, imgui)
- Links
_Infernux.cpython-313-darwin.so - Copies shared library dependencies into
python/Infernux/lib/ - Builds a Python wheel via
python3 -m build --wheel - Installs the wheel into the venv via
pip install --no-deps
Outputs
| Artifact | Location |
|---|---|
| C++ native module | python/Infernux/lib/_Infernux.cpython-313-darwin.so |
| Python wheel | dist/infernux-0.1.6-cp313-cp313-macosx_*_arm64.whl |
| Bundled dylibs | python/Infernux/lib/*.dylib |
Step 6: Verify
.venv/bin/python3 -c "import Infernux; print('✅ Infernux imported successfully')"Expected output:
Infernux imported successfully
Troubleshooting
Problem: symbol not found in flat namespace '__ZTVN11spirv_cross8CompilerE'
Cause: The _Infernux.so links against SPIRV-Cross, but the static libraries
(libspirv-cross-*.a) were not found during linking.
Fix: Pass both -DCMAKE_LIBRARY_PATH (for find_library) and
-DCMAKE_SHARED_LINKER_FLAGS="-L<path>" (for the linker) pointing to the
SPIRV-Cross lib/ directory. With ~/.nix-profile/:
-DCMAKE_LIBRARY_PATH="${HOME}/.nix-profile/lib" \
-DCMAKE_SHARED_LINKER_FLAGS="-L${HOME}/.nix-profile/lib"Problem: Could NOT find Python3 (missing: Development.Module Development.Embed)
Cause: The Python interpreter doesn't have development headers/libraries
available (no Python.h or libpython3*.dylib).
Fix: Use a Python installation that includes dev headers. On Nix, python313
includes headers. With uv/venv, explicitly pass Python3_INCLUDE_DIR and
Python3_LIBRARY as shown above.
Problem: Failed to install wheel: Package requires a different Python
Cause: CMake discovered Python 3.9 (macOS system Python), but the wheel
metadata says requires-python = ">=3.12".
Fix: Set -DPython3_EXECUTABLE to a Python 3.12+ interpreter, and ensure
it also has development headers + pybind11 installed.
Full One-Shot Build Script
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
echo "=== Setting up Python environment ==="
uv venv
uv pip install -r requirements.txt
.venv/bin/python -mensurepip
source .venv/bin/activate
echo "=== Configuring with CMake ==="
rm -rf out/build/*
cmake --preset release-macos \
-DCMAKE_PREFIX_PATH="${HOME}/.nix-profile"
echo "=== Building ==="
cmake --build --preset release-macos
echo "=== Verifying ==="
python3 -c "import Infernux; print('✅ Build successful!')"Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We have a promising PR (#14) that adds full macOS build support to Infernux, including CMake presets, MoltenVK integration, Python runtime installation, and Hub packaging.
I don’t have a macOS machine myself, so I’m looking for someone in the community who can help test this PR on real macOS hardware (Apple Silicon or Intel).
What needs testing:
git clone --recursive -b feature/macos-build-support https://github.com/WendellZ524/Infernux.gitrelease-macosCMake presetpython packaging/launcher.pyOn a side note: Im a solo dev right now. Long-term contributors for any area (macOS, Windows, Linux, docs, testing, features, etc.) are more than welcome. Let me know if you're interested — I'd really appreciate the help!
Beta Was this translation helpful? Give feedback.
All reactions