automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with static linking


From: Mike Frysinger
Subject: Re: Help with static linking
Date: Sat, 1 Jun 2013 23:14:21 -0400
User-agent: KMail/1.13.7 (Linux/3.8.3; KDE/4.6.5; x86_64; ; )

On Saturday 01 June 2013 19:27:46 Kip Warner wrote:
> On Fri, 2013-05-31 at 08:31 -0500, Robert Boehne wrote:
> > I don't quite understand why you think you need the rest linked
> > statically,
> 
> Libraries like the following may not be present on the end user's system
> already:

be aware that what ever version of glibc & gcc you use to build, the end user 
cannot have a version older than that or it'll fail to start

>   NEEDED               libgio-2.0.so.0
>   NEEDED               libgobject-2.0.so.0
>   NEEDED               libzzip-0.so.13
>   NEEDED               libpng12.so.0

you could use -rpath,$ORIGIN and then ship those libs in the same dir (and if 
people want to use the system copy, they can just rm the bundled ones).  this 
is frequently what games do that ship their own libs (or they have a hacky 
shell script to set LD_LIBRARY_PATH).

i don't want to encourage what it is you're trying to do at all, buuuut the 
lddtree.py tool might be helpful.  on the downside, it'll bundle *all* shared 
libs your app uses (including glibc ones).  on the upside, it should make your 
package dependent only upon the kernel version (whatever your glibc is 
compiled to support minimally), the ABIs that your code is compiled for 
([colloquially] 32bit/64bit/etc...), and it would automate the whole process 
(so you don't have to manually copy files around yourself).

http://sources.gentoo.org/gentoo-projects/pax-utils/lddtree.py
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]