Home › Forum › SOFA › Building SOFA › [SOLVED] OpenGL Error when Compiling SOFA on MacOS
- This topic has 2 replies, 2 voices, and was last updated 3 years, 10 months ago by peluntra.
-
AuthorPosts
-
8 February 2021 at 15:19 #18547peluntraBlocked
Dear community,
when trying to compile SOFA on my Mac, I get this error:
[ 16%] Building CXX object SofaKernel/SofaFramework/SofaHelper/CMakeFiles/SofaHelper.dir/src/sofa/helper/gl/FrameBufferObject.cpp.o make[2]: *** No rule to make target <code>/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework', needed by</code>lib/libSofaHelper.20.06.00.dylib'. Stop. make[2]: *** Waiting for unfinished jobs.... make[1]: *** [SofaKernel/SofaFramework/SofaHelper/CMakeFiles/SofaHelper.dir/all] Error 2 make: *** [all] Error 2
I followed the steps exactly as described in the documentation and tried different versions of SOFA, including v19.12, v20.06, and v20.12, but I always get stuck during the compilation with the same error. When activating
SOFA_NO_OPENGL
in CMake, everything works fine but since I want to use the CGAL plugin, I need OpenGL. However, the path to the OpenGl framework seems to have been moved to
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
wherefore it cannot be found on the path mentioned in the error message.
I already tried updating (and reinstalling) XCode as proposed here,xcode-select -p
also looks fine. I also upgraded glew and checked my compilers, as mentioned here. None of these solved the problem.My macOS version is macOS 10.15.7, I’m using Apple clang version 12.0.0 (clang-1200.0.32.29) and XCode Version 12.4.
I will be grateful for any help!
Best
Peluntra11 February 2021 at 16:34 #18572GuillaumeKeymasterHi Peluntra,
What is your CMake version?
You could try replacing with CMake-GUI all occurrences of
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework
by/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
EDIT: you can also try replacing by
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
Hope that helps,
Guillaume.15 February 2021 at 12:51 #18673peluntraBlockedThanks for your help Guillaume! 🙂
I solved it by simply runningxcode-select --install
to reinstall the command line tools.I hope this helps other frustrated collegues.
Best
Peluntra
-
AuthorPosts
- You must be logged in to reply to this topic.