Missing gl.h scuppers compile

For all the help you need with Armagetron!
hellomynameisphil
On Lightcycle Grid
Posts: 11
Joined: Sat Jun 03, 2006 8:30 am

Missing gl.h scuppers compile

Post by hellomynameisphil »

Hi all,

Me again. I'm on Kubuntu on an AMD 1 GHz. Just upgraded from Breezy to Dapper and the clean compile of aa I just fixed became broken. :-)

Now trying to re-compile and I get this after running "make":

Code: Select all

[Friendly messages and then]:
est -f 'opengl.cpp' || echo './'`opengl.cpp
opengl.cpp:17:19: error: GL/gl.h: No such file or directory
opengl.cpp: In function ‘void pDrawGroupp(int, bool, bool)’:
opengl.cpp:40: error: ‘GL_POINTS’ was not declared in this scope
opengl.cpp:42: error: ‘GL_CLIENT_VERTEX_ARRAY_BIT’ was not declared in this scope
opengl.cpp:42: error: ‘glPushClientAttrib’ was not declared in this scope
opengl.cpp:43: error: ‘GL_VERTEX_ARRAY’ was not declared in this scope
opengl.cpp:43: error: ‘glEnableClientState’ was not declared in this scope
opengl.cpp:46: error: ‘GL_COLOR_ARRAY’ was not declared in this scope
opengl.cpp:47: error: ‘GL_FLOAT’ was not declared in this scope
opengl.cpp:47: error: ‘glColorPointer’ was not declared in this scope
opengl.cpp:50: error: ‘GL_FLOAT’ was not declared in this scope
opengl.cpp:50: error: ‘glVertexPointer’ was not declared in this scope
opengl.cpp:51: error: ‘GLenum’ was not declared in this scope
opengl.cpp:51: error: ‘glDrawArrays’ was not declared in this scope
opengl.cpp:52: error: ‘glPopClientAttrib’ was not declared in this scope
opengl.cpp:54: error: ‘GL_COLOR_ARRAY’ was not declared in this scope
opengl.cpp:54: error: ‘glDisableClientState’ was not declared in this scope
opengl.cpp:59: error: ‘GLenum’ was not declared in this scope
opengl.cpp:59: error: ‘glBegin’ was not declared in this scope
opengl.cpp:68: error: ‘GLfloat’ was not declared in this scope
opengl.cpp:68: error: expected primary-expression before ‘)’ token
opengl.cpp:68: error: ‘glColor4fv’ was not declared in this scope
opengl.cpp:69: error: expected primary-expression before ‘)’ token
opengl.cpp:69: error: ‘glVertex3fv’ was not declared in this scope
opengl.cpp:74: error: expected primary-expression before ‘)’ token
opengl.cpp:82: error: ‘GLfloat’ was not declared in this scope
opengl.cpp:82: error: expected primary-expression before ‘)’ token
opengl.cpp:82: error: ‘glVertex3fv’ was not declared in this scope
opengl.cpp:87: error: expected primary-expression before ‘)’ token
opengl.cpp:90: error: ‘glEnd’ was not declared in this scope
opengl.cpp: In function ‘void pDrawGroupl(int, bool, bool, bool)’:
opengl.cpp:113: error: ‘glPushMatrix’ was not declared in this scope
opengl.cpp:114: error: ‘glTranslatef’ was not declared in this scope
opengl.cpp:117: error: ‘glScalef’ was not declared in this scope
opengl.cpp:119: error: ‘glScalef’ was not declared in this scope
opengl.cpp:143: error: ‘glMultMatrixd’ was not declared in this scope
opengl.cpp:148: error: ‘GLfloat’ was not declared in this scope
opengl.cpp:148: error: expected primary-expression before ‘)’ token
opengl.cpp:148: error: ‘glColor4fv’ was not declared in this scope
opengl.cpp:150: error: ‘glCallList’ was not declared in this scope
opengl.cpp:152: error: ‘glPopMatrix’ was not declared in this scope
make[4]: *** [libparticles_a-opengl.o] Error 1
make[4]: Leaving directory `/home/uzer/Desktop/armagetronad-0.2.8.1/src/thirdparty/particles'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/uzer/Desktop/armagetronad-0.2.8.1/src/thirdparty'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/uzer/Desktop/armagetronad-0.2.8.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/uzer/Desktop/armagetronad-0.2.8.1'
make: *** [all] Error 2
Seems like the missing gl.h is screwing everything up. What needs to be installed for gl.h to bring joy to make, which will in turn bring joy to me when it successfully compiles aa?

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

