From: "Stefan Fröberg" <stefan.froberg@petroprogram.com>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: BUG: $ORIGIN does not seem to work
Date: Sat, 27 Jan 2018 19:14:16 +0200 [thread overview]
Message-ID: <01f83307-3bf3-caab-31d2-56491292c715@petroprogram.com> (raw)
In-Reply-To: <20180127164204.GJ1627@brightrain.aerifal.cx>
Hi Rich
Rich Felker kirjoitti 27.01.2018 klo 18:42:
> On Sat, Jan 27, 2018 at 06:20:27PM +0200, Stefan Fröberg wrote:
>> Hi
>>
>>
>> Szabolcs Nagy kirjoitti 27.01.2018 klo 13:07:
>>> * Stefan Fröberg <stefan.froberg@petroprogram.com> [2018-01-27 01:50:21 +0200]:
>>>> My ldd is just symbolic link inside musl chroot environment, to
>>>> /lib/ld-musl-x86_64.so.1
>>>> and it's symbolic link to /lib/libc.so
>>>>
>>>> Here is readelf output of that test program
>>>> readelf -d x
>>>>
>>>> Dynamic section at offset 0xe10 contains 24 entries:
>>>> Tag Type Name/Value
>>>> 0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.1]
>>> ^^^^^^^^^^^^^^^^
>>> this looks like the wrong library version
>>>
>>> if you had straced the ldd output you would have seen
>>> that musl tries to open lib/libcrypto.so.1.1, but you
>>> probably only have lib/libcrypto.so.1.0.0 based on the
>>> glibc ldd output below.
>> No, that ldd was run inside, pure, chrooted musl environment. No glibc
>> inside.
>> These are the only libcrypto* files inside that chroot environment:
>>
>> ls -lah /usr/lib/libcrypto.*
>> -rw-r--r-- 1 0 0 5.0M Dec 17 00:24 /usr/lib/libcrypto.a
>> lrwxrwxrwx 1 0 0 16 Dec 17 00:24
>> /usr/lib/libcrypto.so -> libcrypto.so.1.1
>> -rwxr-xr-x 1 0 0 3.0M Jan 26 12:58
>> /usr/lib/libcrypto.so.1.1
> OK, but it still means ld picked up a different version of libcrypto
> (at link time) and encoded the dependency on that different version.
> You need to ensure that gcc/ld is searching your lib dir at link time.
>
> BTW running the program itself or ldd under strace can be very
> informative to see what's happening.
>
> Rich
>
Well, I can of course try to compile libcrypto again completely from
scratch inside that chroot environment and see if it helps.
Best Regards
Stefan
next prev parent reply other threads:[~2018-01-27 17:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 13:39 Stefan Fröberg
2018-01-26 14:21 ` Szabolcs Nagy
2018-01-26 23:50 ` Stefan Fröberg
2018-01-27 11:07 ` Szabolcs Nagy
2018-01-27 16:20 ` Stefan Fröberg
2018-01-27 16:42 ` Rich Felker
2018-01-27 17:14 ` Stefan Fröberg [this message]
2018-01-27 19:26 ` Szabolcs Nagy
2018-01-27 22:07 ` Stefan Fröberg
2018-01-28 0:54 ` Szabolcs Nagy
2018-02-07 17:35 ` Rich Felker
2018-02-07 20:28 ` Szabolcs Nagy
2018-01-26 16:34 ` Rich Felker
2018-01-26 21:28 ` Stefan Fröberg
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=01f83307-3bf3-caab-31d2-56491292c715@petroprogram.com \
--to=stefan.froberg@petroprogram.com \
--cc=dalias@libc.org \
--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).