Mac OS

Discussion related to the Engine functionality, implementations and API.
Post Reply
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe » Mon Jan 29, 2018 3:37 pm

Dade wrote:
Mon Jan 29, 2018 3:31 pm
jensverwiebe wrote:
Mon Jan 29, 2018 3:28 pm
Either try linking this or follow Dade's proposal to just comment out for now, cause opengl interop is not used anymore ( really ? )
It hasn't been used for years: too many broken drivers released by vendors.
Time flies :shock:

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

Re: Mac OS

Post by patrickwalker » Mon Jan 29, 2018 3:43 pm

jensverwiebe wrote:
Mon Jan 29, 2018 3:14 pm
SDKpathes are never a problem, cause you can assume a given structure ( unless Aplle reinvented the wheel again )
Once the changes are added to the online repository, what I'll do is wipe and redownload and redo it once again.

By C++ bindings, do you mean cl.hpp into Xcode? Yes, the file is there. But can't remember if I added it in myself or if the new High Sierra Xcode had it automatically. I remember doing it, but just not if it was before or after the OS upgrade. Xcode has been updated since, so that probably means the old one was overwritten anyway, which could mean no one has to manually add it in anymore. As for adding it into the macos dependency tree, no, I don't believe I did. OR it means Apple doesn't replace Xcode.app, just updates the contents of it. Find that unlikely but I can't really rule it out.

Going to regenerate the project again from the updated cmake just to make sure I did it right this time. If i remove the #include I still get the CGLGetCurrentContext error regardless of how OPENCL_SEARCH_PATH is set.

I should note here that my include line in device.cpp is:

Code: Select all

#include "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/CGLCurrent.h"
Not from the SDK inside Xcode.app. Going to put in explicit file path from Xcode.

Code: Select all

#include "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/CGLCurrent.h"
Error disappears and seems to compile fine.

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

Re: Mac OS

Post by jensverwiebe » Mon Jan 29, 2018 4:07 pm

Regarding this latter:
Personally i don't care about 10.13, but this should be finally cleared up then ( or removed, both the include and code )
It smells like a bug in the sdk btw., if its still in the same place, why should it fail now ?
Xode sdk and cmdline sdk should be same ( if not even symlinked )
Check perhaps if you got 2 different versions by accident with cmd "xcodeselect" or "xcodebuild -sdk -version"

And btw. GREAT YOU GOT IT :D

Jens
Last edited by jensverwiebe on Mon Jan 29, 2018 4:19 pm, edited 2 times in total.

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

Re: Mac OS

Post by Dade » Mon Jan 29, 2018 4:14 pm

patrickwalker wrote:
Mon Jan 29, 2018 3:43 pm
Error disappears and seems to compile fine.
Patrick, can you also create an updated version of the MacOS repositories ? So the work of anyone else wanting to compile for MacOS will be easier :idea:

I can create a new repository at https://github.com/LuxCoreRender /MacOSCompile and /MaxOSCompileDeps (like the other for Windows and Linux).
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 » Mon Jan 29, 2018 4:24 pm

I can, but all I did was add the libembree.2.17.2.dylib and the embree header files from 2.17.2.

Most of the changes really have been in cmake configuration(s). There is still that outstanding header file issue for device.cpp.

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

Re: Mac OS

Post by Dade » Mon Jan 29, 2018 4:35 pm

patrickwalker wrote:
Mon Jan 29, 2018 4:24 pm
I can, but all I did was add the libembree.2.17.2.dylib and the embree header files from 2.17.2.

Most of the changes really have been in cmake configuration(s). There is still that outstanding header file issue for device.cpp.
If you are familiar with GitHub you can do a pull request to get your changes in the main repository otherwise if you post/send me the modified files, I can patch the original files.
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 29, 2018 4:51 pm

Next time i build macOS, i will lookup where CGLGetCurrentContext() was located before.
Should be more clean solvable that huge includes.

EDIT: a simple #include <OpenGL/OpenGL.h> should do, it inherits CGLCurrent.h
or if you want it more strict <OpenGL/CGLCurrent.h>

Check in cmake the opengl_include_dir was properly found. I should look like:

Code: Select all

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/OpenGL.framework
Jens

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

Re: Mac OS

Post by patrickwalker » Mon Jan 29, 2018 5:21 pm

jensverwiebe wrote:
Mon Jan 29, 2018 4:51 pm
EDIT: a simple #include <OpenGL/OpenGL.h> should do, it inherits CGLCurrent.h
or if you want it more strict <OpenGL/CGLCurrent.h>
It does work with that. Error disappears.
Check in cmake the opengl_include_dir was properly found. I should look like:

Code: Select all

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/OpenGL.framework
I do not actually see an OpenGL entry in cmake.

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

Re: Mac OS

Post by jensverwiebe » Mon Jan 29, 2018 5:26 pm

Oh, none ?
Thats the root problem then.
Try find out how cmake can find ogl

Jens

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

Re: Mac OS

Post by patrickwalker » Mon Jan 29, 2018 5:35 pm

jensverwiebe wrote:
Mon Jan 29, 2018 5:26 pm
Oh, none ?
Thats the root problem then.
Try find out how cmake can find ogl

Jens
Should be easy enough, which is probably why it will take me forever to get done. But here goes...

Code: Select all

set(OPENGL_SEARCH_PATH        "${CMAKE_OSX_SYSROOT}/System/Library/Frameworks/opengl.framework")
set(OPENGL_INCLUDE_PATH       "${OPENGL_SEARCH_PATH}")
Added those to Config_OSX.cmake. Not showing up in the cmake screen as OpenCL is. Was hoping they would.

I see that there is an OpenGL section in Dependencies.cmake, but not sure if should tinker with that one. It would be best to just keep all the macOS stuff inside the OSX configuration but not having any luck.
Last edited by patrickwalker on Mon Jan 29, 2018 5:52 pm, edited 4 times in total.

Post Reply