[Gdal-dev] Any possibility of static compile?
Curt, WE7U
archer at eskimo.com
Mon Dec 4 14:47:24 EST 2006
On Mon, 4 Dec 2006, Frank Warmerdam wrote:
> John pointed out some of the issues. For what it is worth, I was able
> to issue the following command against my local GDAL build:
I didn't see the message from John. Evidently my ISP and Google
don't see eye-to-eye w.r.t. mail so it trickles slowly. I might get
it later today or tomorrow. I went to the web-based view of the
list and printed John's message out. Thanks for the comments John!
w.r.t. the example "gdalinfo.c" linking, we currently only use GDAL
to get to OGR (we never finished our GDAL integration). I get all
kinds of unresolved OGR references when I link gdal.a against my
app.
I tried just the GDAL/OGR library compile using "--without-libtool".
The compile of GDAL itself under the lsbcc compiler doesn't succeed:
(cd ogr; make apps)
make[1]: Entering directory `/home/src/lsb/gdal-1.3.2b2/ogr'
g++ ogrinfo.o -L/home/archer/src/lsb/gdal-1.3.2b2 -lgdal -ljasper -ljpeg -lpng -L/usr/lib -lpq -lz -lm -lrt -ldl -o ogrinfo
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: ogrinfo: hidden symbol `__dso_handle' in /usr/lib/gcc/i586-suse-linux/4.0.2/crtbegin.o is referenced by DSO
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: final link failed: Nonrepresentable section on output
I tried it with and without "--enable-static" and got the same set
of errors at the point the compiler bombed out. I can compile the
library fine without the "--without-libtool" flag, but then I don't
get any static libs except for "gdal.a". No "ogr.a" specifically.
The only reason I'm doing this is to be able to distribute an Linux
Standard Base binary to make it easier for the Linux newbies to get
started with the app. I may bag the GDAL library for the LSB
package: We still have shapelib/Proj/libgeotiff support as-is.
Full OGR support buys us some of the lesser-used maps, at least for
our application.
What I'm worried about w.r.t. the shared libraries is that I'd have
to package them along with the app in the /opt/lsb-xastir/lib/
directory, but I'm not sure whether those libs or the system libs
would get dynamically linked on startup. Then again, LSB uses it's
own loader, so maybe I'm safe there and they've taken care of it for
me.
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the Gdal-dev
mailing list