mesa-dev ?

I always wind up installing a bunch of dev packages including that, and glut, and a few others trying to get that header. Yet, you know, SDL is supposed to provide that too. Did you install sdl-dev?

Also, can you snip error output when it's so repetitive? You know, just show us the important stuff? :)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
Z-Man
God & Project Admin
Posts: 11232
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne, Jabber: [email protected]
Contact:

Post by Z-Man »

Also, after a system upgrade, it usually is a good idea to run ./configure again.

hellomynameisphil
On Lightcycle Grid
Posts: 11
Joined: Sat Jun 03, 2006 8:30 am

Post by hellomynameisphil »

I have tried installing anything I can find related to gl.h, including libgl1-mesa-dev, libglu1-mesa-dev, freeglut3-dev, glutg3-dev, libglut3-dev, libsdl1.2-dev, etc. Still no dice.

Here's what i do have in the directory where gl.h is supposed to be:

Code: Select all

[email protected]:~/Desktop/armagetronad-0.2.8.1$ ls -l /usr/include/GL/
total 224
-rw-r--r-- 1 root root  5028 2005-11-25 11:18 freeglut_ext.h
-rw-r--r-- 1 root root   681 2005-11-25 11:18 freeglut.h
-rw-r--r-- 1 root root 23684 2005-11-25 11:18 freeglut_std.h
-rw-r--r-- 1 root root 16668 2004-02-05 17:17 glu.h
-rw-r--r-- 1 root root  3315 2003-10-10 15:09 glu_mangle.h
-rw-r--r-- 1 root root   639 2005-11-25 11:18 glut.h
-rw-r--r-- 1 root root 30121 2006-05-05 07:42 glxext.h
-rw-r--r-- 1 root root 15078 2005-02-25 19:55 glx.h
-rw-r--r-- 1 root root  4257 2006-02-21 18:46 glxint.h
-rw-r--r-- 1 root root  2031 2003-06-04 17:50 glx_mangle.h
-rw-r--r-- 1 root root  2453 2006-02-21 18:46 glxmd.h
-rw-r--r-- 1 root root 75269 2006-02-21 18:46 glxproto.h
-rw-r--r-- 1 root root  8972 2006-02-21 18:46 glxtokens.h
drwxr-xr-x 2 root root  4096 2006-06-03 13:32 internal
That last directory also has glcore.h.

Sorry about not snipping the output in the original post, I just don't always know what's important and not.

And yes, I have run ./configure several times.

User avatar
Z-Man
God & Project Admin
Posts: 11232
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne, Jabber: [email protected]
Contact:

Post by Z-Man »

Indeed, the file is missing. It should be there, but it isn't.

This seems to be a common problem, googling for "gl.h Dapper Drake" gives a lot of hits.

mesa-common-dev may be another package you can try. A command listing further candidates would be "apt-file search gl.h | grep /gl.h$"

User avatar
joda.bot
Match Winner
Posts: 421
Joined: Sun Jun 20, 2004 11:00 am
Location: Germany
Contact:

Post by joda.bot »

This sounds really strange....

Are you sure this happens during make ?

Check you have automake-1.9(.6) and autoconf-2.59 (the newest versions of those). Also be sure to run ./bootstrap.sh before running ./configure

I might be wrong but to me the only place you could have a opengl.cpp is during configure phase, as Armagetron Ad does not have a "opengl.cpp" AFAIK.

