mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Isaac Dunham <ibid.ag@gmail.com>
To: musl@lists.openwall.com
Subject: Re: musl & proprietary programs
Date: Wed, 23 Dec 2015 23:00:52 -0800	[thread overview]
Message-ID: <20151224070051.GA5769@newbook> (raw)
In-Reply-To: <CAJDAfTB82BjcEE-V6d6cmJHUaVjJSPcDTQ1n=mJOAyFR_Q+Jzw@mail.gmail.com>

On Wed, Dec 23, 2015 at 06:00:12PM -0200, Alba Pompeo wrote:
> I also don't want to pollute my system with glibc. That's why I asked
> if there was any plan to improve musl support of proprietary programs
> like the ones I listed.

I looked through the thread and saw no list of proprietary programs.
(Is this undelivered mail? is google bouncing random emails?)

> But as a last resort, I think Rich's method is the best so far, but
> I'm a bit lost on the details since I'm not a libc expert.
> I couldn't find a wiki page detailing Rich's method on Void or Alpine
> (the 2 distros I know use musl). Is there a step-by-step for a novice
> somewhere?

I don't know of any step-by-step guide that covers what you're asking about,
but I have done it before. The important things:
* glibc uses paths configured in /etc/ld.so.conf, which these days
 usually just says "include /etc/ld.so.conf.d/*.conf".
 Those files, in turn, contain a newline-separated list of directories
 which are searched for libraries.
 musl uses /etc/ld-musl-$ARCH.path instead; this is a simple newline or
 colon separated list of directories.
* with Debian's default configuration, the directories which glibc searches
 are {/usr/,/}lib/linux-$CPU-gnu, and /usr/local/lib.
 Delete /etc/ld.so.conf.d/libc.conf, and the library directory structure
 will have no conflicts with musl.
* there are two possible approaches:
 - build a glibc chroot, drop a few links in /lib, put a few files in
   /etc, and you redirect glibc applications to the libraries in the
   chroot.
 - assemble a set of library packages, extract them, make sure there won't
   be conflicts, and copy it over into the root (so that you have both
   an Alpine install and a portion of a Debian install, with the same root)
   Only feasible with "multiarch-enabled" guest distros, meaning Debian and
   relatives.

For the "use a chroot" approach, you will probably want to do something
like this (assumes "guest" chroot in /opt/glibc-sys)
touch /etc/ld.so.nohwcap
sed -e 's|^/|/opt/glibc-sys/|' /opt/glibc-sys/etc/ld.so.conf.d/*.conf \
	>/etc/ld.so.conf

For the "parallel install" approach, I'd create a list of files that are
both the glibc library set and the host, sort through them to figure out
if they're needed/how to change them, and then do something like this
(from the root of wherever you've extracted the libs to):
rm ./etc/ld.so.conf.d/libc.conf
find ./ | grep -v -x -F -f ../glibc-alpine-dupes | cpio -p /
touch /etc/ld.so.nohwcap

(This assumes that the list of duplicates is in the format:
./etc/passwd
...)

HTH,
Isaac Dunham



  parent reply	other threads:[~2015-12-24  7:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 11:23 Alba Pompeo
2015-12-22 11:27 ` Timo Teras
2015-12-22 15:25   ` Рысь
2015-12-22 15:37     ` Alba Pompeo
2015-12-23 14:48       ` Szabolcs Nagy
2015-12-23 16:01         ` u-uy74
2015-12-23 17:22         ` Рысь
2015-12-23 17:43           ` Rich Felker
2015-12-23 18:51             ` Рысь
2015-12-23 20:00               ` Alba Pompeo
2015-12-24  5:04                 ` Рысь
2015-12-24  5:16                   ` Rich Felker
2015-12-24 10:40                     ` Szabolcs Nagy
2015-12-27  3:54                       ` Rich Felker
2015-12-24  7:00                 ` Isaac Dunham [this message]
2015-12-24 19:49                   ` Isaac Dunham
2015-12-24 21:29                     ` Alba Pompeo
2015-12-24  5:12               ` Rich Felker
2015-12-24  7:20                 ` Рысь

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151224070051.GA5769@newbook \
    --to=ibid.ag@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).