Kip Warner
2013-05-31 05:30:29 UTC
Hey lists,
Sorry for posting on both autoconf and automake lists. I wasn't sure
which one would be more appropriate for this problem.
I know this has come up before, judging by the archives, but I cannot
figure out the best way to have my executable statically link against
certain dependencies. This is needed because it executes off of optical
media and I cannot always guarantee that the user's runtime environment
will have the needed dependencies and shipping them shared would be a
maintenance nightmare.
The dynamic dependencies, according to objdump, are the following...
Dynamic Section:
NEEDED libgio-2.0.so.0
NEEDED libgobject-2.0.so.0
NEEDED libglib-2.0.so.0
NEEDED libzzip-0.so.13
NEEDED libpng12.so.0
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libpthread.so.0
NEEDED libc.so.6
libc, pthreads, the C++ runtime, etc., are safe to assume are available,
but the rest I'd like to statically link against. Actually, I'd prefer
to statically link against everything that I can if possible. But the
ones for certain I know I should be able to statically link against are
at least libzzip and libpng.
I know there a number of different approaches to doing this, but from
the pieces scattered in various places, it was difficult to determine
the most reliable and recommended approach. For instance, I've tried
'myproduct_LDADD = $(LIBINTL) -static', but objdump still reports all of
the above dynamic dependencies, so maybe it's not doing what I thought
it was suppose to do.
This is my configure.ac:
<http://rod.gs/Jwo>
This is my Makefile.am:
<http://rod.gs/Lwo>
Any help appreciated.
Respectfully,
Sorry for posting on both autoconf and automake lists. I wasn't sure
which one would be more appropriate for this problem.
I know this has come up before, judging by the archives, but I cannot
figure out the best way to have my executable statically link against
certain dependencies. This is needed because it executes off of optical
media and I cannot always guarantee that the user's runtime environment
will have the needed dependencies and shipping them shared would be a
maintenance nightmare.
The dynamic dependencies, according to objdump, are the following...
Dynamic Section:
NEEDED libgio-2.0.so.0
NEEDED libgobject-2.0.so.0
NEEDED libglib-2.0.so.0
NEEDED libzzip-0.so.13
NEEDED libpng12.so.0
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libpthread.so.0
NEEDED libc.so.6
libc, pthreads, the C++ runtime, etc., are safe to assume are available,
but the rest I'd like to statically link against. Actually, I'd prefer
to statically link against everything that I can if possible. But the
ones for certain I know I should be able to statically link against are
at least libzzip and libpng.
I know there a number of different approaches to doing this, but from
the pieces scattered in various places, it was difficult to determine
the most reliable and recommended approach. For instance, I've tried
'myproduct_LDADD = $(LIBINTL) -static', but objdump still reports all of
the above dynamic dependencies, so maybe it's not doing what I thought
it was suppose to do.
This is my configure.ac:
<http://rod.gs/Jwo>
This is my Makefile.am:
<http://rod.gs/Lwo>
Any help appreciated.
Respectfully,
--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com