[GRASSLIST:1739] Re: Building GDAL v1.1.9 source on Mac OSX v10.2 (Jaguar) for GRASS v5.0.3

Glynn Clements glynn.clements at virgin.net
Wed Nov 12 17:19:00 EST 2003

Gary Trachier wrote:

> I am trying to build GDAL to use with GRASS v5.0.3.  I am running into
> problems, and hope that someone out there can set me straight.
> The configure line is...
> configure --with-png \
> --with-jpeg \
> --with-gif \
> --with-tiff \
> --without-python \
> --with-grass

In general, it's safest to avoid using --with-grass when building GDAL
for use with GRASS. That won't affect building GDAL (i.e. it isn't
related to your immediate problem), but it may cause problems either
building or running r.in.gdal.

> Here are the errors...

> ranlib ./gdal.a
> ranlib: file: ./gdal.a(pnggccrd.o) has no symbols
> ranlib: file: ./gdal.a(pngvcrd.o) has no symbols
> ranlib: file: ./gdal.a(tif_pixarlog.o) has no symbols
> ranlib: file: ./gdal.a(cpl_vsil_unix_stdio_64.o) has no symbols

These should only be warnings; it's common for those files to be

> make ./libgdal.1.1.dylib
> gcc -dynamiclib  ./frmts/o/*.o ./gcore/*.o ./port/*.o ./alg/*.o
> ./ogr/ogrct.o ./ogr/ogr_opt.o ./ogr/ogr_fromepsg.o ./ogr/ogr_srs_validate.o
> ./ogr/ogrutils.o ./ogr/ogr_srs_proj4.o ./ogr/ograssemblepolygon.o
> ./ogr/ogr_api.o ./ogr/ogrsf_frmts/generic/ogrregisterall.o
> ./ogr/ogrfeaturestyle.o ./ogr/ogrsf_frmts/ogrsf_frmts.a   ./gdal.a
> ./ogr/ogr.a ./gdal.a ./port/cpl.a -lz -lm -ldl -lm \
>         -o ./libgdal.1.1.dylib
> ld: Undefined symbols:
> vtable for __cxxabiv1::__class_type_info
> vtable for __cxxabiv1::__si_class_type_info
> operator delete(void*)
> operator new(unsigned long)
> ___gxx_personality_v0
> operator delete[](void*)
> operator new[](unsigned long)
> ___cxa_pure_virtual
> vtable for __cxxabiv1::__vmi_class_type_info
> /usr/bin/libtool: internal link edit command failed
> make[1]: *** [libgdal.1.1.dylib] Error 1
> make: *** [check-lib] Error 2
> Any suggestions???  Or is there an easier way for me to add GDAL support to

You are trying to link C++ code as if it was C, so the C++ runtime
isn't present. I suspect that you either have to use "g++" as the
linker, or explictly add some additional switches (I have no idea
which ones).

You appear to be using a newer version of GDAL than I have here
(1.1.3). In 1.1.3, the linker is determined by the setting of
LD_SHARED in GDALmake.opt (here, it's "c++ -shared"). If it's still
applicable to your version, try changing "gcc" to "g++".

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-user mailing list