building on macOS

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
pistepilvi
Posts: 2
Joined: Tue Jan 20, 2026 11:29 pm

building on macOS

Post by pistepilvi »

Hi,
I'm trying to build LuxCoreRender 2.10 on macOS, but ran into some issues that I suspect have to do with mixing llvm and Apple Clang. According to the wiki (https://wiki.luxcorerender.org/Building_LuxCoreRender), I should use llvm, but the latest commit comment for https://github.com/LuxCoreRender/LuxCor ... acOS-ARM64 is "MacOS: back to apple-clang".

The steps I carried out are as follows:
  1. open Terminal (zsh)
  2. get files from github
    git clone https://github.com/LuxCoreRender/LuxCore/
  3. set clang version to llvm
    export CC=/opt/homebrew/opt/llvm/bin/clang
    export CXX=/opt/homebrew/opt/llvm/bin/clang++
    export CMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang
    export CMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
  4. test if clang is set to /opt/homebrew/opt/llvm/bin/clang
    which clang
  5. go to luxcore folder
    cd luxcore
  6. build dependencies
    make deps
However, building deps fails (full log from the terminal attached):

Code: Select all

ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Is the build system working for other people? Am I doing something wrong? Should I use Apple clang or llvm?
Attachments
LuxCore_build_log_macOS.txt.zip
(17.51 KiB) Downloaded 5 times
CodeHD
Developer
Developer
Posts: 517
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: building on macOS

Post by CodeHD »

Hi,

I'm going to ping another developer who has more knowledge about this.

One hint from me: the latest development is happening in branch "for_v2.11", not "master". It might be worth trying to build with that branch. Based on your description, I am assuming you are trying to build "master".

Another note: While the current build pipeline on GitHub seems to work for macOS, there is not much local testing on macOS (main work is happening on Linux). So any feedback on issues like this is greatly appreciated!
Howetuft
Developer
Developer
Posts: 4
Joined: Tue Jan 28, 2025 11:52 am

Re: building on macOS

Post by Howetuft »

Hello,

Yes, we migrated back to apple-clang when Github upgraded their runners to MacOS 15, last autumn.
apple-clang versions on the previous runners did not support C++20, so there was an unsatisfying workaround with llvm clang, but now, with recent MacOS runners, it's over and we're back to apple-clang. PR is here, if you're interested: https://github.com/LuxCoreRender/LuxCoreDeps/pull/21.

Two other remarks:
- current dev version is 2.11. Due to lack of time, I may be late with some admin tasks concerning 2.10 that could hamper the build now. I would recommend you to select 2.11, if you want to build.
- In theory, if build environment setup is ok (starting with compiler), `make deps` should not trigger any build, but only install already compiled packages. This is how it works on Windows and Linux, at least. However, we're suffering from a lack of MacOS developers, so we have never had the opportunity to test it by ourselves in "normal" MacOS environment (just Github runners): your feedback will be welcome.
pistepilvi
Posts: 2
Joined: Tue Jan 20, 2026 11:29 pm

Re: building on macOS

Post by pistepilvi »

Thank you both! Building and running LuxCoreRender 2.11 with Apple clang worked. :)

It did involve a bit of a workaround: after successfully running make deps, I got an error when running make:

Code: Select all

CMake Error at out/build/generators/conan_toolchain.cmake:16 (include):
  include could not find requested file:
    /var/folders/ww/jph9065166s_69b23klmhkbh0000gp/T/tmp_8xmvted/.conan2/profiles/macos-vars-ARM64.cmake
From what I understand, this file is written to a temporary folder, which no longer exists when I run make. So I added some lines in deps.py to copy this file to the output folder instead. Then before running make, I changed the path in conan_toolchain.cmake.

Furthermore, when trying to run luxcoreui, it turned out it did not find the paths to the .dylib files. I actually had the same issue with the ready-made executable; there I moved the dylib files to the bin folder, and I think I had to run all dylib files first, so I could tell macOS for each of them that I trust them.

All in all, the steps I now took were:
  1. open Terminal (zsh)
  2. get files from github
    git clone https://github.com/LuxCoreRender/LuxCore/
  3. got to luxcore folder
    cd luxcore
  4. create virtual python environment
    python3 -m venv ~/luxvirtual
  5. activate virtual python environment
    source ~/luxvirtual/bin/activate
  6. adapt deps.py, after line 382:

    Code: Select all

            # Copy profiles to permanent location
            profiles_src = _conan_home / "profiles"
            profiles_dest = Path(output_dir) / "build" / "profiles"
            if profiles_src.exists():
                shutil.copytree(profiles_src, profiles_dest, dirs_exist_ok=True)
                logger.info(f"Copied profiles to {profiles_dest}")
  7. build dependencies
    make deps
  8. adapt conan_toolchain.cmake

    Code: Select all

    #include("/var/folders/ww/jph9065166s_69b23klmhkbh0000gp/T/tmplap4q5nd/.conan2/profiles/macos-vars-ARM64.cmake")
    include("${CMAKE_CURRENT_LIST_DIR}/../profiles/macos-vars-ARM64.cmake")
  9. add path to OpenMP
    export OpenMP_ROOT=$(brew --prefix)/opt/libomp
  10. build
    make
  11. navigate to Release folder
    cd /Users/pistepilvi/LuxCore/out/install/Release
  12. set library path
    export DYLD_LIBRARY_PATH=$(pwd)/lib:$DYLD_LIBRARY_PATH
  13. run
    ./bin/luxcoreui
Howetuft
Developer
Developer
Posts: 4
Joined: Tue Jan 28, 2025 11:52 am

Re: building on macOS

Post by Howetuft »

Hello,
Glad to see that it worked! And thank you for your comments and workarounds, I'll take them into account next time I update the build system.
Post Reply