From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: [PATCH] gnu: Fix load-extension path in packaging of guile-ncurses. Date: Tue, 20 Dec 2016 12:03:31 +0100 Message-ID: <20161220110331.GA20543@jocasta.intra> References: <1482169820-2043-1-git-send-email-jmd@gnu.org> <1482169820-2043-2-git-send-email-jmd@gnu.org> <87lgvb9ii1.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJICt-0000FJ-K0 for guix-devel@gnu.org; Tue, 20 Dec 2016 06:03:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJICr-0002yL-Uu for guix-devel@gnu.org; Tue, 20 Dec 2016 06:03:43 -0500 Content-Disposition: inline In-Reply-To: <87lgvb9ii1.fsf@netris.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: Mark H Weaver Cc: guix-devel@gnu.org, John Darrington --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 20, 2016 at 02:17:42AM -0500, Mark H Weaver wrote: Hi John, =20 John Darrington writes: > * gnu/packages/guile.scm (guile-ncurses) [arguments]: Install shared= object before > attempting to build the package. Patch load-extension path before b= uilding instead > of after. =20 The first sentence above is mistaken or misleading: =20 "Install shared object before attempting to build the package." How about I change it to "... attempting to build the rest of the package" = ?? > + (add-before 'build 'fix-libguile-ncurses-file-name > (lambda* (#:key outputs #:allow-other-keys) > - [...] > + (and (zero? (system* "make" "install" > + "-C" "src/ncurses" > + "-j" (number->string > + (parallel-job-count)))) > + (let* ((out (assoc-ref outputs "out")) > + (dir "src/ncurses") > + (files (find-files dir ".scm"))) > + (substitute* files > + (("\"libguile-ncurses\"") > + (format #f "\"~a/lib/guile/2.0/libguile-ncur= ses\"" > + out))) > + #t))))))) =20 By running "make install -C src/ncurses [...]", you are in fact causing most if not all of the package to be built and installed right here in the 'fix-libguile-ncurses-file-name' phase. I didn't check to see what percentage of the package is contained in the=20 src/ncurses directory, but it certainly isn't "all". This is no good. Why do you think it is "no good"? It may not be perfect, but it is better than what we had before, and certainly fixes the problem. =20 Can you help me understand what you're trying to do here, and why? =20 Sure (I would like to see a convention where such explanations are put in the commit messaage, but I have previously been outvoted on that issue): The scheme code contains a number of procedures similar to=20 (load-extension "libguile-ncurses" "func"). We need the first string to contain the absolute path where the shared object is=20 installed. The previous version had done this by patching the=20 =2Escm file post-installation. However that meant that the compiled =2Ego file was compiled with the old, unmodified version. =20 This patch ensures that the .scm files are patched first, and that the .go files are built from the patched .scm files. I hope this makes things clearer for you. J' --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlhZEAMACgkQimdxnC3oJ7OJrACghS4/a3jaRK73k20rcIAfgHmK 2uIAnRQPG3W5WIP2VdD+v8JZ8OPK5TS8 =6hGD -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF--