From: Thom D. <tho...@co...> - 2006-01-27 02:33:15
|
Ralf Wildenhues wrote: > Hi Tim, > > * Tim Teulings wrote on Mon, Jan 23, 2006 at 07:25:26PM CET: > >>My configure.ac script does the following: >> >>AC_CHECK_LIB(m,sin,,,) >> >>and thus always would add -lm for under mingw since it does not hurt >>linking against the empty archive. > > *snip* > >>How do I correctly check for libm instead? > > > You could use > AC_SEARCH_LIBS([sqrt], [m]) > > Cheers, > Ralf > Ralf, This test succeeded in my configure. (Though I had to download and install the new version of autoconf. This package complained that it needed at least autoconf 2.59. Any idea when the new version will be rolled into MinGW?) However, it didn't fix the problem with linker. It is still complaining about not finding things that are supposed to be in the math library. In fact, closer examination (CTRL-C before the first error messages scroll out of the buffer) shows that even things like sprintf, atoi, and atof are not being found. It is starting to feel like there is something in the Makefile that is causing the linker to ignore the standard libraries. More info: I'm trying to build the geotiff libraries and the prerequisites (libtiff, proj, and jpeg). The other three packages compile and link with no problems. But, I've had no luck (or at least no *good* luck) getting the geotiff package to build. And I'm not getting any response at all from the geotiff mailing list. With much snippage of duplicate lines, this is what I get when I try to build libgeotiff. Can anyone see any obvious problems with this? TIA, Thom OBTW, my LIBDIR enviroment variable is "/usr/local/lib:/mingw/lib" thom@HATTER /s/osg/geotiff/libgeotiff $ make rm -f xtiffio.h ln -s ./libxtiff/*.h . gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./libxtiff/xtiff.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_free.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_get.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_names.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_new.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_print.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_set.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_tiffp.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_write.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_trans.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_normalize.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geotiff_proj4.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./geo_extra.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./cpl_serv.c gcc -c -O2 -Wall -DCSV_DATA_DIR=\"/usr/local/share/epsg_csv\" -I. -I. -I/usr/local/include -I/usr/local/include ./cpl_csv.c ar r libgeotiff.a xtiff.o geo_free.o geo_get.o geo_names.o geo_new.o geo_print.o geo_set.o geo_tiffp.o geo_write.o geo_trans.o geo_normalize.o geotiff_proj4.o geo_extra.o cpl_serv.o cpl_csv.o ranlib libgeotiff.a ld -shared xtiff.o geo_free.o geo_get.o geo_names.o geo_new.o geo_print.o geo_set.o geo_tiffp.o geo_write.o geo_trans.o geo_normalize.o geotiff_proj4.o geo_extra.o cpl_serv.o cpl_csv.o -L/usr/local/lib -lproj -L/usr/local/lib -ltiff -L/usr/local/lib -lz -L/usr/local -ljpeg -o libgeotiff.so.1.2.2 geo_names.o(.text+0xb088):geo_names.c: undefined reference to `sprintf' geo_names.o(.text+0xb231):geo_names.c: undefined reference to `strcmp' geo_names.o(.text+0xb27e):geo_names.c: undefined reference to `sscanf' geo_print.o(.text+0xf6):geo_print.c: undefined reference to `sprintf' geo_print.o(.text+0x1ed):geo_print.c: more undefined references to `sprintf' follow geo_print.o(.text+0x2ab):geo_print.c: undefined reference to `_imp___iob' geo_print.o(.text+0x824):geo_print.c: undefined reference to `sscanf' geo_print.o(.text+0x859):geo_print.c: undefined reference to `sscanf' geo_print.o(.text+0x913):geo_print.c: undefined reference to `_imp___iob' geo_print.o(.text+0x95b):geo_print.c: undefined reference to `_imp___iob' geo_print.o(.text+0x969):geo_print.c: undefined reference to `fprintf' geo_print.o(.text+0x1054):geo_print.c: undefined reference to `fscanf' geo_print.o(.text+0x781):geo_print.c: undefined reference to `fprintf' geo_set.o(.text+0x279):geo_set.c: undefined reference to `strlen' geo_set.o(.text+0x347):geo_set.c: undefined reference to `_assert' geo_tiffp.o(.text+0x15f):geo_tiffp.c: undefined reference to `strlen' geo_normalize.o(.text+0x2b2):geo_normalize.c: undefined reference to `atof' geo_normalize.o(.text+0x2c5):geo_normalize.c: undefined reference to `atof' geo_normalize.o(.text+0x33f):geo_normalize.c: undefined reference to `strchr' geo_normalize.o(.text+0x35a):geo_normalize.c: undefined reference to `strlen' geo_normalize.o(.text+0xba1):geo_normalize.c: undefined reference to `fopen' geo_normalize.o(.text+0xbb5):geo_normalize.c: undefined reference to `fclose' geo_normalize.o(.text+0x2e36):geo_normalize.c: undefined reference to `stricmp' geo_normalize.o(.text+0x2e77):geo_normalize.c: undefined reference to `sprintf' geo_normalize.o(.text+0x30fb):geo_normalize.c: undefined reference to `fprintf' geo_normalize.o(.text+0x3485):geo_normalize.c: undefined reference to `strstr' geotiff_proj4.o(.text+0x98d):geotiff_proj4.c: undefined reference to `strdup' geotiff_proj4.o(.text+0x9b4):geotiff_proj4.c: undefined reference to `strcat' geotiff_proj4.o(.text+0xa50):geotiff_proj4.c: undefined reference to `sprintf' geotiff_proj4.o(.text+0xac5):geotiff_proj4.c: undefined reference to `sprintf' geotiff_proj4.o(.text+0xbd7):geotiff_proj4.c: undefined reference to `sprintf' geotiff_proj4.o(.text+0x1131):geotiff_proj4.c: undefined reference to `sprintf' geotiff_proj4.o(.text+0x12f6):geotiff_proj4.c: undefined reference to `free' geotiff_proj4.o(.text+0x13e6):geotiff_proj4.c: undefined reference to `free' cpl_serv.o(.text+0x211):cpl_serv.c: undefined reference to `strlen' cpl_serv.o(.text+0x22c):cpl_serv.c: undefined reference to `strcpy' cpl_serv.o(.text+0x23e):cpl_serv.c: undefined reference to `strlen' cpl_serv.o(.text+0x2db):cpl_serv.c: undefined reference to `fgets' cpl_serv.o(.text+0x6d0):cpl_serv.c: undefined reference to `strchr' cpl_serv.o(.text+0x71a):cpl_serv.c: undefined reference to `vsprintf' cpl_serv.o(.text+0x756):cpl_serv.c: undefined reference to `_imp___iob' cpl_serv.o(.text+0x765):cpl_serv.c: undefined reference to `fprintf' cpl_serv.o(.text+0x76c):cpl_serv.c: undefined reference to `abort' cpl_csv.o(.text+0x38):cpl_csv.c: undefined reference to `stricmp' cpl_csv.o(.text+0x53):cpl_csv.c: undefined reference to `fopen' cpl_csv.o(.text+0xd0):cpl_csv.c: undefined reference to `stricmp' cpl_csv.o(.text+0x18b):cpl_csv.c: undefined reference to `fclose' cpl_csv.o(.text+0x3e9):cpl_csv.c: undefined reference to `fseek' cpl_csv.o(.text+0x3f2):cpl_csv.c: undefined reference to `ftell' cpl_csv.o(.text+0x3fd):cpl_csv.c: undefined reference to `rewind' cpl_csv.o(.text+0x417):cpl_csv.c: undefined reference to `fread' cpl_csv.o(.text+0x4dd):cpl_csv.c: undefined reference to `fclose' cpl_csv.o(.text+0x4fb):cpl_csv.c: undefined reference to `atoi' cpl_csv.o(.text+0x5bd):cpl_csv.c: undefined reference to `strchr' cpl_csv.o(.text+0x611):cpl_csv.c: undefined reference to `strlen' cpl_csv.o(.text+0x633):cpl_csv.c: undefined reference to `strcat' cpl_csv.o(.text+0x6cc):cpl_csv.c: undefined reference to `stricmp' cpl_csv.o(.text+0x6dc):cpl_csv.c: undefined reference to `strcmp' cpl_csv.o(.text+0x9b7):cpl_csv.c: undefined reference to `rewind' cpl_csv.o(.text+0xbfe):cpl_csv.c: undefined reference to `getenv' cpl_csv.o(.text+0xc11):cpl_csv.c: undefined reference to `sprintf' cpl_csv.o(.text+0xc24):cpl_csv.c: undefined reference to `fclose' C:/msys/1.0/local/lib/libproj.a(pj_inv.o)(.text+0x4a): In function `pj_inv': s:/OSG/proj/src/pj_inv.c:14: undefined reference to `_imp___HUGE' C:/msys/1.0/local/lib/libproj.a(pj_inv.o)(.text+0x96):s:/OSG/proj/src/pj_inv.c:18: undefined reference to `_errno' C:/msys/1.0/local/lib/libproj.a(pj_inv.o)(.text+0xfb):s:/OSG/proj/src/pj_inv.c:23: undefined reference to `_imp___HUGE' C:/msys/1.0/local/lib/libproj.a(pj_inv.o)(.text+0x133):s:/OSG/proj/src/pj_inv.c:32: undefined reference to `_errno' C:/msys/1.0/local/lib/libproj.a(pj_inv.o)(.text+0x184):s:/OSG/proj/src/pj_inv.c:29: undefined reference to `tan' C:/msys/1.0/local/lib/libproj.a(pj_inv.o)(.text+0x18f):s:/OSG/proj/src/pj_inv.c:29: undefined reference to `atan' C:/msys/1.0/local/lib/libproj.a(pj_init.o)(.text+0x71): In function `get_opt' -- Thom DeCarlo -=-=- Someone who thinks logically provides a nice contrast to the real world. |