[GRASSLIST:6140] Re: problem compiling g3d
Glynn Clements
glynn.clements at virgin.net
Fri Apr 25 17:32:05 EDT 2003
Nico Hardebol wrote:
> to start with g3d in order to have 3d raster modules in grass I did:
>
> gmake -i src.contrib/GMSL/g3d 2>&1 | tee compileOutput.log
>
> some functions are compiled properly lik r3.info... but
> #################################################################
> /home/nico/grass5.0.2/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL
> make -f OBJ.i686-pc-linux-gnu/make.rules
>
> make[3]: Entering directory
> `/home/nico/grass5.0.2/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL'
> gcc -I/home/nico/grass5.0.2/src/include -g -O2 -I/home/nico/grass5.0.2/src
> /libes/dspf -I/home/nico/grass5.0.2/src/libes/ogsf -I/usr/X11R6/include
> -c new_init_graphics.c -o OBJ.i686-pc-linux-gnu/new_init_graphics.o
> new_init_graphics.c:16:19: Xm/Xm.h: No such file or directory
Either Motif isn't installed, or it isn't detected. r3.showdspf.openGL
requires Motif. The rest of the errors are a consequence of this.
> somewhere I read that grass configured with GLw is required to compile these
> additional modules (g3d etc..) properly - since I recognize problems with
> GLw in the error message - is this true?
The --with-glw switch is necessary to ensure that OPENGLwINC and LGLWM
are set; you also need to use --with-motif so that XMINC and XMLIB are
set.
> So
> ./configure --with-postgres-includes=/usr/local/pgsql/include --with-postgre
> s-libs=/usr/local/pgsql/lib --with-dbm --with-gdal=/home/nico/gdal-1.1.8 --w
> ith-glw --with-glw-includes=/usr/X11R6/include/ --with-freetype --with-freet
> ype-includes=/usr/include/freetype2 --with-freetype-libs=/usr/lib
>
> .....
> checking for location of FFTW library...
> checking for fftwnd_one in -lfftw... no
> checking for fftwnd_one in -ldfftw... yes
> checking whether to use BLAS... no
> checking whether to use LAPACK... no
> checking whether to use Motif... no
> checking whether to use GLw... yes
> checking for location of GLw includes...
> checking for GL/GLwMDrawA.h... no
> configure: error: *** Unable to locate GLwM includes.
>
> why can't he find GLwMDrawA.h since it's located in /usr/X11R/include/GL/
Because GLwMDrawA.h does this:
#ifndef __GLX_MOTIF
#define __GLX_MOTIF 1
#endif
#include <GL/GLwDrawA.h>
and GLwDrawA.h does this:
#ifdef __GLX_MOTIF
# ifndef __GLX_INCLUDE_XM_H /* Defined during library compilation */
# include <Xm/Xm.h> /* We need to know about XmVERSION early */
# endif
#endif
but either you don't have Xm/Xm.h (a Motif header), or configure can't
find it, so the test fails.
> earlier with other version of GLw I passed GLw includes but received error
> at GLw libraries .. couldn't find GLwCreateMDrawing....
>
> I've both tried the mesa-devel-5.0-62.i586.rpm as
> XFree86-GLX-devel-4.3.0-15.i586.rpm including the Glw lib & incl
> with GLwDraWA.h in /usr/X11R6/include/GL/GLwMDrawA.h
> and GLwCreateMDrawingArea.... is this
> /usr/X11R6/man/man3/GLwCreateMDrawingArea.3x.gz?? not an include..
There are two versions of the GL drawing area widget; one requires
Motif, and the other doesn't. However, as Motif isn't installed by
default on many Linux systems, libGLw.a may only contain the non-Motif
version, with the Motif version in a separate library (libGLwM.a).
r3.showdspf.openGL uses the Motif version, so you need Motif, and you
need a GLw library with the Motif version of the GL drawing area
widget.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list