So, I decided to give a go at compiling lux for macOS 10.13.2.
I copied the git to my HDD but as soon as I tried using cmake, I start having trouble.
The GUI version of cmake (3.10.2) will not allow me to configure. I never used it much in the past, but I knew you could configure it to use Xcode. Problem is when I hit configure:
Code: Select all
CMAKE VERSION DETECTED 3.10.2
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!
So, the GUI is out. Off to Terminal and updated my homebrew cmake to 3.10.2 also. When I run that:
Code: Select all
$ cmake .
-- CMAKE VERSION DETECTED 3.10.2
-- Building mode: Release
--
-- ################ GENERATED XCODE PROJECT INFORMATION ################
--
-- Detected system-version: unsupported
-- OSX_DEPLOYMENT_TARGET : 10.6
-- CMAKE_XCODE_ATTRIBUTE_ARCHS ( cmake 2.8 or higher method ): $(NATIVE_ARCH_ACTUAL)
-- OSX SDK SETTING : macosxunsupported
-- XCODE_VERSION : 9.2
-- BUILD_TYPE : Release - compile with: make
-- UPDATE_LUXRAYS_IN_MACOS_REPO : ON
--
-- #####################################################################
-- LUXRAYS_NO_DEFAULT_CONFIG defined - not using default configuration values.
-- Using custom build config: Config_OSX
-- Using OSX Configuration settings
-- OSX_DEPENDENCY_ROOT : /Users/patrickwilliamwalker/Downloads/lux-source/LuxCore/../macos
-- Disabling Embree BVH builder - no custom Embree used
CMake Error at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/Dependencies.cmake:29 (find_package)
CMakeLists.txt:76 (include)
-- Configuring incomplete, errors occurred!
CMakeError contains:
Code: Select all
Determining if the include file pthread.h exists failed with the following output:
Change Dir: /Users/patrickwilliamwalker/Downloads/lux-source/LuxCore/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_b90f9/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_b90f9.dir/build.make CMakeFiles/cmTC_b90f9.dir/build
Building C object CMakeFiles/cmTC_b90f9.dir/CheckIncludeFile.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -mmacosx-version-min=10.6 -o CMakeFiles/cmTC_b90f9.dir/CheckIncludeFile.c.o -c /Users/patrickwilliamwalker/Downloads/lux-source/LuxCore/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/patrickwilliamwalker/Downloads/lux-source/LuxCore/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'pthread.h' file not found
#include <pthread.h>
^~~~~~~~~~~
1 error generated.
make[1]: *** [CMakeFiles/cmTC_b90f9.dir/CheckIncludeFile.c.o] Error 1
make: *** [cmTC_b90f9/fast] Error 2
I looked through to see if anything in homebrew might help but the only pThread items showing up all involve PHP.
This is why I didn't volunteer to handle macOS.
So, I ran a full HDD search and found at least one pthread.h that's being used by UE4 (/Source/ThirdParty/HTML5/emsdk/emscripten/1.35.0/system/include/libc/pthread.h). I took a look at the contents of that header file and saw no comments whatsoever, which means I can play Russian Roulette and throw that into the source tree...