-------- Original Message --------
Subject: Re: [musl] problems with dynamic linking since 0.9.1
From: Rich Felker <dalias@aerifal.cx>
Date: Wed, August 14, 2013 1:58 pm
To: musl@lists.openwall.com

On Wed, Aug 14, 2013 at 10:47:08PM +0200, Jens wrote:
> >My recollection was that it failed to support -Bsymbolic-functions at
> >all and would produce an error when encountering it, so this makes me
> >wonder how generation of libc.so succeeded at all...
>
> The musl libc in this case is built with binutils-2.20.1, since the
> older binutils (2.17) didnt work. You helped me with this exact
> problem some months ago.
>
> I have a build-environment where I specify all the dependencies for
> each build. binutils-2.20.1 is then a dependency for musl (where
> binutils 2.17 is the default).
>
> So for my use-case I can always specify a later binutils as a
> dependency for all musl builds. Though dynamic linking is a low
> priority for me, since all resulting binaries must be statically
> linked.

OK. It may be that binutils-2.20.1, at least with the options we're
using, is somehow tagging the libc.so file as incompatible with older
binutils. This would be unfortunate, and it's an issue I'd like to
resolve if that's what it is. I'll see if I can reproduce it or if
someone else (preferably someone on x86_64) can do so.

Rich

I ran into the same issue two or three months ago while building gcc against musl on Ubuntu 12.04 (x86_64) with binutils 2.22.  For all I can tell (from memory), the problem had nothing to do with musl, but rather with ld being built against one libc (musl), and gcc being built against another libc (gnu).  I solved it by setting PATH, LIBRARY_PATH and LD_LIBRARY_PATH appropriately.

zg