Page 1 of 1

2.0.10 configure: missing gl.h

Posted: Thu Nov 22, 2007 6:23 pm
by Ramen Noodles
Trying to compile 2.0.10 on Mandriva and I've had similar problems as this thread. I've solved all but the 'missing gl.h' problem during the ./configure step.

I've previously been able to complete the whole compile process with 2.0.8 (several times), but now I'm also receiving the same gl.h errors as with 2.0.10. Recent system changes include an upgrade from Mandriva 2006.0 to 2007.1, and this involved re-installing drivers for my geforce 3. I installed the newer 96.43.01 instead of the 8178 that I had always used before.

The gl.h file shows up in several places on the system:

Code: Select all

/usr/share/doc/NVIDIA_GLX-1.0/include/GL/gl.h
/usr/src/Mesa/include/GL/gl.h
/usr/X11R6/include/GL/gl.h
/usr/include/GL/gl.h
The other thread talks about installing some Mesa packages to use the gl.h file. There are several on the system:

Code: Select all

[tom@scrape bzflag-2.0.10]$ rpm -qa |grep [Mm]esa
libmesaglu1-devel-6.5.2-7mdv2007.1
libmesagl1-devel-6.5.2-7mdv2007.1
libmesaglw1-6.5.2-7mdv2007.1
libmesaglu1-6.5.2-7mdv2007.1
mesa-common-devel-6.5.2-7mdv2007.1
mesa-6.5.2-7mdv2007.1
libmesaglut3-6.5.2-7mdv2007.1
libmesaglut3-devel-6.5.2-7mdv2007.1
mesa-source-6.5.2-7mdv2007.1
libmesagl1-6.5.2-7mdv2007.1
libmesaglw1-devel-6.5.2-7mdv2007.1
These errors appear in config.log before references to gl.h:

Code: Select all

configure:24920: g++ -o conftest -g -O2    conftest.cpp -framework OpenGL -lXi -lXxf86vm -lXext  -lSM -lICE -lX11   -lm  >&5
g++: OpenGL: No such file or directory
cc1plus: error: unrecognized command line option "-framework"
configure:24926: $? = 1
configure: failed program was:
| /* confdefs.h.  */
...
| /* end confdefs.h.  */
| #include <OpenGL>

.
.
.

configure:24965: g++ -o conftest -g -O2    conftest.cpp -lopengl32 -lXi -lXxf86vm -lXext  -lSM -lICE -lX11   -lm  >&5
/usr/bin/ld: cannot find -lopengl32
collect2: ld returned 1 exit status
...
| /* end confdefs.h.  */
| #include <GL>
I'm not sure what's gone wrong, but it apparently has something to do with openGL. Any ideas what I can do to fix it? I haven't yet tried reverting to the older nvidia driver package. Could the problem be related to that?

Any help is appreciated. It should be noted that I'm trying to compile 2.0.10 (or re-compile 2.0.8 ) in hopes that I can kill off the persistent segfaults that are hampering my game play with my current 2.0.8 binary.

Posted: Thu Nov 22, 2007 7:29 pm
by macsforme

Code: Select all

configure:24920: g++ -o conftest -g -O2    conftest.cpp -framework OpenGL -lXi -lXxf86vm -lXext  -lSM -lICE -lX11   -lm  >&5
g++: OpenGL: No such file or directory
cc1plus: error: unrecognized command line option "-framework"
I thought the -framework option was just for Mac OS X... weird.

