Bug 261473 - Missing GL/gl.h include path, should come from /usr/X11/include/GL/gl.h
Summary: Missing GL/gl.h include path, should come from /usr/X11/include/GL/gl.h
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: Akarsh Simha
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-28 19:17 UTC by Jeremy Lavergne
Modified: 2014-12-15 16:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
debug log from macports (50.83 KB, application/x-bzip2)
2011-01-01 17:17 UTC, Jeremy Lavergne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Lavergne 2010-12-28 19:17:52 UTC
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
Comment 1 Akarsh Simha 2011-01-01 00:36:11 UTC
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>.
Comment 2 Jeremy Lavergne 2011-01-01 16:47:47 UTC
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.
Comment 3 Jeremy Lavergne 2011-01-01 17:17:36 UTC
Created attachment 55444 [details]
debug log from macports

this log contains the environment variables and the commands run
Comment 4 Akarsh Simha 2011-01-02 22:47:23 UTC
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.
Comment 5 Akarsh Simha 2011-01-02 23:24:23 UTC
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.