[gdal-dev] Re: error with jpeglib while compiling 1.5.4 with MinGW

G. Allegri giohappy at gmail.com
Thu Mar 19 05:41:20 EDT 2009


I've solved using --with-jpeg=internal option. The problem seems to be
the presence of jpeglib external libraries in the libs path. I've
compiled jpeg by myself, so I woud expect that gdal could link it...
but it fails, following the Warning on top of the output I've
reported. Forcing the configure to internal exlude my jpeglib, but
it's not the solution I would like!

Any hint?

2009/3/19 G. Allegri <giohappy at gmail.com>:
> Hi.
> I'm trying to compile gdal 1.5.4 with msys+mingw 5.4.1. I have problems
> linking the jpeglib, as internal.
> My configure command is:
>
> ./configure --prefix=/usr/local --without-grass
> --with-sqlite3=/usr/local/sqlite --with-pg=/usr/local/bin/pg_config.exe
> --with-local=/usr/local
>
> (I have set --with-local to solve the problem for tiffio, while compilig it
> couldn't be found...)
> I receive the following error:
>
>
> *** Warning: This system can not link to static lib archive
> /usr/local/lib/libjpeg.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> *** Warning: This system can not link to static lib archive
> /usr/local/lib/libjpeg.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> libtool: link: rm -fr  .libs/libgdal.dll.a .libs/libgdal.la.lnkscript
> libtool: link: creating GNU ld script: .libs/libgdal.la.lnkscript
> libtool: link: g++ -shared -nostdlib
> C:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../dllcrt2.o
> C:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o
> .libs/libgdal.la.lnkscript  -L/usr/local/sqlite/lib
> /usr/local/sqlite/lib/libsqlite3.dll.a -L/usr/local/lib
> /usr/local/lib/libexpat.dll.a /usr/local/lib/libtiff.dll.a -L/usr/local/bin
> -LC:/msys/local/lib -lpq -lz -LC:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5
> -LC:/msys/mingw/bin/../lib/gcc
> -LC:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib
> -LC:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../.. -lstdc++ -lmingw32
> -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
> -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
> C:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/crtend.o           -o
> .libs/libgdal-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib
> -Xlinker .libs/libgdal.dll.a
> ./frmts/o/.libs/jpgdataset.o: In function `ZN10JPGDatasetD2Ev':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:936: undefined
> reference to `jpeg_abort_decompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:937: undefined
> reference to `jpeg_destroy_decompress'
> ./frmts/o/.libs/jpgdataset.o: In function `ZN10JPGDatasetD1Ev':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:936: undefined
> reference to `jpeg_abort_decompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:937: undefined
> reference to `jpeg_destroy_decompress'
> ./frmts/o/.libs/jpgdataset.o: In function `ZN10JPGDatasetD0Ev':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:936: undefined
> reference to `jpeg_abort_decompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:937: undefined
> reference to `jpeg_destroy_decompress'
> ./frmts/o/.libs/jpgdataset.o: In function
> `ZN10JPGDataset17LoadDefaultTablesEi':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1134: undefined
> reference to `jpeg_alloc_quant_table'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1149: undefined
> reference to `jpeg_alloc_huff_table'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1168: undefined
> reference to `jpeg_alloc_huff_table'
> ./frmts/o/.libs/jpgdataset.o: In function `ZN10JPGDataset7RestartEv':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1196: undefined
> reference to `jpeg_abort_decompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1197: undefined
> reference to `jpeg_destroy_decompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1198: undefined
> reference to `jpeg_CreateDecompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1211: undefined
> reference to `jpeg_read_header'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1215: undefined
> reference to `jpeg_start_decompress'
> ./frmts/o/.libs/jpgdataset.o: In function `ZN10JPGDataset12LoadScanlineEi':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:964: undefined
> reference to `jpeg_start_decompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1005: undefined
> reference to `jpeg_read_scanlines'
> ./frmts/o/.libs/jpgdataset.o: In function
> `ZN10JPGDataset4OpenEP12GDALOpenInfo':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1448: undefined
> reference to `jpeg_std_error'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1452: undefined
> reference to `jpeg_CreateDecompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1485: undefined
> reference to `jpeg_read_header'
> ./frmts/o/.libs/jpgdataset.o: In function
> `Z14JPEGCreateCopyPKcP11GDALDatasetiPPcPFidS0_PvES5_':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1953: undefined
> reference to `jpeg_std_error'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1954: undefined
> reference to `jpeg_CreateCompress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1971: undefined
> reference to `jpeg_set_defaults'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1986: undefined
> reference to `jpeg_set_quality'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1991: undefined
> reference to `jpeg_start_compress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:2022: undefined
> reference to `jpeg_write_scanlines'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:2041: undefined
> reference to `jpeg_destroy_compress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:2040: undefined
> reference to `jpeg_finish_compress'
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/jpgdataset.cpp:1989: undefined
> reference to `jpeg_simple_progression'
> ./frmts/o/.libs/nitfdataset.o: In function
> `ZN11NITFDataset14NITFCreateCopyEPKcP11GDALDatasetiPPcPFidS1_PvES6_':
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3202: undefined
> reference to `jpeg_std_error'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3203: undefined
> reference to `jpeg_CreateCompress'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3221: undefined
> reference to `jpeg_set_defaults'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3237: undefined
> reference to Creating library file: .libs/libgdal.dll.a
> `jpeg_set_quality'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3240: undefined
> reference to `jpeg_simple_progression'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3242: undefined
> reference to `jpeg_start_compress'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3291: undefined
> reference to `jpeg_finish_compress'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3292: undefined
> reference to `jpeg_destroy_compress'
> C:/msys/local/src/gdal-1.5.4/frmts/nitf/nitfdataset.cpp:3273: undefined
> reference to `jpeg_write_scanlines'
> ./frmts/o/.libs/vsidataio.o: In function
> `Z14jpeg_vsiio_srcP22jpeg_decompress_structP6_iobuf':
> C:/msys/local/src/gdal-1.5.4/frmts/jpeg/vsidataio.cpp:224: undefined
> reference to `jpeg_resync_to_restart'
> collect2: ld returned 1 exit status
> make[1]: *** [libgdal.la] Error 1
> make[1]: Leaving directory `/usr/local/src/gdal-1.5.4'
> make: *** [check-lib] Error 2
>
>
> What's wrong?
> giovanni
>


More information about the gdal-dev mailing list