mailing list of musl libc
 help / color / mirror / code / Atom feed
* make install permissions
@ 2016-06-06 20:54 Philip Deegan
  2016-06-06 21:45 ` Szabolcs Nagy
  2016-06-06 22:27 ` Rich Felker
  0 siblings, 2 replies; 4+ messages in thread
From: Philip Deegan @ 2016-06-06 20:54 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

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?

I rather keep my system directories clean and isolate my dev stuff.

Thanks

PS. Is there a "musl-g++.specs" floating around anywhere?

[-- Attachment #2: Type: text/html, Size: 491 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make install permissions
  2016-06-06 20:54 make install permissions Philip Deegan
@ 2016-06-06 21:45 ` Szabolcs Nagy
  2016-06-06 22:27 ` Rich Felker
  1 sibling, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2016-06-06 21:45 UTC (permalink / raw)
  To: musl

* Philip Deegan <philip.deegan@gmail.com> [2016-06-06 21:54:02 +0100]:
> 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?
> 

of course the dynamic linker name is part of the abi,
if you change that then you loose binary portability.

you can still change it by configuring musl with
different --syslibdir

> I rather keep my system directories clean and isolate my dev stuff.
> 

the binaries will have non-standard interpreter path
in them, so they will only work with that particular
path setup.

> Thanks
> 
> PS. Is there a "musl-g++.specs" floating around anywhere?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make install permissions
  2016-06-06 20:54 make install permissions Philip Deegan
  2016-06-06 21:45 ` Szabolcs Nagy
@ 2016-06-06 22:27 ` Rich Felker
  2016-06-07  9:48   ` Philip Deegan
  1 sibling, 1 reply; 4+ messages in thread
From: Rich Felker @ 2016-06-06 22:27 UTC (permalink / raw)
  To: Philip Deegan; +Cc: musl

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make install permissions
  2016-06-06 22:27 ` Rich Felker
@ 2016-06-07  9:48   ` Philip Deegan
  0 siblings, 0 replies; 4+ messages in thread
From: Philip Deegan @ 2016-06-07  9:48 UTC (permalink / raw)
  To: Rich Felker; +Cc: musl

[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]

Hi Rich,

Thanks for getting back to me.

I understand it might become platform dependent with a hard coded path,
thanks for the tip.

I believe I have run into the C++ header problem you mentioned as I get an
error "__GLIBC_PREREQ", it seems precompiled for glibc.

I'll try to make a script for building g++/libstdc++ with musl rather than
libc. Might be easier to have a standalone version of gcc. I'll forward on
the script if you like.

Cheers

On Mon, Jun 6, 2016 at 11:27 PM, Rich Felker <dalias@libc.org> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2697 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-07  9:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 20:54 make install permissions Philip Deegan
2016-06-06 21:45 ` Szabolcs Nagy
2016-06-06 22:27 ` Rich Felker
2016-06-07  9:48   ` Philip Deegan

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).