Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130326184037.b97e4c63.idunham@lavabit.com>
Date: Tue, 26 Mar 2013 18:40:37 -0700
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: Re: Will musl work as a lsb alternative? (was Re: re:
 musl setup attempt)

On Tue, 26 Mar 2013 19:03:28 -0400
Rich Felker <dalias@...ifal.cx> wrote:

> 
> > Any suggestions, recommendations?  Would I be better off sticking with
> > lsb or will musl do the job as well?  Thanks for the help.
> 
> Could you elaborate on what you mean by "sticking with LSB"? LSB is a
> specification for ABI, filesystem layout, etc. -- basically, what apps
> can expect from a "Linux system" -- not really a tool in itself.
Rich:
There is also a LSB toolchain (lsbcc, lsbc++, etc) meant to produce binaries that use the LSB ABI and are portable so you don't need to worry too much about glibc symbol versioning, etc. 

Laura:
If you don't want to ship any/many libraries and fully static binaries are not an option, using lsbcc is your only otion. That does require the target distro to provide LSB support, which is widespread but certainly not universal.
If you want binaries that can run _anywhere_, static linking with a generic build of musl will work well (x86 musl compiles for i486 by default, although you can change the minimum processor by setting CFLAGS to -march=...).  These will work to some degree as far back as 2.4.x distros (I tested on DSL), if you don't need threading or full POSIX conformance (2.4 did not have what's needed for full POSIX).  

uclibc static linking will do better if supporting 2.4.x or very early 2.6.x kernels is a high priority, though it's not fully POSIX conformant, LGPL (requires distributing application source code or object file so customers can relink), and slightly larger. Don't think about a uclibc shared binary if you want portability; that way lies madness.

Dynamically linked musl binaries are only going to work out-of-box on musl systems or for those who installed musl with the same syslibdir; 
it is possible to use the path/to/libc.so <command> trick or an ELF editor to circumvent this.  Currently, you might want to include most of the libraries if you go for this.

HTH, 
Isaac Dunham <idunham@...abit.com>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.