[GRASS5] nviz compilation with PG support?

Markus Neteler neteler at itc.it
Tue Aug 27 03:31:05 EDT 2002


On Tue, Aug 27, 2002 at 12:51:29AM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > to extend the build script to separately compile
> > NVIZ with PGSQL support, I am currently trying
> > to compile that. But I get a strange error:
> > 
> > gmake5 src.contrib/GMSL/NVIZ2.2
> > [...]
> > #################################################################
> > /hardmnt/thuille1/ssi/cvsgrass_exp/src.contrib/GMSL/NVIZ2.2
> >   make -f OBJ.i686-pc-linux-gnu/make.rules
> > 
> > *** PostgreSQL supported ***
> > [...]
> > 
> > make[1]: Entering directory `/hardmnt/thuille1/ssi/cvsgrass_exp/src.contrib/GMSL/NVIZ2.2/src'
> > gcc -L/hardmnt/thuille1/ssi/cvsgrass_exp/src/libes/LIB.i686-pc-linux-gnu  -o nvwish OBJ.i686-pc-linux-gnu/nvizAppInit.o OBJ.i686-pc-linux-gnu/change_view.o OBJ.i686-pc-linux-gnu/draw.o OBJ.i686-pc-linux-gnu/exag.o OBJ.i686-pc-linux-gnu/glwrappers.o OBJ.i686-pc-linux-gnu/init_commands.o OBJ.i686-pc-linux-gnu/lights.o OBJ.i686-pc-linux-gnu/map_obj.o OBJ.i686-pc-linux-gnu/misc.o OBJ.i686-pc-linux-gnu/nviz_init.o OBJ.i686-pc-linux-gnu/position.o OBJ.i686-pc-linux-gnu/quick_draw.o OBJ.i686-pc-linux-gnu/anim_support.o OBJ.i686-pc-linux-gnu/cutplane_obj.o OBJ.i686-pc-linux-gnu/script_support.o OBJ.i686-pc-linux-gnu/do_zoom.o OBJ.i686-pc-linux-gnu/label.o OBJ.i686-pc-linux-gnu/nvizMain.o OBJ.i686-pc-linux-gnu/togl.o OBJ.i686-pc-linux-gnu/togl_cb.o OBJ.i686-pc-linux-gnu/query_postgr.o OBJ.i686-pc-linux-gnu/openvect.o OBJ.i686-pc-linux-gnu/getCat.o OBJ.i686-pc-linux-gnu/buildInfxQry.o OBJ.i686-pc-linux-gnu/runInfxQry.o /hardmnt/thuille1/ssi/cvsgrass_exp/src/libes/ogsf/LIB.i686-pc-li!
> nu!
> > x-gnu/libgsf.a /hardmnt/thuille1/ssi/cvsgrass_exp/src/libes/libimage/LIB.i686-pc-linux-gnu/libimage.a \
> > -lbitmap -llinkm -lvect -ldig2 \
> > -lgis -lm  -lz   \
> > -ldatetime  -L/usr/lib -ltk -lm  -ltcl -lm -lGLU  -lGL   -lSM -lICE -lX11 -lXmu
> > -lXext -lm  -ldl -lz    -L/usr/X11R6/lib  -lpq   -ltiff -lm -lSM -lICE -lX11
> > OBJ.i686-pc-linux-gnu/query_postgr.o: In function `query_postgr':
> > OBJ.i686-pc-linux-gnu/query_postgr.o(.text+0x105): undefined reference to `runInfxQry'
> > OBJ.i686-pc-linux-gnu/query_postgr.o: In function `query_pg_site':
> > OBJ.i686-pc-linux-gnu/query_postgr.o(.text+0x1ff): undefined reference to `runqry'
> > collect2: ld returned 1 exit status
> > make[1]: *** [nvwish] Error 1
> > 
> > Some checks:
> > *  -lpq is present above
> > *  src/include/config.h -> PG is defined.
> > *  gmake5 src.garden/grass.postgresql/d.rast.pg  -> compiles, runInfxQry is
> >                                                     also used here
> > 
> > Any hints for me?
> 
> You need to use "make clean".

Ah, got it know, it's even easier.
 
> GRASS doesn't have accurate dependency information; if you change any
> header files or build files (Gmakefiles or src/CMD/generic/*), you
> have to manually ensure that anything which needs to be rebuilt does
> get rebuilt.
> 
> In this case, both of those functions are defined in runInfxQry.c;
> however, the whole of that file is conditional upon:
> 
> #if defined(HAVE_POSTGRES_H) || defined(HAVE_POSTGRES_FE_H)
> 
> Consequently, your runInfxQry.o (from the previous compilation) will
> be empty.

That's it: I was deleting
rm -rf src.contrib/GMSL/NVIZ2.2/OBJ.$ARCH

only and missed:
rm -rf src.contrib/GMSL/NVIZ2.2/src/OBJ.$ARCH

Now it compiles happily.

Thanks,

 Markus




More information about the grass-dev mailing list