On Mon, Jun 06, 2016 at 09:54:02PM +0100, Philip Deegan wrote:
> Hi,
>
> I'm trying out musl and I noticed that even when "--prefix" is used for
> "configure", "make install" still tries to put a symlink in "/lib".
>
> Is this intentional?
Yes. --syslibdir is not affected by --prefix because it's part of the
ABI. You can opt to override it at build time if you want to install
on the host as non-root, but as a result your binaries linked against
musl will contain a hard-coded path that's specific to your
installation and won't be easily usable on systems other than your
own.
If you just want to stage an installation for a chroot or cross root,
don't make the staging location part of the prefix but instead run
"make install DESTIR=...".
> I rather keep my system directories clean and isolate my dev stuff.
>
> Thanks
>
> PS. Is there a "musl-g++.specs" floating around anywhere?
In principle the same recipe as musl-gcc works for g++, just replacing
the name fo the command it invokes, but the c++ headers (or maybe the
precompiled versions thereof?) from a glibc-based host gcc encode lots
of glibc-specific assumptions, and badly break at compile time.
Linking to the libstdc++.a that was originally built against glibc
works okay though. If you can come up with a solution for the headers
problem, we can add a g++ wrapper, but I don't have the time or
interest to spend trying to figure that out myself.
Rich