Version: unspecified (using KDE 4.5.90) OS: OS X Without the correct paths, GL/gl.h cannot be found during a compile. Reproducible: Always Steps to Reproduce: Compile in MacPorts Actual Results: In file included from /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/../../../kdeedu-4.5.90/kstars/kstars/texturemanager.h:26, from /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/moc_texturemanager.cpp:10, from /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/kstars_automoc.cpp:6: /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/../../../kdeedu-4.5.90/kstars/kstars/texture.h:23:19: error: GL/gl.h: No such file or directory In file included from /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/../../../kdeedu-4.5.90/kstars/kstars/texturemanager.h:26, from /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/moc_texturemanager.cpp:10, from /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/kstars_automoc.cpp:6: /opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/build/kstars/kstars/../../../kdeedu-4.5.90/kstars/kstars/texture.h:47: error: 'GLuint' does not name a type Expected Results: Successful compliation GL/gl.h exists in several locations (SDKs and /usr/include): /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/agl.h /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/gl.h /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/mesa_wgl.h /Developer/SDKs/MacOSX10.5.sdk/usr/include/wx-2.8/wx/ogl/ogl.h /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/agl.h /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/cl_gl.h /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/GL/gl.h /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/GL/mesa_wgl.h /Developer/SDKs/MacOSX10.6.sdk/usr/include/wx-2.8/wx/ogl/ogl.h /System/Library/Frameworks/AGL.framework/Versions/A/Headers/agl.h /System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h /System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/cl_gl.h /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h /usr/X11/include/GL/gl.h /usr/X11/include/GL/mesa_wgl.h /usr/include/wx-2.8/wx/ogl/ogl.h
But as I understand it, these absolute paths should get automatically set by cmake. It works fine for me. Please tell me if you see the correct paths being found when you do a cmake. One way to check this, that I know of, is to go to the build directory and use ccmake (the curses GUI for cmake) on the source directory: ccmake <source directory>.
The paths seem to be okay. In work/build/CMakeCache.txt (the out-of-source build dir): //Path to a file. KDE4_PLASMA_OPENGL_FOUND:FILEPATH=/opt/local/include/plasma/glapplet.h //Include for OpenGL on OSX OPENGL_INCLUDE_DIR:PATH=/System/Library/Frameworks/OpenGL.framework //OpenGL lib for OSX OPENGL_gl_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework //AGL lib for OSX OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework //Path to a file. QT_QTOPENGL_INCLUDE_DIR:PATH=/opt/local/include/QtOpenGL //Path to a library. QT_QTOPENGL_LIBRARY_DEBUG:FILEPATH=QT_QTOPENGL_LIBRARY_DEBUG-NOTFOUND //Path to a library. QT_QTOPENGL_LIBRARY_RELEASE:FILEPATH=/opt/local/lib/libQtOpenGL.dylib Also, in build/kstars/kstars I ran ccmake: ccmake -C ../../CMakeCache.txt. But I didn't see anything useful in there except that building with OpenGL was ON.
Created attachment 55444 [details] debug log from macports this log contains the environment variables and the commands run
Hi I missed the fact that you're building on Mac OS. Probably, the paths are different. I don't know how to handle this, but I'll see if someone does. Thanks for the report! Yes, this is a very critical bug.
Although I'm not very knowledgeable here, I feel that this might be a bug against CMake. So when we try to find OpenGL, cmake is going to look through various possibilities. I notice that /usr/X11 is not amongst them, but /usr/X11R6 is on the list. It should actually hit the correct directory. In any case, I'd like to know if Plasma built correctly with OGL support. In that case, it's probably our fault.