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: [PATCH 2/3] Add soname to dynamic section
Date: Sun, 27 Apr 2014 22:54:22 -0700	[thread overview]
Message-ID: <20140428055421.GA1429@muslin> (raw)
In-Reply-To: <CAMKF1sqEmNRhkT7mH=Nk3pRnWYQQbc2Nc2dRVLM391dYLoBkTQ@mail.gmail.com>

On Sun, Apr 27, 2014 at 10:02:45PM -0700, Khem Raj wrote:
> On Sun, Apr 27, 2014 at 7:00 PM, Rich Felker <dalias@libc.org> wrote:
> > This is intentionally omitted. If it exists on a system where glibc is
> > also present, running ldconfig will create a symlink named libc.so in
> > /lib pointing to ld-musl-$ARCH.so.1.
> >
> > What exactly are you trying to achieve by adding it?
> 
> I am bootstrapping system using OpenEmbedded/musl and we use the
> content of SONAME
> to rename the library package as well as shlibs code then uses it to
> for dependencies as well. I kept it libc.so for simplicity but it
> could be a distinct name. Coexisting with glibc is not  my usecase.
> here. but if you have libc.so in /usr/lib then you are in conflict
> with glibc anyway, how do you handle that ?
Default configuration is to set libdir to /usr/local/musl/lib, and
syslibdir to /lib.
ld-musl-$ARCH.so.1 goes in syslibdir; the libc.so symlink is solely used
for dynamic linking and goes in libdir.
Putting libc.so in /usr/lib requires passing --prefix=/usr, as is 
specifically recommended against in INSTALL:
  DO NOT set the prefix to "/usr", "/usr/local", or "/" unless you're
  upgrading libc on an existing musl-based system. Doing so will break
  your system when you run "make install" and it may be difficult to
  recover.

The SONAME used to be in the makefile, but was removed due to people
encountering problems when they ran ldconfig.

For the record, here's the approach I used to fix a Debian system that I
hosed at least twice due to the SONAME causing trouble with ldconfig:
-boot to a busybox ash or other static shell (root=... rw init=/bin/...)
-manually correct the links if glibc is still installed;
otherwise use "busybox dpkg -i /var/cache/apt/archives/..." and check
that libc.so exists.
-sync twice, then reboot.

There are no problems with coxistence caused by the existing approach.

Hope this clarifies things,
Isaac Dunham


  reply	other threads:[~2014-04-28  5:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  1:43 [PATCH 1/3] bits/socket.h: Define SO_RCVBUFFORCE for mips Khem Raj
2014-04-28  1:43 ` [PATCH 2/3] Add soname to dynamic section Khem Raj
2014-04-28  2:00   ` Rich Felker
2014-04-28  5:02     ` Khem Raj
2014-04-28  5:54       ` Isaac Dunham [this message]
2014-04-28  6:00         ` Khem Raj
2014-04-28  6:22           ` Isaac Dunham
2014-04-28  6:32             ` Timo Teras
2014-04-28  7:20             ` Khem Raj
2014-04-28 14:28               ` Rich Felker
2014-04-28  1:43 ` [PATCH 3/3] stddef: Define max_align_t Khem Raj
2014-04-28  2:03   ` Rich Felker
2014-04-28  5:51     ` Khem Raj
2014-04-28 10:11       ` Szabolcs Nagy
2014-04-28 12:22         ` Jens Gustedt
2014-04-28 13:26           ` Szabolcs Nagy
2014-04-28 13:59             ` Jens Gustedt
2014-04-28 14:14             ` Rich Felker
2014-04-28 14:29 ` [PATCH 1/3] bits/socket.h: Define SO_RCVBUFFORCE for mips Rich Felker
2014-04-28 14:54   ` Khem Raj
2014-04-30 18:48     ` Rich Felker

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=20140428055421.GA1429@muslin \
    --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).