User avatar
Z-Man
God & Project Admin
Posts: 11232
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne, Jabber: [email protected]
Contact:

Post by Z-Man »

Don't listen to joda :)

1. The file in question is in thirdparty, in an actually unused part of the code that's now been replaced. While removing this unused part would fix the error, it likely wouldn't fix it globally. Files that are compiled later need gl.h indirectly as well.
2. during configure, we don't check for the location of the OpenGL headers. We delegate this part to SDL. No error would be expected during configure.

Getting gl.h still is your best course of action. If that fails, try replacing the failing include with
#include <SDL_opengl.h>
If the header is anywhere to be found, SDL should know where.

hellomynameisphil
On Lightcycle Grid
Posts: 11
Joined: Sat Jun 03, 2006 8:30 am

Post by hellomynameisphil »

mesa-common-dev may be another package you can try. A command listing further candidates would be "apt-file search gl.h | grep /gl.h$"
mesa-common-dev in already installed. "apt-file search gl.h | grep /gl.h$" returns no results.
Getting gl.h still is your best course of action. If that fails, try replacing the failing include with
#include <SDL_opengl.h>
Sorry, where/how do I change this? I actually don't know much about the process of compiling, so I don't yet know how to "replace an include".

User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

go into opengl.cpp (text editor) and replace #include <gl.h> by #include <SDL_opengl.h> ;)
There's no place like ::1

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Also try reinstalling your video drivers. That file in particular comes with the nvidia driver, iirc.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

hellomynameisphil
On Lightcycle Grid
Posts: 11
Joined: Sat Jun 03, 2006 8:30 am

Post by hellomynameisphil »

go into opengl.cpp (text editor) and replace #include <gl.h> by #include <SDL_opengl.h>
Now I just get this:

Code: Select all

/usr/include/SDL/SDL_opengl.h:44:60: error: GL/gl.h: No such file or directory
and a bunch of errors related to glu.h!

Looks like including SDL_opengl.h in opengl.cpp instead of GL/gl.h won't work, because /SDL_opengl.h itself needs GL/gl.h!

Argh!
Also try reinstalling your video drivers. That file in particular comes with the nvidia driver, iirc.
No dice.

Is this ultimately a problem with Kubuntu? Should I be taking this to a Kubuntu forum?

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

I'm thinking so. I've had problems like that in Mandriva once upon a time that were fixed with an upgrade when the newest version became available. I'm running Breezy here with no problems, and you said you had Breezy yourself before with no problems. Looks like either fallout from the upgrade, or Dapper hasn't taken into account we might want to build openGL apps.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

hellomynameisphil
On Lightcycle Grid
Posts: 11
Joined: Sat Jun 03, 2006 8:30 am

make[3]: *** No rule to make target `armagetronad_main'

Post by hellomynameisphil »

Me again. I got gl.h. Now make gives me:

Code: Select all

make[3]: *** No rule to make target `armagetronad_main', needed by `all-am'.  Stop.
How do I fix this? I don't know much about compiling stuff, so I may be missing something relatively obvious. I havent found anything else in the forums about it and certainly not on google.

pavelo
Average Program
Posts: 70
Joined: Sun Apr 23, 2006 4:05 pm

Re: make[3]: *** No rule to make target `armagetronad_main'

Post by pavelo »

hellomynameisphil wrote:Me again. I got gl.h. Now make gives me:

Code: Select all

make[3]: *** No rule to make target `armagetronad_main', needed by `all-am'.  Stop.
How do I fix this?
Something messed up your Makefile. You can try fixing it by running ./configure again, but the safest bet would be to download the sources again, extract them somewhere else and try compiling there.

hellomynameisphil
On Lightcycle Grid
Posts: 11
Joined: Sat Jun 03, 2006 8:30 am

Post by hellomynameisphil »

Code: Select all

In file included from general.h:10,
                 from action_api.cpp:9:
papi.h:11:18: error: defs.h: No such file or directory
Is this another Dapper issue? What should I install to get defs.h? apt-file search gives me nothing.

Post Reply