[GRASS5] Re: grass51

Hi Jaro,

(cc GRASS5)

I have exactly the same problem and no idea how to solve it.

Dear developers, we try to compile GRASS51/nviz with PostgreSQL
support, since recently it doesn't compile any more.

Any suggestions?
Thanks,

Markus

On Sat, Mar 16, 2002 at 11:17:37AM -0500, Jaro Hofierka wrote:

Hi Markus,

sorry for taking your time, but we still have some problems compiling
grass51. It looks strange for me that compiler couldn't find runInfxQry
and runqry because they are in runInfxQry.c already compiled and
included in Makefile (see below).
I have used cvs as well.
I appreciate your help.

J.

-o OBJ.i686-pc-linux-gnu/runInfxQry.o -c runInfxQry.c
gcc -s -L/home/grass/grass51/dist.i686-pc-linux-gnu/lib -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
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libogsf.a
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libimage.a \
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libbitmap.a
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/liblinkm.a
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libvect.a
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libdig2.a
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libshape.a -lpq
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libbtree.a \
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libgis.a -lm
-I/usr/include -L/usr/lib -lz \
/home/grass/grass51/dist.i686-pc-linux-gnu/lib/libdatetime.a
-L/usr/lib -ltk8.3 -ltcl8.3 -lGLU -L/usr/lib -L/usr/local/lib
-L/usr/lib/X11 -L/usr/X11R6/lib -lGL -lSM -lICE -lX11 -lXmu -lXext -lm
-ldl -I/usr/include -L/usr/lib -lz -L/usr/X11R6/lib -L/usr/lib -lpq
-ltiff -lSM -lICE -lX11
OBJ.i686-pc-linux-gnu/query_postgr.o: In function `query_postgr':
/home/grass/grass51/visualization/nviz/src/query_postgr.c:59: undefined
reference to `runInfxQry'
OBJ.i686-pc-linux-gnu/query_postgr.o: In function `query_pg_site':
/home/grass/grass51/visualization/nviz/src/query_postgr.c:102: undefined
reference to `runqry'
collect2: ld returned 1 exit status
make[3]: *** [nvwish] Error 1
make[3]: Leaving directory `/home/grass/grass51/visualization/nviz/src'
make[2]: *** [nvwish] Error 2
make[2]: Leaving directory `/home/grass/grass51/visualization/nviz'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/grass/grass51/visualization'
make: *** [default] Error 1

My Makefile:

# $Id: Makefile.in,v 1.1 2002/02/05 21:51:01 radim Exp $
# Makefile for building nvwish
# Requires Tk 8.x and Tcl 8.x

MODULE_TOPDIR = ../../..

include $(MODULE_TOPDIR)/include/Make/Platform.make
include $(MODULE_TOPDIR)/include/Make/Grass.make
include $(MODULE_TOPDIR)/include/Make/Rules.make

# These should be set by the doconfigure script
NVWISH_VER=NVWISH2.2
PQ_OBJS=openvect.o getCat.o buildInfxQry.o runInfxQry.o

OGL_LIBS = $(OPENGLULIB) $(OPENGLLIB) $(OPENGL32) $(XLIB) -lXmu -lXext
$(MATHLIB) $(DLLIB) $(XDRLIB) $(XEXTRALIBS) $(XLIBPATH)

SURFLIB = $(OGSFLIB)

# Stuff for mkdspf - not yet implemented
# DSPLIB = $(LIBDIR)/libes/dspf/libdsp3.a
# DSPINC = -I$(LIBDIR)/libes/dspf

EXTRA_CFLAGS= ${XCFLAGS} ${TCLINCDIR} ${TKINCDIR} \
        $(INC) \
        -D_NO_PROTO -D__STDC__ $(TIFFINCPATH) $(DSPINC) $(PQINCPATH)

IMGLIB= $(IMAGELIB)

XTRA_LDFLAGS=$(DFLAGS) $(TCLTKLIBPATH) $(TCLTKLIBS) $(OGL_LIBS)
$(PQLIBPATH) $(PQLIB)

OBJS = nvizAppInit.o change_view.o draw.o exag.o glwrappers.o \
        init_commands.o lights.o map_obj.o misc.o nviz_init.o \
        position.o quick_draw.o anim_support.o cutplane_obj.o \
        script_support.o do_zoom.o \
        label.o nvizMain.o togl.o togl_cb.o\
        query_postgr.o $(PQ_OBJS)
# mkdspf_calc_linefax.o mkdspf_init_file.o mkdspf_main.o \
# mkdspf_fill_cfax.o mkdspf_iso_surface.o

ARCH_OBJS := $(foreach obj,$(OBJS),$(OBJDIR)/$(obj))

default: nvwish

#gsf:
# cd $(SURF_INCDIR) ; $(GMAKE)
# touch nviz_init.c

nvwish: $(ARCH_OBJS) $(VECTLIB) $(BITMAPLIB) $(LINKMLIB)
        $(CC) $(LDFLAGS) -o $@ $(ARCH_OBJS) $(SURFLIB) $(IMGLIB) \
        $(BITMAPLIB) $(LINKMLIB) $(VECTLIB) \
        $(GISLIB) $(MATHLIB) $(XDRLIB) \
        $(DATETIMELIB) $(XTRA_LDFLAGS) -ltiff $(XLIB)

Markus Neteler wrote:

I have exactly the same problem and no idea how to solve it.

Dear developers, we try to compile GRASS51/nviz with PostgreSQL
support, since recently it doesn't compile any more.

More precisely, since I added the option of building using GNU make
rather than gmake5.

Any suggestions?

The whole of src/runInfxQry.c (which defines the missing symbols
"runInfxQry" and "runqry") is now conditionalised upon:

#if defined(HAVE_POSTGRES_H) || defined(HAVE_POSTGRES_FE_H)

The grass51 version of config.h.in doesn't have either of these
symbols, but instead has HAVE_POSTGRES. The grass51 configure.in
script appears to be based upon a rather old version of configure.in.

For a quick fix, just define the symbols manually in config.h, or in a
Makefile.

If "grass51" is to use code from the grass5 tree, it needs to have
(more or less) the same versions of configure.in, config.h.in,
src/CMD/* etc, to ensure that any necessary #define's or -D switches
are provided.

FWIW, I think that having three separate branches is unrealistic for a
project which only has around half a dozen active developers.

--
Glynn Clements <glynn.clements@virgin.net>

On Mon, Mar 18, 2002 at 09:09:15AM +0000, Glynn Clements wrote:

FWIW, I think that having three separate branches is unrealistic for a
project which only has around half a dozen active developers.

IMO it is very realistic,
but we have to keep people from adding in the wrong places.

We cannot recommend the development branch to non-developers.
So these complilation problems are normal and to be expected.
Do not put too much energy in to fix them.

We'd better create a new release branch IMO.