Ticket #871 (closed defect: duplicate)
with-static-proj4 finds wrong location
|Reported by:||kyngchaos@…||Owned by:||warmerdam|
GDAL 1.2.6. When I specify --with-static-proj4, it succeeds on the first check, but it really should have failed. For whatever reason, the first check (on line 25468 in configure) add /src to the path I give it, not /lib. That's not the problem, but strangely that check succeeds, and so later in the linking, it can't find libproj. I suspect it has something to do with Apple's linker - it been known to strange things with the order of -L options, and since the libproj check includes all those other libs it ends up finding it. Maybe the libproj check should be more clean - just -L$with_static_proj4/src $PROJ_LIB (and /lib, etc), without the $ORIG_LIBS. Say, use a temp libs variable instead of the accumulated LIBS. And there's that extra leading -lproj in there that may also confuse the check (and it's not added to the LIBS in GDALmake.opt). here's a clip from config.log: configure:25363: checking how to link PROJ.4 library configure:25382: result: link statically. configure:25463: checking for pj_init in -lproj configure:25493: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD conftest.c -lproj -L/usr/local/ gislibs/src -lproj -L/usr/local/gislibs/lib -lgeos -L/usr/local/graphicslibs -L/usr/local/graphicslibs/lib -ljasper -L/Users/williamk/Documents/src/unix/hdf/4.2r1-darwin8/lib -lmfhdf -ldf -L/usr/local/ gislibs -L/usr/local/gislibs/lib -logdi31 -L/usr/local/graphicslibs -L/usr/local/graphicslibs/lib -lgif - L/usr/local/graphicslibs -L/usr/local/graphicslibs/lib -ljpeg -L/usr/local/gislibs/lib -lgeotiff -L/usr/ local/graphicslibs/lib -ltiff -L/usr/local/graphicslibs -L/usr/local/graphicslibs/lib -lpng -L/Users/ williamk/Documents/src/unix/netcdf/netcdf-3.6.0-p1 -L/Users/williamk/Documents/src/unix/netcdf/ netcdf-3.6.0-p1/lib -lnetcdf -L/usr/local/gislibs/lib -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lz -lpthread -ldl >&5 /usr/bin/ld: warning -L: directory name (/usr/local/gislibs/src) does not exist configure:25499: $? = 0 configure:25503: test -z || test ! -s conftest.err configure:25506: $? = 0 configure:25509: test -s conftest configure:25512: $? = 0 configure:25525: result: yes I haven't had problems with other checks, tho they all have the same mess of ALL LIBS up to that point. I wonder if other checks should stick to just the essentials also to get the test done?
Note: See TracTickets for help on using tickets.