[GRASSLIST:5729] Re: Problem with compilation of GRASS 5.1

I am trying to compile the CVS build from 2003_03_01 and the compilation always hangs with this error messages:
....
OBJ.i586-pc-linux-gnu/main.o: In function `main':
/home/vojta/grass_install/grass51_exp_2003_03_01/vector/v.out.ogr/main.c:145: undefined reference to `OGRRegisterAll'
/home/vojta/grass_install/grass51_exp_2003_03_01/vector/v.out.ogr/main.c:146: undefined reference to `OGRGetDriverCount'
/home/vojta/grass_install/grass51_exp_2003_03_01/vector/v.out.ogr/main.c:149: undefined reference to `OGRGetDriver'
/home/vojta/grass_install/grass51_exp_2003_03_01/vector/v.out.ogr/main.c:150: undefined reference to `OGR_Dr_GetName'
/home/vojta/grass_install/grass51_exp_2003_03_01/vector/v.out.ogr/main.c:151: undefined reference to `OGR_Dr_GetName'
....

I think the reason is because of the compilator cannot find the GDAL library (which I have correctly installed)
I was trying to generate the Makefile using several ways:

./configure --with-grass50=/home/vojta/grass_install/grass50_exp_2003_03_01/ --with-gdal=/usr/lib
./configure --with-grass50=/home/vojta/grass_install/grass50_exp_2003_03_01/ --without-gdal

,but it seems it does not have any real effect.
I have correctly compiled and installed GDAL library in version 1.1.8

There is some remark in the directory with v.out.ogr:
-----
This module requires OGR (GDAL) library libgdal.1.1.so and header file ogr_api.h.

GDAL flags should be added to Makefile and compilation made conditional.
-----
, but I don't know how to apply this remark.

Could you help me with that?

Thank you.

Best regards,

Vojtech Honzik
------------------------
Civil Engineering Faculty
Czech Technical University, Prague
------------------------

At Tue, 4 Mar 2003 12:48:43 +0600 Vojtech Honzik wrote:

Hello Vojtech,

I had some trouble as well compiling GRASS51-cvs.
This particular error occured, when I forgot to make a make clean or
make distclean before reconfiguring.

./configure
--with-grass50=/home/vojta/grass_install/grass50_exp_2003_03_01/
--with-gdal=/usr/lib./configure
--with-grass50=/home/vojta/grass_install/grass50_exp_2003_03_01/
--without-gdal

maybe it helps.

cheers
  Stephan

--

On Tuesday 04 March 2003 07:48 am, Vojtech Honzik wrote:

I think the reason is because of the compilator cannot find the GDAL
library (which I have correctly installed) I was trying to generate the
Makefile using several ways:

./configure
--with-grass50=/home/vojta/grass_install/grass50_exp_2003_03_01/
--with-gdal=/usr/lib ./configure
--with-grass50=/home/vojta/grass_install/grass50_exp_2003_03_01/
--without-gdal

--with-gdal should be path to 'gdal-config':
--with-gdal[=path/gdal-config] GDAL/OGR support (gdal-config with path)
for example:
--with-gdal=/amd/ssi0/ssi/blazek/janacek0/gdal/apps/gdal-config

then configure generates in include/Make/Platform.make:

GDALLIBS = -L/ssi0/ssi/blazek/janacek0/gdal -lgdal.1.1 -lgif -ljpeg -lpng -lz
-lm -ldl -L/usr/local/lib -lm
GDALCFLAGS = -I/ssi0/ssi/blazek/janacek0/gdal/port
-I/ssi0/ssi/blazek/janacek0/gdal/core -I/ssi0/ssi/blazek/janacek0/gdal/ogr
-I/ssi0/ssi/blazek/janacek0/gdal/ogr/ogrsf_frmts -DUSE_GDAL_H

Radim