From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12417 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Stefan_Fr=c3=b6berg?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: BUG: $ORIGIN does not seem to work Date: Sat, 27 Jan 2018 19:14:16 +0200 Message-ID: <01f83307-3bf3-caab-31d2-56491292c715@petroprogram.com> References: <17b31628-04b5-3181-4623-046ffc4c0cab@petroprogram.com> <20180126142137.GH4418@port70.net> <20180127110722.GI4418@port70.net> <20180127164204.GJ1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1517073320 28298 195.159.176.226 (27 Jan 2018 17:15:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Jan 2018 17:15:20 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-12433-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jan 27 18:15:16 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1efU4C-0006BK-N4 for gllmg-musl@m.gmane.org; Sat, 27 Jan 2018 18:15:00 +0100 Original-Received: (qmail 30252 invoked by uid 550); 27 Jan 2018 17:17:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 30234 invoked from network); 27 Jan 2018 17:16:59 -0000 In-Reply-To: <20180127164204.GJ1627@brightrain.aerifal.cx> Content-Language: en-US Xref: news.gmane.org gmane.linux.lib.musl.general:12417 Archived-At: 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 [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