From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [Patch 4/10] argon2: Install pkg-config file. Date: Mon, 26 Sep 2016 01:13:56 +0200 Message-ID: <20160926011356.3e31e740@scratchpost.org> References: <87mvjc1quq.fsf@openmailbox.org> <8737l41qnj.fsf@openmailbox.org> <20160915232412.6bcd757b@scratchpost.org> <87d1k0sx3s.fsf@openmailbox.org> <20160919211515.1f63db1d@scratchpost.org> <8760pjr43x.fsf@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boIcf-0008Mc-VS for guix-devel@gnu.org; Sun, 25 Sep 2016 19:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boIca-0006lo-Tf for guix-devel@gnu.org; Sun, 25 Sep 2016 19:14:13 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:49451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boIca-0006lh-NS for guix-devel@gnu.org; Sun, 25 Sep 2016 19:14:08 -0400 In-Reply-To: <8760pjr43x.fsf@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Lukas Gradl Cc: guix-devel@gnu.org Hi Lukas, On Sun, 25 Sep 2016 17:45:06 -0500 Lukas Gradl wrote: > Since the return value of "(symlink ...)" is > unspecified, then we don't need the "(and ...)" at all, right? Right. > My understanding is now that if this 'dring' binary were to get > executed, it would look for 'libargon2.so.0' in the Runpath. However, > there is only 'libargon2.so' in > '/gnu/store/8z4lfj32b7q308xigfj8w1nmgbgyvd6g-argon2-20160406/lib', which > it ignores. Yeah, .so files without version number in the name (xxx.so) are only used by gcc when linking. The actual running program doesn't do anything with them. I think ldconfig updates a database from soname to actual file name. I'm not sure what the rules for the symlinks in ldconfig are. > My next question was why it was looking for 'libargon2.so.0' at all if > it does not exist. I think it's because of the soname. The soname is the main ABI in this case, the files are just an implementation detail. The actual matching should be done via comparing sonames. It's just that it doesn't scan all files on the system in order to find it. >$ objdump -p /gnu/store/mfanlirixm9468z02vf4c8dqvjl5gm01-libring-2.2.0-1.41e032c/sbin/dring |grep argon2 > NEEDED libargon2.so.0 >$ objdump -p /gnu/store/5fh9w9x3ihvy9n7pw0q58xafj6x21w99-argon2-20160406/lib/libargon2.so >Dynamic Section: > SONAME libargon2.so.0 So far so good. It should just be in file libargon2.so.0 in order to be used. So I think the symlink that you are doing from the existing file libargo2.so to the required file libargon2.so.0 is fine. > To fix this situation it would probably suffice to make sure that the > soname and the filename of the Argon2 library match. I agree. > To that end, one > could either change the soname or the filename to match the other one. > I think that changing either of these is risky because other dependent > libraries might depend on one of those. Especially changing the soname would be bad. It's part of the ABI. Don't touch it - especially when it actually lists a major API version - as it does. What we could do is rename libargon2.so to libargo2.so.0. But then gcc won't find it - so I wouldn't recommend it. >So I would keep the symlink > 'libargon2.so.0' -> 'libargon2.so' but remove the 'libargon2.so.0.0.0' > since it appears unneeded. Building libring works with these changes. Yes. I think that is a good approach. Could you send an updated patchset? Thanks!