Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 21 Jan 2014 15:31:27 +0100
From: John Spencer <>
Subject: Re: dlopen'ing glibc linked libraries

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:

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: )

> 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 binary in order to provide OpenGL
> support), and these binaries depend on (expectedly?) almost

that's not quite true, sabotage linux builds mesa fine (with 2 minor 

> 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 

> Thanks!

btw, you might be interested in this SDL bug:

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.