automake
[Top][All Lists]
Advanced

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

Re: Help with static linking


From: Kip Warner
Subject: Re: Help with static linking
Date: Sat, 01 Jun 2013 22:10:36 -0700

On Sat, 2013-06-01 at 23:14 -0400, Mike Frysinger wrote:

> 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

Do you mean in the case of dynamic linking? If so, that's awful. But
strange because I've seen many upstream projects release precompiled
binaries without that ever really being made into an issue. Or do you
mean in the case of static linking?

> >   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.  

Hey, I'm all ears and open to alternatives. If you have a better
suggestion on how to get an application with said requisite runtimes to
run out of the box off optical media via XDG autostart without requiring
the novice user to have to do anything with their package manager, I'm
all ears.

> 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

This looks pretty complicated to get up and running and I wonder if not
just statically linking against libpng and libzziplib would not be
better? I'm also missing the elftools python dependency the script needs
and having trouble tracking down what I need to do to get that working,
assuming lddtree.py approach is the best way to handle this scenario.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

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


reply via email to

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