[Gdal-dev] Error compiling gdal against mrsid dsdk on solaris

Julien Demaria dem at acri-st.fr
Wed Apr 12 12:07:47 EDT 2006


Hi,

I believe you have a PIC problem, you should add the -fPIC flag to gcc 
for compiling all your .c and .cpp, because MrSID SDK is compiled with 
-fPIC.

Regards,

Julien


H.Porath at hzd.hessen.de a écrit :
> Hello mailing-list!
> 
> We have tried to compile the Geoexpress 5 DSDK against gdal 1.3.1 on a 
> Solaris/
> Sparc8 System. We are using gcc 2.95.3, libgcc 3.0.3 and we downloaded the
> DSDK-Version "GeoExpress SDK for Sun Solaris 8 and 9 - SPARC, gcc 2.95" 
> from
> developer.lizardtech.com. We configured gdal with the options:
> 
> ./configure --with-mrsid=/usr/local/Geo_DSDK-5.0.6.955/ --with-jp2mrsid=no
> --without-pcraster
> 
> The make aborts with the following error:
> 
> make[1]: Entering directory `/user/weick/gdal-1.3.1/apps'
> /bin/sh /user/weick/gdal-1.3.1/libtool --mode=link      g++  gdalinfo.o  \
>         /user/weick/gdal-1.3.1/libgdal.la -o gdalinfo
> g++ gdalinfo.o -o .libs/gdalinfo  
> /user/weick/gdal-1.3.1/.libs/libgdal.so -L/usr
> /local/Geo_DSDK-5.0.6.955//lib/Release 
> -L/usr/local/Geo_DSDK-5.0.6.955//3rd-part
> y/lib/Release -lltidsdk /usr/local/lib/libexpat.so -L/usr/lib 
> -L/usr/openwin/lib
>  -L/usr/local/ssl/lib -lpthread /usr/local/lib/libjpeg.so -lpng -lz -lrt 
> -ldl /u
>  sr/local/lib/libstdc++.so 
> -L/usr2/SOURCES/S8/gcc-3.0.3/objdir/sparc-sun-solaris
>  2.8/libstdc++-v3/src 
> -L/usr2/SOURCES/S8/gcc-3.0.3/objdir/sparc-sun-solaris2.8/l
>  ibstdc++-v3/src/.libs -L/usr2/SOURCES/S8/gcc-3.0.3/objdir/gcc 
> -L/usr/local/spar
>  c-sun-solaris2.8/bin -L/usr/local/sparc-sun-solaris2.8/lib -lgcc_s 
> -Wl,-R -Wl,/
>  usr/local/lib
> ld: warning: global symbol `_GLOBAL_OFFSET_TABLE_' has non-global binding:
>         (file /usr/local/lib/libgcc_s.so value=LOCL);
> Undefined                       first referenced
>  symbol                             in file
> alterToStdMV(void *, unsigned int, CSF_CR, 
> double)/user/weick/gdal-1.3.1/.libs/l
> ibgdal.so
> GDALType2CellRepresentation(GDALDataType, 
> bool)/user/weick/gdal-1.3.1/.libs/libg
> dal.so
> valueScale2String(CSF_VS)           /user/weick/gdal-1.3.1/.libs/libgdal.so
> alterFromStdMV(void *, unsigned int, CSF_CR, 
> double)/user/weick/gdal-1.3.1/.libs
> /libgdal.so
> string2ValueScale(basic_string<char, string_char_traits<char>, 
> __default_alloc_t
> emplate<false, 0> > const &)/user/weick/gdal-1.3.1/.libs/libgdal.so
> cellRepresentation2GDALType(CSF_CR)   
> /user/weick/gdal-1.3.1/.libs/libgdal.so
> fitValueScale(CSF_VS, CSF_CR)       /user/weick/gdal-1.3.1/.libs/libgdal.so
> open__FRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template 
> 
> 2b0i010MOPEN_PERM /user/weick/gdal-1.3.1/.libs/libgdal.so
> GDALType2ValueScale(GDALDataType)    
> /user/weick/gdal-1.3.1/.libs/libgdal.so
> missingValue(CSF_CR)                /user/weick/gdal-1.3.1/.libs/libgdal.so
> ld: fatal: Symbol referencing errors. No output written to .libs/gdalinfo
> collect2: ld returned 1 exit status
> make[1]: *** [gdalinfo] Error 1
> make[1]: Leaving directory `/user/weick/gdal-1.3.1/apps'
> make: *** [apps-target] Error 2
> 
>  
> We fixed an earlier error complaining that the library xmlparse is 
> missing by su
> bstituting "xmlparse" for "expat".
> The compilation of gdal without MrSID-Support works fine.
> 
> We also tried to compile gdal with mrsid-support using gcc 3.4.2, libgcc 
> 3.4.2 o
> n the same architecture. We downloaded "GeoExpress SDK for Sun Solaris 8 
> and 9 -
>  SPARC, gcc 3.2.3" for this purpose. The make aborts with the following 
> error:
>  
> g++ gdalinfo.o -o .libs/gdalinfo  
> /application/lika-services/docs/src/gdal/gdal-
> 1.3.1-installed-mrsid/.libs/libgdal.so 
> -L/usr/local/Geo_DSDK-5.0.6.955/lib/Relea
> se -L/usr/local/Geo_DSDK-5.0.6.955/3rd-party/lib/Release -lltidsdk 
> /usr/local/li
> b/libexpat.so -L/usr/lib -L/usr/openwin/lib -L/usr/local/lib 
> -L/usr/local/ssl/li
> b -lpthread /usr/local/lib/libjpeg.so -lpng -lz -lrt -ldl 
> /usr/local/lib/libstdc
> ++.so 
> -L/usr2/SOURCES/S8/gcc-3.4.2/objdir/sparc-sun-solaris2.8/libstdc++-v3/src
> -L/usr2/SOURCES/S8/gcc-3.4.2/objdir/sparc-sun-solaris2.8/libstdc++-v3/src/.libs 
> 
> -L/usr2/SOURCES/S8/gcc-3.4.2/objdir/gcc 
> -L/usr/local/sparc-sun-solaris2.8/bin -L
> /usr/local/sparc-sun-solaris2.8/lib 
> -L/usr/local/lib/../sparc-sun-solaris2.8/lib
>  -Wl,-R -Wl,/usr/local/gdal/lib -Wl,-R -Wl,/usr/local/lib
> ld: warning: file /usr/local/lib/libstdc++.so: attempted multiple 
> inclusion of f
> ile
> Undefined                       first referenced
>  symbol                             in file
> std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>  >::_S_empty
> _rep_storage/application/lika-services/docs/src/gdal/gdal-1.3.1-installed-mrsid/ 
> 
> .libs/libgdal.so
> std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>  >::_M_check
> (unsigned int) 
> const/application/lika-services/docs/src/gdal/gdal-1.3.1-installe
> d-mrsid/.libs/libgdal.so
> std::__default_alloc_template<true, 0>::allocate(unsigned 
> int)/application/lika-
> services/docs/src/gdal/gdal-1.3.1-installed-mrsid/.libs/libgdal.so
> std::__default_alloc_template<true, 0>::deallocate(void*, unsigned 
> int)/applicat
> ion/lika-services/docs/src/gdal/gdal-1.3.1-installed-mrsid/.libs/libgdal.so
> std::allocator<char>::allocate(unsigned int, void 
> const*)/application/lika-servi
> ces/docs/src/gdal/gdal-1.3.1-installed-mrsid/.libs/libgdal.so
> std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>  >::_Rep::_S
> _create(unsigned int, std::allocator<char> 
> const&)/application/lika-services/doc
> s/src/gdal/gdal-1.3.1-installed-mrsid/.libs/libgdal.so
> ld: fatal: Symbol referencing errors. No output written to .libs/gdalinfo
> collect2: ld returned 1 exit status
> make: *** [gdalinfo] Error 1
> /application/lika-services/docs/src/gdal/gdal-1.3.1-installed-mrsid/apps->
> 
> It would be nice if someone could help us solving this problem 
> especially in the
>  second case (gcc 3.4.2). Thanks in advance.
> 
> Holger
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev



More information about the Gdal-dev mailing list