From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2983 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Will musl work as a lsb alternative? (was Re: [musl] re: musl setup attempt) Date: Tue, 26 Mar 2013 18:40:37 -0700 Message-ID: <20130326184037.b97e4c63.idunham@lavabit.com> References: <20130326230328.GP20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364348451 14951 80.91.229.3 (27 Mar 2013 01:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Mar 2013 01:40:51 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2984-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 27 02:41:16 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UKfMZ-0003ay-UJ for gllmg-musl@plane.gmane.org; Wed, 27 Mar 2013 02:41:16 +0100 Original-Received: (qmail 11494 invoked by uid 550); 27 Mar 2013 01:40:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11483 invoked from network); 27 Mar 2013 01:40:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=44tYkbL6RBvHbhGmSXhvKRkXsslRCGgjpS8sIJ1RYVU24uACBXdB6pQbr043oSM9zld6oM/OuHgSd+xMnQ5WFLG0GBqc5BhYknip7RznqxNWSjQhIKSJwBysH0z4mvvY9CQAxSY4nLlBkcBmyXf63G36R0YHoCnc4M10mGa8ByE=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20130326230328.GP20323@brightrain.aerifal.cx> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2983 Archived-At: On Tue, 26 Mar 2013 19:03:28 -0400 Rich Felker 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 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