Opened 17 years ago
Closed 16 years ago
#1538 closed defect (wontfix)
Static Proj4 + Jasper fails under default ./configure
Reported by: | rbanfield | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.1 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | JPEG2000 Jasper PROJ.4 |
Cc: | warmerdam |
Description
I am compiling gdal with static versions of proj.4 (with-static-proj4=...) and jasper-uuid (with-jasper=...). The configuration script attempts to test for the presence of proj by issuing a command which also depends on guessing the correct library path for jasper. Hence, Proj4 will not statically compile into the program if either proj4 or jasper cannot be found. As configuration continues, jasper will eventually include the right library directory, and be discovered, but proj4 is left in the cold.
Here are my default directories for the static library locations: Proj4: src/.libs Jasper-uuid: src/libjasper/.libs
Here are the directories ./configure searches for when testing for the presence of proj4: src/libjasper src/libjasper/lib
A temporary workaround is to copy src/libjapser/.libs/libjasper.a to src/libjasper
A source code side workaround is to also look for jasper in src/libjasper/.libs
Thank you very much, Robert
Change History (7)
comment:3 by , 17 years ago
Cc: | added |
---|---|
Milestone: | → 1.5.0 |
Owner: | changed from | to
comment:4 by , 17 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | JPEG2000 Jasper PROJ.4 added |
comment:5 by , 16 years ago
Status: | new → assigned |
---|
comment:6 by , 16 years ago
I'm not sure I understand what's the problem but I'll try to provide some comments, hopefully helpful.
First, about default locations. You are writing as follows:
Here are my default directories for the static library locations: Proj4: src/.libs Jasper-uuid: src/libjasper/.libs
I'm afraid but I have to say these are not valid default locations, as long as we consider default as default installation prefix on Unix systems where Automake and Autoconf toolchain is used.
There are two default (or standard) installation prefixes:
/usr /usr/local
The ./configure script tries to find dependencies in lib and bin directories located under these prefixes (ie. /usr/local/lib). If one installed a dependency, let's say JasPer, under custom prefix /opt then it's also expected there are directories like:
/opt/bin /opt/lib ...
Then, in order to use JasPer installed under /opt', following command should be used:
./configure --with-jasper=/opt
This is standard configuration and compilation procedure of most ./configure-enabled software. No directories like .libs are searched. This directories are reserved for libtool as private locations for intermediate and output binary files during building software.
The detection of static PROJ.4 is a bit different, because there is an exception used:
-L$with_static_proj4/src/.libs
It means, libtool's private location is searched for static library of PROJ.4. I believe it's configured this way for GDAL developers convenience, so they do not need to call make install for PROJ. Personally, I'd remove this location from testing as it may be confusing.
Summarizing, I don't see any bug here and I'm inclined to close this ticket, as long as I've understood the issue properly.
comment:7 by , 16 years ago
I am talking about the static compilation that you mention at the bottom. It's been a while, but I seem to recall that something was appended to the directory search string in the configure script when either proj or jasper was used, that caused an interoperability issue between them when compiling. I'll pull the relevant lines from my makefile in order to show you what has to be done to the directories in order to get the static compilation to work.
$(PROJ): cd proj.4 && ./configure --disable-shared && $(MAKE) # Workaround for default directory search in gdal mkdir proj.4/src/.libs/.libs cp -r proj.4/src/.libs/*.a proj.4/src/.libs/.libs $(JASP): cd jasper-uuid && ./configure --disable-shared && $(MAKE) # Workaround for default directory search in gdal cp jasper-uuid/src/libjasper/.libs/libjasper.a jasper-uuid/src/libjasper $(GDAL): $(PROJ) $(JASP) cd gdal && \ ./configure --disable-shared \ --without-ld-shared \ --with-jasper=$(TOP)/jasper-uuid/src/libjasper \ --with-libtiff=internal \ --with-png=internal \ --with-jpeg=internal \ --with-geos=internal \ --with-geotiff=internal \ --with-gif=internal \ --with-hdf5=no \ --without-curl \ --with-static-proj4=$(TOP)/proj.4 && \ $(MAKE)
comment:8 by , 16 years ago
The following two lines:
cp -r proj.4/src/.libs/*.a proj.4/src/.libs/.libs
and
cp jasper-uuid/src/libjasper/.libs/libjasper.a jasper-uuid/src/libjasper
tell me that you are building GDAL using PROJ.4 and JasPer from local build trees (scanning private .libs directories.) but not from installation locations. In other word, you do not call make install for both libraries.
Building GDAL against local build trees is not supported. Please, do regular install, under standard or custom prefix.
comment:9 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
The configuration is correct and works as expected. I'm closing this ticket.
Mateusz,
Could you dig into this. The situation sounds exotic, so unless you are super comfortable with the changes, we should likely only do this in trunk.