From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59712) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPieC-0002Gw-9x for guix-patches@gnu.org; Wed, 30 Oct 2019 03:44:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPieA-0001E5-4u for guix-patches@gnu.org; Wed, 30 Oct 2019 03:44:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPieA-0001C4-0D for guix-patches@gnu.org; Wed, 30 Oct 2019 03:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iPie9-0001S7-RA for guix-patches@gnu.org; Wed, 30 Oct 2019 03:44:01 -0400 Subject: [bug#37870] [PATCH v3] gnu: make-nsis: Fix cross-compilation. Resent-Message-ID: Date: Wed, 30 Oct 2019 09:42:57 +0200 From: Efraim Flashner Message-ID: <20191030074257.GF20762@E5400> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NGIwU0kFl1Z1A3An" Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Carl Dong Cc: "37870@debbugs.gnu.org" <37870@debbugs.gnu.org> --NGIwU0kFl1Z1A3An Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 29, 2019 at 08:11:22PM +0000, Carl Dong wrote: > Updated the patch to address Efraim's suggestion. >=20 > ----- >=20 > * gnu/packages/installers.scm (make-nsis)[arguments]: Enforce correct > ordering of search paths (mingw-w64 last). > --- > gnu/packages/installers.scm | 27 ++++++++++++++++++++++----- > 1 file changed, 22 insertions(+), 5 deletions(-) >=20 > diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm > index c987254d61..9229359fdf 100644 > --- a/gnu/packages/installers.scm > +++ b/gnu/packages/installers.scm > @@ -28,7 +28,10 @@ > #:use-module (guix utils)) >=20 > (define (make-nsis machine target-arch nsis-target-type) > - (let ((triplet (string-append machine "-" "w64-mingw32"))) > + (let* ((triplet (string-append machine "-" "w64-mingw32")) > + (xbinutils (cross-binutils triplet)) > + (xlibc (cross-libc triplet)) > + (xgcc (cross-gcc triplet #:libc xlibc))) > (package > (name (string-append "nsis-" machine)) > (version "3.04") > @@ -41,13 +44,14 @@ > "1xgllk2mk36ll2509hd31mfq6blgncmdzmwxj3ymrwshdh23d5b0"= )) > (patches (search-patches "nsis-env-passthru.patch")))) > (build-system scons-build-system) > - (native-inputs `(("xgcc" ,(cross-gcc triplet #:libc (cross-libc tr= iplet))) > - ("xbinutils" ,(cross-binutils triplet)) > - ("mingw-w64" ,(cross-libc triplet)))) > + (native-inputs `(("xgcc" ,xgcc) > + ("xbinutils" ,xbinutils) > + ("mingw-w64" ,xlibc))) > (inputs `(("zlib" ,zlib))) > (arguments > `(#:scons ,scons-python2 > #:modules ((srfi srfi-1) > + (srfi srfi-26) > (guix build utils) > (guix build scons-build-system)) > #:tests? #f > @@ -92,7 +96,20 @@ > ;; CROSS_-prefixed version of env vars > (setenv (string-append "CROSS_" env-name) > (filter-delimited-string env-val mi= ngw-path?)))) > - '("CPLUS_INCLUDE_PATH" "LIBRARY_PATH" "C_INCLUD= E_PATH")))) > + '("CPATH" "LIBRARY_PATH")) > + ;; Hack to place mingw-w64 path at the end of se= arch > + ;; paths. Could probably use a specfile and dir= after > + (setenv "CROSS_CPLUS_INCLUDE_PATH" > + (string-join > + `(,@(map (cut string-append (assoc-ref = %build-inputs "xgcc") <>) > + `("/include/c++" > + ,(string-append "/include/c+= +/" ,triplet) > + "/include/c++/backward" > + ,@(map (cut string-append "/= lib/gcc/" ,triplet "/" ,(package-version xgcc) <>) > + '("/include" > + "/include-fixed")))) > + ,(getenv "CROSS_CPATH")) > + ":")))) > (add-before 'build 'fix-target-detection > (lambda _ > ;; NSIS target detection is screwed up, manually I haven't tested it, but it looks good to me --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --NGIwU0kFl1Z1A3An Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl25Pv4ACgkQQarn3Mo9 g1Gg2RAAhasFRqmMffU7QxWEoo0usdTDW0iIu0lCIcGInphF/crR03iEnm2KneU2 kPSWyEhpm/eg17yANZ3i3ToIlct84LjhuA+21wDXwKdQmVJMVpftmvco+g3GVMXE ladD4AXHTeiU+CFlTKDvwZ8/blH8p9bNEvvRhQYlrBATYfxJXQ04tydeRhGcfLIi gJ4FZAT8hclap+yYY9qWxRLIBzWTXhOwEuUQ/oP3iWrq0Jfkoo3+h54FkeobjZ2x YiYptGgmp3sqVluWjby0Q+jSaINM6Mj2lsTmXG0KJZOv+n33tZyvGllQVeUmlZYl MF+wBlGOibAwPvvwHI+yXVz7tbZx0fbcpD+wrEzlO3kntX6mkw6RItP1aGf5A/qi JbZZRwGNpoHxS1P9fs9Li04d/UvO4ISKJ2cRQAwZaMa3JloueqcN+elmlWvKMPh2 4YOsz4EdjPpVzk2aSiPoW/Q23/fOSsqcM1RMEUJIcyQj6LH2WZzYr/XQzhnwsmOl /2ep0HtbvIpVuRa5rgOPTTTywtEp2hKlBz9kioHJrLWGEHasp20tOvbP1wM33r8e QhA1G5XcKX2/hPx5nwVDyrwJ+DYlKN34upM0xcFai/ozTBeNkYFYno/SdI9KXf5b j4DQI4ihVo817ep1Ji+RURHr8yG1rAPIBE1piKuknAKxB8U65/o= =E2iR -----END PGP SIGNATURE----- --NGIwU0kFl1Z1A3An--