under
Code: Select all
# Fresh start
cmake_minimum_required(VERSION 3.0)
cmake_policy(VERSION 3.0)
Code: Select all
# Fresh start
cmake_minimum_required(VERSION 3.0)
cmake_policy(VERSION 3.0)
Those a.out may be from the cmake compiler testrun.patrickwalker wrote: ↑Sun Jan 28, 2018 10:05 pm Well, a.out is usually the filename of compile code out of a C compiler so was just wondering. Might just be an option for a CC command in the script.
I added the lines to CMakeLists.txt and cmake still generates the missing pthread.h error.
Code: Select all
# Fresh start
cmake_minimum_required(VERSION 3.0)
cmake_policy(VERSION 3.0)
if(APPLE)
cmake_policy(SET CMP0043 OLD)
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0010 NEW)
cmake_policy(SET CMP0014 NEW)
endif(APPLE)
The cmake/SpecializedConfig/Config_OSX.cmake file reference Embree path with the following lines:patrickwalker wrote: ↑Mon Jan 29, 2018 2:54 am I erased and redownloaded everything. Managed to get GUI version of cmake generate the Xcode file, however, I'm getting errors. The root cause might be that Xcode cannot find embree2/rtcore_builder.h as referenced in bvhembreebuild.cpp.
I had hoped it was included in TBB, but I cannot find it in the usual locations. The macos block of files does seem to have all the other rtcore_* files.
Code: Select all
SET(EMBREE_LIBRARY ${OSX_DEPENDENCY_ROOT}/lib/embree2/libembree.2.8.0.dylib)
The OpenGL/OpenCL interoperability is not even used by LuxCoreRender so if you want try to move on instead than fixing that problem, you can just comment the code:patrickwalker wrote: ↑Mon Jan 29, 2018 2:54 am Another thread had someone else with a similar missing header file issue. So, I downloaded a tar.gz and copied those header files into the luxcore source tree and seems to have cleared that problem. Unsure whether this is a proper solution and wondering how I'll pay for it later in the compilation/linking process, but it moves right on into the next error. And this error I have no clue how to handle. The only thing I can say is that CG probably means CoreGraphics but it's been six or seven years since I even did any macOS programming at all and that was using Objective-C.
Now, in the method OpenCLDeviceDescription::GetOCLContext() found in device.cpp, it is saying that CGLGetCurrentContext is an undeclared identifier.
Code: Select all
/*if (enableOpenGLInterop) {
#if defined (__APPLE__)
CGLContextObj kCGLContext = CGLGetCurrentContext();
CGLShareGroupObj kCGLShareGroup = CGLGetShareGroup(kCGLContext);
cl_context_properties cps[] = {
CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE, (cl_context_properties)kCGLShareGroup,
0
};
#else
#ifdef WIN32
cl_context_properties cps[] = {
CL_GL_CONTEXT_KHR, (intptr_t)wglGetCurrentContext(),
CL_WGL_HDC_KHR, (intptr_t)wglGetCurrentDC(),
CL_CONTEXT_PLATFORM, (cl_context_properties)platform(),
0
};
#else
cl_context_properties cps[] = {
CL_GL_CONTEXT_KHR, (intptr_t)glXGetCurrentContext(),
CL_GLX_DISPLAY_KHR, (intptr_t)glXGetCurrentDisplay(),
CL_CONTEXT_PLATFORM, (cl_context_properties)platform(),
0
};
#endif
#endif
oclContext = new cl::Context(devices, cps);
} else {*/
cl_context_properties cps[] = {
CL_CONTEXT_PLATFORM, (cl_context_properties)platform(), 0
};
oclContext = new cl::Context(devices, cps);
//}
This looks as you are coming along in a waypatrickwalker wrote: ↑Mon Jan 29, 2018 2:54 am I erased and redownloaded everything. Managed to get GUI version of cmake generate the Xcode file, however, I'm getting errors. The root cause might be that Xcode cannot find embree2/rtcore_builder.h as referenced in bvhembreebuild.cpp.
I had hoped it was included in TBB, but I cannot find it in the usual locations. The macos block of files does seem to have all the other rtcore_* files.
Another thread had someone else with a similar missing header file issue. So, I downloaded a tar.gz and copied those header files into the luxcore source tree and seems to have cleared that problem. Unsure whether this is a proper solution and wondering how I'll pay for it later in the compilation/linking process, but it moves right on into the next error. And this error I have no clue how to handle. The only thing I can say is that CG probably means CoreGraphics but it's been six or seven years since I even did any macOS programming at all and that was using Objective-C.
Now, in the method OpenCLDeviceDescription::GetOCLContext() found in device.cpp, it is saying that CGLGetCurrentContext is an undeclared identifier.
Dade wrote: ↑Mon Jan 29, 2018 9:30 amSo, here's where some fun begins. I did a full HDD search and it is not finding this dylib. I've gone through the usual spots and cannot find them. That error seems to have disappeared asCode: Select all
SET(EMBREE_LIBRARY ${OSX_DEPENDENCY_ROOT}/lib/embree2/libembree.2.8.0.dylib)
As soon as I try to comment it out, I get more undeclared identifiers.Dade wrote: ↑Mon Jan 29, 2018 9:30 am The OpenGL/OpenCL interoperability is not even used by LuxCoreRender so if you want try to move on instead than fixing that problem, you can just comment the code:
P.S. the solution to the last problem is probably about adding the right "#include" header where the CGL* functions are declared on your platform.Code: Select all
/*if (enableOpenGLInterop) { #if defined (__APPLE__) CGLContextObj kCGLContext = CGLGetCurrentContext(); CGLShareGroupObj kCGLShareGroup = CGLGetShareGroup(kCGLContext); cl_context_properties cps[] = { CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE, (cl_context_properties)kCGLShareGroup, 0 }; #else #ifdef WIN32 cl_context_properties cps[] = { CL_GL_CONTEXT_KHR, (intptr_t)wglGetCurrentContext(), CL_WGL_HDC_KHR, (intptr_t)wglGetCurrentDC(), CL_CONTEXT_PLATFORM, (cl_context_properties)platform(), 0 }; #else cl_context_properties cps[] = { CL_GL_CONTEXT_KHR, (intptr_t)glXGetCurrentContext(), CL_GLX_DISPLAY_KHR, (intptr_t)glXGetCurrentDisplay(), CL_CONTEXT_PLATFORM, (cl_context_properties)platform(), 0 }; #endif #endif oclContext = new cl::Context(devices, cps); } else {*/ cl_context_properties cps[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)platform(), 0 }; oclContext = new cl::Context(devices, cps); //}
Not sure how to handle this now. I've looked up the reference at the Developer website hoping for some info about header file locations and not seeing anything. Throw in the fact the source code is in C++, which I have always avoided, doesn't help. I wouldn't be so lost if it was in Objective-C.