Anyway, you can try playing around with $CXXFLAGS, $CFLAGS, and $LDFLAGS to see if you can get them to find your headers and the corresponding libraries. I'm not a Mandriva expert, so that's about all the help I have to offer. :(

Posted: Fri Nov 23, 2007 3:44 am
by Ramen Noodles
Constitution wrote:

Code: Select all

configure:24920: g++ -o conftest -g -O2    conftest.cpp -framework OpenGL -lXi -lXxf86vm -lXext  -lSM -lICE -lX11   -lm  >&5
g++: OpenGL: No such file or directory
cc1plus: error: unrecognized command line option "-framework"
I thought the -framework option was just for Mac OS X... weird.

Anyway, you can try playing around with $CXXFLAGS, $CFLAGS, and $LDFLAGS to see if you can get them to find your headers and the corresponding libraries. I'm not a Mandriva expert, so that's about all the help I have to offer. :(
Thanks for the response. To double-check that something odd hadn't happened, I ran the autogen script, but I still get those same errors.

I'm looking at those FLAGS vars to learn what they do so I can try adjusting them.

Posted: Fri Nov 23, 2007 4:54 am
by blast
What error are you getting? That -framework test is just to see if your system supports it. The failure just means it doesn't.

What is the error that configure is giving you in the regular output? If necessary, pastebin your whole config.log file.

Posted: Fri Nov 23, 2007 5:46 am
by JeffM
the error is generic, it means that the openGL test app failed. This can happen for a number of reasons not just header issues.

check your configure log and verify that you have the basics to build. the most common thing missing is the C++ compiler g++, make sure you have that installed.

Posted: Sat Nov 24, 2007 6:57 am
by DTRemenak
/usr/bin/ld: cannot find -lopengl32
It compiles fine, just doesn't link...can't find your gl libs. If you're running a 64-bit distro you may need an additional library dir to link to opengl32.

Posted: Mon Nov 26, 2007 2:47 am
by Ramen Noodles
Thanks, guys, for your responses. I apologize for the delay. I've been busy with other tasks.

The problem is the 'missing gl.h' error that prevents creation of a client binary. Pastebin link for the config log is:

http://pastebin.com/m4c8b7ad

Line 2365 shows the error.


I appreciate the help.

Posted: Fri Nov 30, 2007 9:08 pm
by Enigma
I get the exact same error on my Mac; the configure script in the 2.0 branch cannot find OpenGL. In the 2.1 branch, however, configure able to find OpenGL and some other things that the 2.0 branch cannot find. Do not ask me why.

Posted: Sun Dec 02, 2007 3:30 am
by Ramen Noodles
Thanks for the response. I might try to hit the cvs and see if I have any luck there.

Posted: Sun Dec 09, 2007 4:31 am
by blast
Ramen Noodles wrote:Thanks for the response. I might try to hit the cvs and see if I have any luck there.
You'll want SVN, not CVS.

Posted: Fri Apr 04, 2008 8:29 pm
by Zinden
Anyone got this solved?
i got the same problem, it cant find my gl.h in my Foresight Linux.

configure: WARNING: Client build has been requested, but GL is not fully available (missing gl.h)
... disabling client generation

[zinden@localhost ~]$ locate gl.h
/usr/include/GL/gl.h


[zinden@localhost ~]$ conary q Mesa --troves --labels
Mesa=foresight.rpath.org@fl:2-qa/7.0.3-0.3-1
Mesa:config=foresight.rpath.org@fl:2-qa/7.0.3-0.3-1
Mesa:devel=foresight.rpath.org@fl:2-qa/7.0.3-0.3-1
Mesa:devellib=foresight.rpath.org@fl:2-qa/7.0.3-0.3-1
Mesa:lib=foresight.rpath.org@fl:2-qa/7.0.3-0.3-1
Mesa:supdoc=foresight.rpath.org@fl:2-qa/7.0.3-0.3-1


all mesa is there too

Posted: Fri Apr 04, 2008 8:47 pm
by blast
Verify that you have g++ installed, as this is one of the common reasons for this error to occur. If you do, then you'll have to check in the config.log file to see what really caused that check to fail.

Posted: Fri Apr 04, 2008 8:58 pm
by Zinden
[zinden@localhost ~]$ conary q gcc-c++
gcc-c++=4.1.2-11-0.1[~!gcc.core]


[zinden@localhost ~]$ conary q gcc-c++ --ls
/usr/share/man/man1/g++.1.gz
/usr/bin/c++
/usr/bin/g++
/usr/bin/i686-unknown-linux-c++
/usr/bin/i686-unknown-linux-g++
[zinden@localhost ~]$


So i got those installed, never had this issue when building other sources.

Gonna take a look in that log too

Posted: Fri Apr 04, 2008 9:03 pm
by Zinden

Code: Select all

configure:6006: gcc -c -O2 -march=i686 -g -D_FORTIFY_SOURCE=2 -fstack-protector  conftest.c >&5
configure:6012: $? = 0
configure:6026: result: yes
configure:6030: checking dlfcn.h presence
configure:6045: gcc -E  conftest.c
configure:6051: $? = 0
configure:6065: result: yes
configure:6098: checking for dlfcn.h
configure:6106: result: yes
configure:6129: checking how to run the C++ preprocessor
configure:6165: g++ -E  conftest.cpp
configure:6171: $? = 0
configure:6202: g++ -E  conftest.cpp
conftest.cpp:24:28: error: ac_nonexistent.h: No such file or directory
configure:6208: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "BZFlag"
| #define PACKAGE_TARNAME "bzflag"
| #define PACKAGE_VERSION "2.0.10"
| #define PACKAGE_STRING "BZFlag 2.0.10"
| #define PACKAGE_BUGREPORT "http://BZFlag.org/"
| #define PACKAGE "bzflag"
| #define VERSION "2.0.10"
| #define BZ_BUILD_OS "linux-gnu"
| #define BZ_BUILD_USER "zinden"
| #define BUILD_REGEX 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <ac_nonexistent>
configure:6241: result: g++ -E
configure:6270: g++ -E  conftest.cpp
configure:6276: $? = 0
configure:6307: g++ -E  conftest.cpp
conftest.cpp:24:28: error: ac_nonexistent.h: No such file or directory
configure:6313: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "BZFlag"
| #define PACKAGE_TARNAME "bzflag"
| #define PACKAGE_VERSION "2.0.10"
| #define PACKAGE_STRING "BZFlag 2.0.10"
| #define PACKAGE_BUGREPORT "http://BZFlag.org/"
| #define PACKAGE "bzflag"
| #define VERSION "2.0.10"
| #define BZ_BUILD_OS "linux-gnu"
| #define BZ_BUILD_USER "zinden"
| #define BUILD_REGEX 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <ac_nonexistent>

Maybe thats causing it?

Posted: Fri Apr 04, 2008 9:06 pm
by Zinden
my entirely log file attached

works for me

Posted: Tue Jul 29, 2008 10:43 pm
by landor
same problem on centos 5.2 compiling 2.0.12
installed gcc-c++ package solved the problem