Obtaining libGLU from source

Ciprian Popovici ciprian at zuavra.net
Tue Mar 22 04:59:42 PST 2005


On Sat, 12 Mar 2005 19:12:29 +0100 Roland Mainz <roland.mainz at nrubsig.org>
wrote:
> Ciprian Popovici wrote:
> > > I've noticed that I don't get libGLU libraries built and installed
> > > with 6.8.2, building from source. What do I need to do to obtain
> > > them as well? I've worked around this by compiling Mesa and it works
> > > fine. But between Mesa, X.org and the NVidia driver, it's getting a
> > > mess keeping track of the various alternative libGL* files.
> > 
> > Is this a very obvious issue? I'm sorry, but I didn't seem to find any
> > help in the files that came with the source, nor on the Web. I'd
> > appreciate a pointer.
> 
> AFAIK libGLU is build by default (except on Solaris, that issue was
> fixed in Xorg trunk after X11R6.8.x was branched but I am not sure
> whether the patch was ported back) when you build the GLX/OpenGL code
> (take a look at xc/config/cf/ and search for |BuildGLULibrary|).
> 
> Questions:
> - Which OS/platform do you use ?

It's a LFS/RedHat mix. gcc and make are from source, glibc and binutils
are from RPM.

gcc             : 3.3.3
glibc           : 2.3.2-33.9
make            : GNU Make 3.80
binutils        : 2.13.90.0.20-7

> - Do you have a C++ compiler (libGLU is a C++ library) ?

See above.

> - Do you build with |BuildGLXLibrary| set to |YES| ?
> - Do you build with |BuildLibraries| set to |YES| ?

I'm using a host.def which I've derived from linux.cf.

The only xc/config/cf file that has BuildGLULibrary is sun.cf. I've
followed it and put this in my host.def:

-----------------------------------------------------------------
#ifndef BuildGLULibrary
#define BuildGLULibrary YES
#endif
-----------------------------------------------------------------

FWIW, I defined BuildGLXLibrary and BuildLibraries too, but they have no
notable effect over what I already achieve by defining BuildGLULibrary.

Now it attempts compilation of GLU, but the following error occurs:

-----------------------------------------------------------------
make[5]: Entering directory `/usr/src/build/lib/GLU/libnurbs/internals'
rm -f arc.o
c++ -c -O2         -I/opt/zlib/include  -I/opt/expat/include    -I/opt/
fontconfig/include       -I/us r/src/xc/lib/Xrender       -I/usr/src/xc/
include/extensions        -I/usr/src/xc/extras/freetype2/inc lude  -I/usr/
src/xc/lib/Xft        -fPIC arc.cc
arc.cc:44:23: glimports.h: No such file or directory
arc.cc:45:21: mystdio.h: No such file or directory
In file included from arc.h:46, from arc.cc:47: bufpool.h:46:22:
mystdlib.h: No such file or directory
-----------------------------------------------------------------

I had to add this to DefaultGcc2i386Opt: 
-I /usr/src/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/nurbtess

Now it gets over that, but fails with the following error:

-----------------------------------------------------------------
make[5]: Entering directory `/usr/src/build/lib/GLU/libnurbs/internals'
rm -f arc.o
c++ -c -O2         -I/opt/zlib/include  -I/opt/expat/include    -I/opt/
fontconfig/include       -I/usr/src/xc/lib/Xrender       -I/usr/src/xc/
include/extensions        -I/usr/src/xc/extras/freetype2/include  -I/usr/
src/xc/lib/Xft   -I/usr/src/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/
nurbtess        -fPIC arc.cc
In file included from arc.h:46,
                 from arc.cc:47:
bufpool.h: In member function `void Pool::free_buffer(void*)':
bufpool.h:88: error: `assert' undeclared (first use this function)
-----------------------------------------------------------------

At which point I stopped. I don't know what the issue is. bufpool.h
apparently does #include "myassert.h", and there's a -DLIBRARYBUILD in
effect so it should pick up #include <assert.h>. I even tried commenting
out the surrounding test to make sure assert.h is included, and I still
get this error.

-- 
Ciprian Popovici



More information about the xorg mailing list