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, 19 Sep 2016 21:15:15 +0200 Message-ID: <20160919211515.1f63db1d@scratchpost.org> References: <87mvjc1quq.fsf@openmailbox.org> <8737l41qnj.fsf@openmailbox.org> <20160915232412.6bcd757b@scratchpost.org> <87d1k0sx3s.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]:55386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm42L-00047L-Tk for guix-devel@gnu.org; Mon, 19 Sep 2016 15:15:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm42F-0000L3-PD for guix-devel@gnu.org; Mon, 19 Sep 2016 15:15:28 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:34097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm42F-0000KE-IS for guix-devel@gnu.org; Mon, 19 Sep 2016 15:15:23 -0400 In-Reply-To: <87d1k0sx3s.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, I thought about it some more. On Sun, 18 Sep 2016 16:43:03 -0500 Lukas Gradl wrote: > + (and > + (install-file "argon2" (string-append out "/bin")) > + (install-file "libargon2.a" (string-append out "/lib")) > + (install-file "libargon2.so" (string-append out "/lib")) > + (install-file "argon2.pc" > + (string-append out "/lib/pkgconfig")) Hmm. I looked at the implementation of "install-file" and its return value seems to be the one of "copy-file". And the Guile manual specifies that the return value of "copy-file" is unspecified. (Instead it does dynamic unwinding on error) So I'd do the "install-file" and "copy-recursively" calls outside the "(and ...)". > + (copy-recursively "include" > + (string-append out "/include")) > + (zero? (system* "ln" "-s" > + (string-append out "/lib/libargon2.so") > + (string-append out "/lib/libargon2.so.0"))) I think that there's a "symlink" function in Guile for that (which has unspecified return value). Would probably be marginally faster, too. > + (zero? (system* ; Fix compatability for libtool based builds. > + "ln" "-s" > + (string-append out "/lib/libargon2.so") > + (string-append out "/lib/libargon2.so.0.0.0")))))))))) Likewise. About the part of the toolchain that sets the soname, either libtool mode=link does it ("-version-info") or it's an option "-soname" to ld (or gcc with "-Wl," prefix). The official soname used is set in argon2 Makefile: SO_LDFLAGS := -Wl,-soname,libargon2.so.0 ^^^^^^^^^ But I'd say it's fine to manually symlink - since it works. Please still check how the client of argon2 in this case (libring ?) loads the shared object.