|
Message-ID: <20181108012839.GY5150@brightrain.aerifal.cx> Date: Wed, 7 Nov 2018 20:28:39 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Problems with pthreads from a shared object? On Wed, Nov 07, 2018 at 08:02:01PM -0500, Barry Flartus wrote: > On Wed, Nov 7, 2018 at 7:43 PM Rich Felker <dalias@...c.org> wrote: > > > On Wed, Nov 07, 2018 at 06:53:33PM -0500, Barry Flartus wrote: > > > > > > > > OK. Can you run strace -f ./launch (or whatever the launch program > > > > executable is called) and post the output? > > > > > > > > Rich > > > > > > > > > The "launching" program was compiled with gcc: > gcc launch.c -ldl -o launch You can't use shared libraries built for musl with glibc, so it's expected that this doesn't work. > When I attempt to compile the "launching" program with musl-gcc I get the > following output: > vagrant@...ntu-x64:~$ /usr/local/musl/x86_64/bin/musl-gcc launch.c -ldl -o > launch > vagrant@...ntu-x64:~$ ./launch > > Launching test... > Dynamic loading not supported Apparently it's static-linked. Did you omit shared libraries when building musl? > The shared object was compiled with musl-gcc: > /usr/local/musl/x86_64/bin/musl-gcc -Wall -lpthread -shared -fPIC test.c -o > test.so If so (if there's no libc.so, only libc.a, present) then this command will also be producing a broken .so file. You can't make shared libraries without a shared libc existing. Rich
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.