Mac OS

Discussion related to the Engine functionality, implementations and API.
Post Reply
AndreD
Posts: 3
Joined: Wed Jan 17, 2018 9:47 pm

Mac OS

Post by AndreD » Fri Jan 19, 2018 6:44 pm

Hi,
I am just trying the first mac version,
I get this error:

Code: Select all

Traceback (most recent call last):
  File "/private/var/folders/qr/g00zj9_91m3_xs4l5c5lvykc0000gn/T/AppTranslocation/93244D79-C0F7-42A3-BE5D-378F82ED9B17/d/blender.app/Contents/Resources/2.79/scripts/modules/addon_utils.py", line 331, in enable
    mod = __import__(module_name)
  File "/Users/andredupke/Library/Application Support/Blender/2.79/scripts/addons/BlendLuxCore/__init__.py", line 2, in <module>
    from .bin import pyluxcore
ImportError: dlopen(/Users/andredupke/Library/Application Support/Blender/2.79/scripts/addons/BlendLuxCore/bin/pyluxcore.so, 2): Library not loaded: @rpath/libembree.2.dylib
  Referenced from: /Users/andredupke/Library/Application Support/Blender/2.79/scripts/addons/BlendLuxCore/bin/pyluxcore.so
  Reason: image not found

User avatar
Dade
Developer
Posts: 1535
Joined: Mon Dec 04, 2017 8:36 pm

Re: Mac OS

Post by Dade » Fri Jan 19, 2018 7:28 pm

I have no idea how MacOS works but, from the error message, you seems to miss Embree library (libembree.2.dylib). I checked and it is included in .zip (it is in the bin directory as expected). So it may be issue with Blender/MacOS paths.

I think you should also try to use a daily build of Blender 2.79a as the 2.79 has some known bug.
Support LuxCoreRender project with salts and bounties

jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe » Sat Jan 20, 2018 4:26 pm

AndreD wrote:
Fri Jan 19, 2018 6:44 pm
Hi,
I am just trying the first mac version,
I get this error:

Code: Select all

Traceback (most recent call last):
  File "/private/var/folders/qr/g00zj9_91m3_xs4l5c5lvykc0000gn/T/AppTranslocation/93244D79-C0F7-42A3-BE5D-378F82ED9B17/d/blender.app/Contents/Resources/2.79/scripts/modules/addon_utils.py", line 331, in enable
    mod = __import__(module_name)
  File "/Users/andredupke/Library/Application Support/Blender/2.79/scripts/addons/BlendLuxCore/__init__.py", line 2, in <module>
    from .bin import pyluxcore
ImportError: dlopen(/Users/andredupke/Library/Application Support/Blender/2.79/scripts/addons/BlendLuxCore/bin/pyluxcore.so, 2): Library not loaded: @rpath/libembree.2.dylib
  Referenced from: /Users/andredupke/Library/Application Support/Blender/2.79/scripts/addons/BlendLuxCore/bin/pyluxcore.so
  Reason: image not found
Thats what i immediately thought when seeing the new embree libs come with @rpath id: rpath is a wonky thing on macOS, i made them loader_path now, works more reliable.

Jens

AndreD
Posts: 3
Joined: Wed Jan 17, 2018 9:47 pm

Re: Mac OS

Post by AndreD » Sat Jan 20, 2018 8:01 pm

Works fine now, thanks for the fast fix! :-)

User avatar
patro
Posts: 12
Joined: Sun Jan 21, 2018 7:09 pm
Location: mount Etna

Re: Mac OS

Post by patro » Mon Jan 22, 2018 2:03 pm

hi guys :) where can i get this mac version :?:

User avatar
Dade
Developer
Posts: 1535
Joined: Mon Dec 04, 2017 8:36 pm

Re: Mac OS

Post by Dade » Mon Jan 22, 2018 2:18 pm

patro wrote:
Mon Jan 22, 2018 2:03 pm
hi guys :) where can i get this mac version :?:
There is an alpha1 available: https://github.com/LuxCoreRender/BlendLuxCore/releases

At the moment, no one has compiled the alpha2.
Support LuxCoreRender project with salts and bounties

jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe » Mon Jan 22, 2018 3:16 pm

patro wrote:
Mon Jan 22, 2018 2:03 pm
hi guys :) where can i get this mac version :?:
Compiling an macOS version is not the problem ( did already testwise an alpha2 with fixed embree references ).
But the packaging is unclear to me: linux and win standalone differ, i have no clue whats needed to do networking etc.)

Jens

patrickwalker
Posts: 28
Joined: Sun Jan 28, 2018 2:10 pm
Location: Canada

Re: Mac OS

Post by patrickwalker » Sun Jan 28, 2018 8:18 pm

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...

User avatar
Dade
Developer
Posts: 1535
Joined: Mon Dec 04, 2017 8:36 pm

Re: Mac OS

Post by Dade » Sun Jan 28, 2018 8:50 pm

You are using the source from https://github.com/LuxCoreRender/LuxCore, right ?

I ask because I noticed this message:

Code: Select all

-- Disabling Embree BVH builder - no custom Embree used
Or I have forgot to remove this check or you are using the old sources from https://bitbucket.org/luxrender/luxrays :?:

Second, you should probably start from https://bitbucket.org/luxrender/macos

It is the old Lux repository with the libraries used to compile Lux for MacOS. They are not changed so they may be very useful for you.

This http://www.luxrender.net/forum/viewtopi ... =22&t=4624 may help you too. What was called "luxrays" in old Lux is now the LuxCore repository and it is the only thing you need to compile.
Support LuxCoreRender project with salts and bounties

patrickwalker
Posts: 28
Joined: Sun Jan 28, 2018 2:10 pm
Location: Canada

Re: Mac OS

Post by patrickwalker » Sun Jan 28, 2018 8:56 pm

Using the LuxCoreRender git, not the old bitbucket one.

Throwing pthread.h everywhere didn't work either. ;) Not that I expected it too.

Post Reply