mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Cc: John Mudd <johnbmudd@gmail.com>
Subject: Re: Re: musl xclock?
Date: Wed, 20 May 2015 23:08:02 +0200	[thread overview]
Message-ID: <20150520210801.GK11258@port70.net> (raw)
In-Reply-To: <CAGDMk9FkoWkbjmmRPPkefFN8LuJZxSmMGwfVyTCX4zORpXoksg@mail.gmail.com>

* John Mudd <johnbmudd@gmail.com> [2015-05-20 16:47:45 -0400]:
> 
> It listed this:
> 
> libz.so.1 needed by /home/mudd/musl/libXft-2.3.2.install/lib/libXft.so
> found libz.so.1 at //lib/i386-linux-gnu/libz.so.1
> libc.so.6 needed by //lib/i386-linux-gnu/libz.so.1
> 

ok so you probably forgot to add libz to the -L path
and then ld went ahead and found the wrong one

> $ readelf -a ./libXft-2.3.2.install/lib/libXft.so | grep NEED
>  0x00000001 (NEEDED)                     Shared library:
> [libfontconfig.so.1]
>  0x00000001 (NEEDED)                     Shared library: [libxml2.so.2]
>  0x00000001 (NEEDED)                     Shared library: [libfreetype.so.6]
>  0x00000001 (NEEDED)                     Shared library: [libz.so.1]
>  0x00000001 (NEEDED)                     Shared library: [libXrender.so.1]
>  0x00000001 (NEEDED)                     Shared library: [libX11.so.6]
>  0x00000001 (NEEDED)                     Shared library: [libxcb.so.1]
>  0x00000001 (NEEDED)                     Shared library: [libXau.so.6]
>  0x00000001 (NEEDED)                     Shared library: [libc.so]
> 

this is ok

(in general you may also want to look at rpath too)

> $ /home/mudd/musl/lib/ld-musl-i386.so.1 --list
> ./libXft-2.3.2.install/lib/libXft.so
...
>         libz.so.1 => /usr/rx30/musl/zlib-1.2.8.install/lib/libz.so.1
> (0xb73c7000)
...

> $ ln -s /home/mudd/musl/lib/ld-musl-i386.so.1 musl_lib
> $ musl_lib --list ./libXft-2.3.2.install/lib/libXft.so
...
> Error loading shared library libz.so.1: No such file or directory (needed
> by ./libXft-2.3.2.install/lib/libXft.so)

you probably have an /home/mudd/musl/etc/ld-musl-i386.path
that is visible to the first command but not to the second
(nor to ld).

you may also want to figure out why ld tried the system
paths (it either uses hard coded paths or gets them from
some ld.so.conf, you can figure out what it's doing by
using strace -f on the build command)



  reply	other threads:[~2015-05-20 21:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 21:51 John Mudd
2015-05-19 22:13 ` Rich Felker
2015-05-20 15:28 ` John Mudd
2015-05-20 16:05   ` Rich Felker
2015-05-20 17:00     ` Szabolcs Nagy
2015-05-20 17:02       ` Szabolcs Nagy
2015-05-20 17:43       ` Rich Felker
2015-05-20 20:26   ` John Mudd
2015-05-20 20:47     ` John Mudd
2015-05-20 21:08       ` Szabolcs Nagy [this message]
2015-05-20 21:48         ` Szabolcs Nagy
2015-05-21 21:36           ` John Mudd

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=20150520210801.GK11258@port70.net \
    --to=nsz@port70.net \
    --cc=johnbmudd@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).