Linux - porblems while compiling

Report bugs, bug fixes and workarounds here.
Guest

Linux - porblems while compiling

Post #1by Guest » 12.06.2002, 15:21

Hi !

I'm using gentoo Linux. I know that my opengl is working, because i can play quake3 in all it's glory. However i encounter problems, when i want to buil celestia 1.2.4.

configure runs without errors.
Then i type "make" and everything just looks fine, but suddenly i got warnings , which say that
Funcion gl******** is previously declared. For e.g:

glext.h:288: `void (* glCombinerParameterfvNV)(unsigned int, const GLfloat *)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2164: previous declaration of `void glCombinerParameterfvNV(unsigned int, const GLfloat *)'
glext.h:289: `void (* glCombinerParameterivNV)(unsigned int, const GLint *)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2166: previous declaration of `void glCombinerParameterivNV(unsigned int, const GLint *)'
glext.h:290: `void (* glCombinerParameterfNV)(unsigned int, float)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2163: previous declaration of `void glCombinerParameterfNV(unsigned int, float)'
glext.h:291: `void (* glCombinerParameteriNV)(unsigned int, int)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2165: previous declaration of `void glCombinerParameteriNV(unsigned int, int)'
glext.h:292: `void (* glCombinerInputNV)(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)' redeclared as different kind of symbol


then make aborts. I have no clue why . I will be glad, if someone could help me to solve this problem.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Linux - porblems while compiling

Post #2by t00fri » 12.06.2002, 15:48

Anonymous wrote:Hi !

I'm using gentoo Linux. I know that my opengl is working, because i can play quake3 in all it's glory. However i encounter problems, when i want to buil celestia 1.2.4.

configure runs without errors.
Then i type "make" and everything just looks fine, but suddenly i got warnings , which say that
Funcion gl******** is previously declared. For e.g:

glext.h:288: `void (* glCombinerParameterfvNV)(unsigned int, const GLfloat *)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2164: previous declaration of `void glCombinerParameterfvNV(unsigned int, const GLfloat *)'
glext.h:289: `void (* glCombinerParameterivNV)(unsigned int, const GLint *)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2166: previous declaration of `void glCombinerParameterivNV(unsigned int, const GLint *)'
glext.h:290: `void (* glCombinerParameterfNV)(unsigned int, float)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2163: previous declaration of `void glCombinerParameterfNV(unsigned int, float)'
glext.h:291: `void (* glCombinerParameteriNV)(unsigned int, int)' redeclared as different kind of symbol
/usr/X11R6/include/GL/gl.h:2165: previous declaration of `void glCombinerParameteriNV(unsigned int, int)'
glext.h:292: `void (* glCombinerInputNV)(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)' redeclared as different kind of symbol


then make aborts. I have no clue why . I will be glad, if someone could help me to solve this problem.


If you have a look into the Celestia sources in src/celengine, you will see that Celestia has its own gl.h, glext.h headers that are supposed to be loaded in the routine glext.cpp instead of the corresponding system headers carrying identical names. In your Linux distribution, it seems that the system headers are loaded first and that causes the collision.

It does not happen on RedHat Linux and SuSE Linux (that I use). So I suggest that you have a closer look in this direction. Unfortunately I have no detailed knowledge about the pecularities of your Linux distribution.

Bye Fridger

Guest

thx

Post #3by Guest » 13.06.2002, 07:30

Uh oh..that doesn't sound too good ! Oh well. At least now i know why celestia doesn't compile. Thank you for your help anyway !

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

thx

Post #4by t00fri » 13.06.2002, 07:41

Anonymous wrote:Uh oh..that doesn't sound too good ! Oh well. At least now i know why celestia doesn't compile. Thank you for your help anyway !


A quick way of finding out in which /sequence/ the various header directories are searched by the compiler is the following:

cd to src/celengine
rm glext.o

replace in Makefile

CXX = g++ by CXX = g++ -v

and type make

Once you verify that the local directory is searched /after/ the system include dir (/usr/X11R6/include/GL I think it was in your case), you may always enforce a different sequence by means of -I <path> statements. See man gcc...

Bye Fridger

Guest

Post #5by Guest » 23.07.2002, 10:38

I also had the same problem with gentoo linux and GL clashing.. I'm looking for a way around it.... Hopefully the package maintainers will be able to fix it up on the gentoo servers.. I suspect it's something to do with having the NVIDIA drivers installed as well. Will have to see..

Tim

Guest

Post #6by Guest » 04.09.2002, 04:52

I also had the same problem with gentoo linux and GL clashing.. I'm looking for a way around it.... Hopefully the package maintainers will be able to fix it up on the gentoo servers.. I suspect it's something to do with having the NVIDIA drivers installed as well. Will have to see..


In Gentoo, you have to switch to xfree opengl setting before compiling, then switch back to the nvidia afterwords. Do it like this:

Code: Select all

opengl-update xfree
emerge celestia
opengl-update nvidia


Hope that helps!


Return to “Bugs”