failure to compile

General discussion about Celestia that doesn't fit into other forums.
Topic author
florin
Posts: 5
Joined: 21.06.2003
With us: 21 years 5 months
Location: Palo Alto, CA
Contact:

failure to compile

Post #1by florin » 21.06.2003, 02:26

My system is Linux Red Hat 9, on an NForce-based motherboard (MSI). The graphics card on these boards is embedded, using the GeForce2 chipset.
I'm using the latest RH kernel update, and the latest official NVidia driver, compiled on this same system. The graphics system seems to be working fine, i didn't have any problems.
I downloaded Celestia from here http://shrike.freshrpms.net/ and tried to rebuild the src.rpm on my system. Well, it failed. Here is the error:

Code: Select all

[root@rivendell root]# rpmbuild --rebuild --target=athlon celestia-1.3.0-fr1.src.rpm

... a lot of snipped stuff ...

checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for glNewList in -lGL... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for gluLookAt in -lGLU... yes
checking GL/glut.h usability... yes
checking GL/glut.h presence... yes
checking for GL/glut.h... yes
checking for glutKeyboardUpFunc in -lglut... no
configure: error: GLUT library version >= 3.7 not found


However, i do have glut installed:

Code: Select all

[root@rivendell root]# rpm -qa | grep glut
glut-devel-3.7-12
glut-3.7-12
[root@rivendell root]#


The config.log file reveals this:

Code: Select all

configure:20686: checking for glutKeyboardUpFunc in -lglut
configure:20717: gcc -o conftest -ansi -W -Wall -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2  -O2 -march=athlon-xp -mfpmath=sse  -I/usr/X11R6/include  -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer   conftest.c -lglut  -lGLU -lGL  -lSM -lICE  -lm   -L/usr/X11R6/lib -lXmu -lXi -lXext -lX11 -lm -lz  -lGL >&5
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXChannelRectSyncSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXChannelRectSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXQueryChannelRectSGIX'
collect2: ld returned 1 exit status
configure:20720: $? = 1
configure: failed program was:
| #line 20693 "configure"
| /* confdefs.h.  */


The guy who created the src.rpm (Matthias Saou) says it compiles fine on his system. He's using the same Red Hat 9, has a GeForce card, but he's not using the official NVidia drivers. His allegation (and my suspicion too) is that the NVidia driver somehow replaced a few things on my system, hence the compilation fails.

Can anyone shed some more light?
Anyone else with RH9 and the official NVidia drivers here? Does Celestia compile fine on your system?
What could be the cause for the failure? What can i do to fix that?

If you need more information, let me know.

Thank you,

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 8 months
Location: San Sebastian (Spain)

Post #2by jamarsa » 21.06.2003, 06:19

Maybe you have the wrong gl.h and/or glu.h headers. Please post the size and first lines of these headers to check against mine. Sometimes the nVidia drivers replaces them.

I have the Mesa libraries:

# rpm -qa | grep glut

libMesaglut3-4.0.3-6mdk
libMesaglut3-devel-4.0.3-6mdk

Topic author
florin
Posts: 5
Joined: 21.06.2003
With us: 21 years 5 months
Location: Palo Alto, CA
Contact:

Post #3by florin » 21.06.2003, 08:22

On my system, gl.h and glu.h are owned by the XFree86-devel package.
Anyway, here are the sizes:

Code: Select all

91513 Feb 27 08:21 gl.h
15916 Feb 27 08:21 glu.h


And here are snippets...

gl.h

Code: Select all

/* $Id: gl.h,v 1.16 2002/12/16 16:18:25 dawes Exp $ */
 
/*
 * Mesa 3-D graphics library
 * Version:  4.0.4
 *
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.


glu.h

Code: Select all

/* $XFree86: xc/include/GL/glu.h,v 1.1 2001/01/15 22:17:50 dawes Exp $ */
 
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 8 months
Location: San Sebastian (Spain)

Post #4by jamarsa » 21.06.2003, 08:50

I'm suspicious at your gl.h... seems an newer version of the Mesa libraries (4.0.4). Also I forgot to include glx.h in my query, as the errors seem to be related to it (sorry just got up from bed).

My glu.h is owned by the Mesa GLU devel package (libMesaGLU1-devel-4.0.3-6mdk, Mandrake distribution) .

Why does your system load the dynamic library from gcc-lib if it's owned by Xfree86? Not necessarily bad, just a thought ... :roll:

Topic author
florin
Posts: 5
Joined: 21.06.2003
With us: 21 years 5 months
Location: Palo Alto, CA
Contact:

Post #5by florin » 21.06.2003, 10:54

jamarsa wrote:I'm suspicious at your gl.h... seems an newer version of the Mesa libraries (4.0.4).
I dunno, my RPM database claims it comes with XFree86-devel-4.3.0-2
jamarsa wrote:Also I forgot to include glx.h in my query, as the errors seem to be related to it (sorry just got up from bed).
No problem. Snippet is below. The size of the file is 7915.

Code: Select all

#ifndef __GLX_glx_h__
#define __GLX_glx_h__
 
/* $XFree86: xc/include/GL/glx.h,v 1.9 2002/02/22 21:32:50 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.

jamarsa wrote:Why does your system load the dynamic library from gcc-lib if it's owned by Xfree86? Not necessarily bad, just a thought ... :roll:

I have no idea.

What else should i try?

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 8 months
Location: San Sebastian (Spain)

Post #6by jamarsa » 21.06.2003, 13:34

Your glx.h seems ok...

My suggestions:

-Try to see if you have all the Mesa development packages installed (GLU, for example). If not, install them.
-Make sure you don't have another copy of the libglut.so library (perhaps as libglut.so.xxx). If you have another library, and specially if it is in the /usr/X11R6/lib directory, give preference to it by the ./configure --with-glut-libs=<directory> option.
-As a last resort, install Mesa sources and compile&install -in a local directory!! don't overwrite the system ones -. After that, give the path of your compiled libraries and includes with the options:

--with-gl-libs=<directory>
--with-gl-inc=<directory>
--with-glut-libs=<directory>
--with-glut-inc=<directory>

Try my suggestions in the order given, and try to configure for each one.


Return to “Celestia Users”