2.0.10 configure: missing gl.h

Questions or HOWTOs about the above? Post 'em here...
Post Reply
Ramen Noodles
Private
Private
Posts: 4
Joined: Mon Dec 12, 2005 10:03 pm

2.0.10 configure: missing gl.h

Post 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.
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post 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. :(
Ramen Noodles
Private
Private
Posts: 4
Joined: Mon Dec 12, 2005 10:03 pm

Post 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.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post 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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post 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.
ImageJeffM
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post 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.
Ramen Noodles
Private
Private
Posts: 4
Joined: Mon Dec 12, 2005 10:03 pm

Post 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.
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post 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.
Ramen Noodles
Private
Private
Posts: 4
Joined: Mon Dec 12, 2005 10:03 pm

Post by Ramen Noodles »

Thanks for the response. I might try to hit the cvs and see if I have any luck there.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post 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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Zinden
Private
Private
Posts: 4
Joined: Fri Apr 04, 2008 8:19 pm

Post 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
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post 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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Zinden
Private
Private
Posts: 4
Joined: Fri Apr 04, 2008 8:19 pm

Post 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
Zinden
Private
Private
Posts: 4
Joined: Fri Apr 04, 2008 8:19 pm

Post 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?
Zinden
Private
Private
Posts: 4
Joined: Fri Apr 04, 2008 8:19 pm

Post by Zinden »

my entirely log file attached
Attachments
config.log.zip
config log
(14.49 KiB) Downloaded 147 times
landor
Private
Private
Posts: 1
Joined: Tue Jul 29, 2008 9:58 pm

works for me

Post by landor »

same problem on centos 5.2 compiling 2.0.12
installed gcc-c++ package solved the problem
Post Reply