From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4510 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: dlopen'ing glibc linked libraries Date: Tue, 21 Jan 2014 15:31:27 +0100 Message-ID: <52DE84BF.2090001@barfooze.de> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1390314717 13444 80.91.229.3 (21 Jan 2014 14:31:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jan 2014 14:31:57 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4514-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 21 15:32:06 2014 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 1W5cMy-0005hW-Uq for gllmg-musl@plane.gmane.org; Tue, 21 Jan 2014 15:32:01 +0100 Original-Received: (qmail 13362 invoked by uid 550); 21 Jan 2014 14:32:00 -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 13354 invoked from network); 21 Jan 2014 14:32:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:4510 Archived-At: Gabriel Jacobo wrote: > Hey everyone! First message here... > > I recently found about musl when googling for GLIBC alternatives. I read in > the FAQ that binary compatibility with GLIBC is not there yet, so my > question is if this is a priority for the library. GLIBC compat is already pretty good, given that the glibc stuff was compiled in a sane manner (i.e. with the flags that enable 64bit off_t). for example, it is possible to run Dwarf Fortress: http://openwall.com/lists/sabotage/2013/11/01/1 it's also possible to run opera with a preloaded .so that provides a few symbols that musl doesn't provide. > > As a bit of background to my question, let me say that I'm an SDL2 > contributor, and I've tried linking SDL against musl, which seemed to work > great. I'm linking dynamically BTW (statically linking to musl didn't quite > work, I didn't research the issue much but it's probably a problem in SDL's > build system). statically linked musl does not support dlopen(), so you will have a hard time loading plugins (explanation for why it is not supported: http://www.openwall.com/lists/musl/2012/12/08/4 ) > > However, SDL uses dlopen/dlsym heavily to load most of its functionality i guess this kind of plug-in loading is considered a bad idea by most people here... > (for example, to load the libGL.so.1 binary in order to provide OpenGL > support), and these binaries depend on GLIBC...so (expectedly?) almost that's not quite true, sabotage linux builds mesa fine (with 2 minor patches). recipe: https://github.com/sabotage-linux/sabotage/blob/master/pkg/mesalib#L19 patches: https://github.com/sabotage-linux/sabotage/blob/master/KEEP/mesalib-fpclassify.patch https://github.com/sabotage-linux/sabotage/blob/master/KEEP/mesalib-strtod.patch https://github.com/sabotage-linux/sabotage/blob/master/KEEP/mesalib-strtof.patch > nothing actually works with the SDL/musl binary. basically what you should try to do is build all dependencies against musl. > So, will it ever work? even if it would work, mixing glibc and musl linked things is far from optimal. > > Thanks! btw, you might be interested in this SDL bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2019