With GRASS 5.0.3 CVS (7-19 and a couple earlier versions) I can't get r.in.gdal to compile. I get an illegal indirect reference from libgis to libgrass:
gcc -L/Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/src/libes/LIB.powerpc-apple-darwin6.6 -o /Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/dist.powerpc-apple-darwin6.6/etc/bin/cmd/r.in.gdal OBJ.powerpc-apple-darwin6.6/main.o OBJ.powerpc-apple-darwin6.6/gbgetsymbol.o OBJ.powerpc-apple-darwin6.6/gdalbridge.o OBJ.powerpc-apple-darwin6.6/make_loc.o \
-L/usr/local/lib -lgdal.1.1 -lgeotiff -ltiff -lgproj -L/usr/local/lib -lproj -lgis -lintl -lI -lz
ld: /Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/src/libes/LIB.powerpc-apple-darwin6.6/libgis.a(color_rule.o) illegal reference to symbol: _G__color_free_fp_lookup defined in indirectly referenced dynamic library /usr/local/lib/libgrass5.0.dylib
ld: warning multiple definitions of symbol _CSVGetFileFieldId
/usr/local/lib/libgdal.1.1.dylib(cpl_csv.o) definition of _CSVGetFileFieldId
/usr/local/lib/libgeotiff.dylib(cpl_csv.o) definition of _CSVGetFileFieldId
make[1]: *** [/Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/dist.powerpc-apple-darwin6.6/etc/bin/cmd/r.in.gdal] Error 1
GISGEN failure at STEP: src/raster/r.in.gdal
I've tried reordering the LIBES libs, and GDAL_LIBS & LIBES, in the GMakefile for r.in.gdal, but that just causes other indirect references. This is beyond my porting experience so far to know what it means and how to fix it.
-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/
"I ache, therefore I am. Or in my case - I am, therefore I ache."
- Marvin
RIP Douglas Adams 1952-2001
William K wrote:
With GRASS 5.0.3 CVS (7-19 and a couple earlier versions) I can't get
r.in.gdal to compile. I get an illegal indirect reference from libgis
to libgrass:
gcc
-L/Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/src/
libes/LIB.powerpc-apple-darwin6.6 -o
/Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/
dist.powerpc-apple-darwin6.6/etc/bin/cmd/r.in.gdal
OBJ.powerpc-apple-darwin6.6/main.o
OBJ.powerpc-apple-darwin6.6/gbgetsymbol.o
OBJ.powerpc-apple-darwin6.6/gdalbridge.o
OBJ.powerpc-apple-darwin6.6/make_loc.o \
-L/usr/local/lib -lgdal.1.1 -lgeotiff -ltiff -lgproj
-L/usr/local/lib -lproj -lgis -lintl -lI -lz
ld:
/Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/src/
libes/LIB.powerpc-apple-darwin6.6/libgis.a(color_rule.o) illegal
reference to symbol: _G__color_free_fp_lookup defined in indirectly
referenced dynamic library /usr/local/lib/libgrass5.0.dylib
ld: warning multiple definitions of symbol _CSVGetFileFieldId
/usr/local/lib/libgdal.1.1.dylib(cpl_csv.o) definition of
_CSVGetFileFieldId
/usr/local/lib/libgeotiff.dylib(cpl_csv.o) definition of
_CSVGetFileFieldId
make[1]: ***
[/Users/williamk/Documents/src/unix/GRASS/grass50_exp_2003_06_28/
dist.powerpc-apple-darwin6.6/etc/bin/cmd/r.in.gdal] Error 1
GISGEN failure at STEP: src/raster/r.in.gdal
I've tried reordering the LIBES libs, and GDAL_LIBS & LIBES, in the
GMakefile for r.in.gdal, but that just causes other indirect
references. This is beyond my porting experience so far to know what
it means and how to fix it.
Build GDAL *without* GRASS support, i.e. "configure --without-grass".
--
Glynn Clements <glynn.clements@virgin.net>
RE various replies:
Build GDAL *without* GRASS support, i.e. "configure --without-grass".
Well, that does work, BUT I use gdal with mapserver as well, and (eventually) want to be able to serve up GRASS rasters. Didn't have this problem in GRASS 5.0.2, but I get it now there as well. I'm pretty sure I had libgrass in gdal then. I did recently update to Apple's gcc 3.3 release, and it has caused a few problems elsewhere, especially with c++ stuff (tho GDAL had no problems).
ld: warning multiple definitions of symbol _CSVGetFileFieldId
/usr/local/lib/libgdal.1.1.dylib(cpl_csv.o) definition of
_CSVGetFileFieldId
/usr/local/lib/libgeotiff.dylib(cpl_csv.o) definition of
_CSVGetFileFieldId
I can only suggest to not use an external tiff library when compiling
GDAL and use the GDAL internal tiff (--with-libtiff=internal
--with-geotiff=internal or something similar). I think I read somewhere
there are problems using external tiff libraries with GDAL?
I get multiple defs all the time with no problems - I guess this one just happens right after the indirect reference error before make has a chance to give up.
The only problem is that GDAL requires the latest libtiff version
(3.6.0beta2 currently). If you have suitable libtiff installation
configure script should determine and use it automatically, otherwise
internal version will be selected. It should not be any other problems
with libtiff.
Hm, I have _a_ 3.6 beta, but I can't tell if it's beta 2 - release date Jan 15 2003 is all I could find. Can't find any source on the web, libtiff.org seems to be dead. But it looks like that's the version included in the gdal source, and gdal isn't complaining about my version of libtiff.
-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/
Earth: "Mostly harmless"
- revised entry in the HitchHiker's Guide to the Galaxy
RIP Douglas Adams 1952-2001
This seems to work - no problems running r.in.gdal yet:
1. build and install gdal without libgrass
2. build and install grass with gdal
3. build and install gdal with libgrass
and keep a copy of both gdal builds to swap when I need to rebuild grass.
Just starting to get data into grass, so I haven't had a chance to test mapserver with grass data yet.
Build GDAL *without* GRASS support, i.e. "configure --without-grass".
Well, that does work, BUT I use gdal with mapserver as well, and (eventually) want to be able to serve up GRASS rasters. Didn't have this problem in GRASS 5.0.2, but I get it now there as well. I'm pretty sure I had libgrass in gdal then. I did recently update to Apple's gcc 3.3 release, and it has caused a few problems elsewhere, especially with c++ stuff (tho GDAL had no problems).
-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/
"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."
- Marvin
RIP Douglas Adams 1952-2001