[GRASS5] g51: v.out.ogr compilation

Piero pi.cavalieri at tiscali.it
Wed Jan 22 12:25:24 EST 2003


Dear developers,
there is a question from an unexperienced user:

when compiling g51 I have the following messages:
...
...
v.out.ogr
make[2]: Entering directory 
`/home/piero/unst_g/grass51_exp_2002_11_15/vector/v.out.ogr'
gcc 
-L/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib 
 -o 
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/etc/bin/cmd/v.out.ogr 
OBJ.i686-pc-linux-gnu/main.o 
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/libvect.a 

/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/libdig2.a
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/libshape.a 
 -lpq 
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/libbtree.a 

/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/librtree.a
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/liblinkm.a
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/libdbmi.a 
           
/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/lib/libgis.a 
 -ldl -lm  -lz
OBJ.i686-pc-linux-gnu/main.o: In function `main':
/home/piero/unst_g/grass51_exp_2002_11_15/vector/v.out.ogr/main.c:145: 
*/undefined reference to `OGRRegisterAll' /*
...
...
and so on for all the OGR API used in the module
...
collect2: ld returned 1 exit status
make[2]: *** 
[/home/piero/unst_g/grass51_exp_2002_11_15/dist.i686-pc-linux-gnu/etc/bin/cmd/v.out.ogr] 
Error 1
make[2]: Leaving directory 
`/home/piero/unst_g/grass51_exp_2002_11_15/vector/v.out.ogr'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory 
`/home/piero/unst_g/grass51_exp_2002_11_15/vector'
make: *** [default] Error 1

As you see the module is compiled, but it is not linked in grass51 (if 
linked is the correct term). (I have grass51 in the bin.arch dir, it 
runs, but v.out.ogr doesn't works).
I tried to watch  in the Makefile (that specific for the module and 
those in the upper dirs) but I don't fully understand
them (or I don't understand anything, this is a point of view). For 
example, in the Makefile for the module, It's  used the GDALCFLAGS 
variable. In Platform.make I have:

#GDAL
GDALLIBS            = -ldl
GDALCFLAGS     =

Pheraps I have compiled GDAL without the GRASS support, however what 
GDALCFLAGS represent ? It goes to EXTRA_CFLAGS so should it used to 
specify additional include dirs ? (I have gdal in a standard dir 
(specified both in /etc/ld.so.conf end in my ~/.bashrc), so probable 
it's correct that the field is empty).
If I configure gdal --with-grass=ARG  (ARG=no or libgrass path) what 
does libgrass mean? (libgrass5 doesn't exist!).
(Perhaps  this option is for other (than GRASS) program that must use 
GDAL and GRASS utilities?)


Thanks for the patient of all the list members.
                   Piero




More information about the grass-dev mailing list