From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53474) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxfGu-0003K5-18 for guix-patches@gnu.org; Tue, 13 Aug 2019 18:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxfGs-0005DD-Ne for guix-patches@gnu.org; Tue, 13 Aug 2019 18:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hxfGs-0005D7-KB for guix-patches@gnu.org; Tue, 13 Aug 2019 18:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hxfGs-0004TM-DB for guix-patches@gnu.org; Tue, 13 Aug 2019 18:28:02 -0400 Subject: [bug#37012] [PATCH] gnu: mingw: Add x86_64 support. Resent-Message-ID: From: Jan Nieuwenhuizen References: Date: Wed, 14 Aug 2019 00:27:13 +0200 In-Reply-To: (Carl Dong's message of "Mon, 12 Aug 2019 20:46:27 +0000") Message-ID: <87o90sitvi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 37012@debbugs.gnu.org Carl Dong writes: Hi Carl! > This patch parameterizes previously hard-coded instances of > i686-w64-mingw32, adding support for x86_64-w64-mingw32. That would be great. When I try it, I get --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --target=3Di686-w64-mingw32 hello --no-build-ho= ok building /gnu/store/b3qq8g6lhwgadp09vwwmnyd91bvll3s3-module-import-compiled= .drv... Backtrace: In ice-9/boot-9.scm: 841:4 19 (with-throw-handler _ _ _) In system/base/compile.scm: 59:11 18 (_) 155:11 17 (_ #) 235:18 16 (read-and-compile # ?) 183:32 15 (compile-fold (#) ?) In ice-9/boot-9.scm: 2312:4 14 (save-module-excursion _) In language/scheme/compile-tree-il.scm: 31:15 13 (_) In ice-9/psyntax.scm: 1235:36 12 (expand-top-sequence _ _ _ #f _ _ _) 1182:24 11 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 285:10 10 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #) In ice-9/eval.scm: 293:34 9 (_ #) In ice-9/boot-9.scm: 2874:4 8 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) 2071:24 7 (call-with-deferred-observers _) 2887:24 6 (_) 222:29 5 (map1 _) 222:29 4 (map1 (((guix build gnu-build-system)) ((guix utils)) ?)) 222:17 3 (map1 (((guix utils)) ((srfi srfi-1)) ((srfi #)) ((?)) ?)) 2803:6 2 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?) In unknown file: 1 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?) In ice-9/boot-9.scm: 752:25 0 (dispatch-exception _ _ _) ice-9/boot-9.scm:752:25: In procedure dispatch-exception: no code for module (guix utils) --8<---------------cut here---------------end--------------->8--- Does this it work for you, can you verify? > diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm > index d430b8afc4..77e279f07d 100644 > --- a/gnu/build/cross-toolchain.scm > +++ b/gnu/build/cross-toolchain.scm > @@ -22,6 +22,7 @@ > (define-module (gnu build cross-toolchain) > #:use-module (guix build utils) > #:use-module (guix build gnu-build-system) > + #:use-module (guix utils) I am suspecting this one here, in which case > @@ -168,8 +169,8 @@ C_*INCLUDE_PATH." > a target triplet." > (modify-phases phases > (add-before 'configure 'set-cross-path > - (if (string-contains target "mingw") > - set-cross-path/mingw > + (if (target-mingw? target) > + (cut set-cross-path/mingw #:target target <...>) > set-cross-path)) > (add-after 'install 'make-cross-binutils-visible > (cut make-cross-binutils-visible #:target target <...>)) this would need to change. > diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm > index 3e96f2c475..907f2c3c35 100644 > --- a/gnu/packages/mingw.scm > +++ b/gnu/packages/mingw.scm ... > + (description > + "Minimalist GNU for Windows (@dfn{MinGW}) is a complete software > +de velopment environment for creating native Microsoft Windows applicat= ions. ^^ What happened here? > +It includes a set of Windows-specific header files and static import l= ibraries > +wh ich enable the use of the Windows API. It does not rely on any thir= d-party C > +ru ntime dynamic-link libraries (@dfn{DLL}s). ^^ Otherwise, LGTM. Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com