unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Carl Dong <contact@carldong.me>
Cc: 37012@debbugs.gnu.org
Subject: [bug#37012] [PATCH] gnu: mingw: Add x86_64 support.
Date: Wed, 14 Aug 2019 00:27:13 +0200	[thread overview]
Message-ID: <87o90sitvi.fsf@gnu.org> (raw)
In-Reply-To: <u4aN_2bXkeBODxvyzylFp_8zOBqWcVOOwJoQO3SzUY4-5CBLijSCjy9yzorApX2D5jTRhLbC3QMmfVlZPc6UgsVJ8IJkA-az5Y9OFNRq2Ws=@carldong.me> (Carl Dong's message of "Mon, 12 Aug 2019 20:46:27 +0000")

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=i686-w64-mingw32 hello --no-build-hook
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 (_ #<closed: file 61d8c0>)
   235:18 16 (read-and-compile #<input: /gnu/store/vdspbcgdlfg7xblm?> ?)
   183:32 15 (compile-fold (#<procedure compile-tree-il (x e opts)>) ?)
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 (_ #<module (#{ g31}#) 62bf00>)
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 applications.
     ^^
What happened here?

> +It   includes a set of Windows-specific header files and static import libraries
> +wh  ich enable the use of the Windows API.  It does not rely on any third-party C
> +ru  ntime dynamic-link libraries (@dfn{DLL}s).
     ^^

Otherwise, LGTM.

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

  reply	other threads:[~2019-08-13 22:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 20:46 [bug#37012] [PATCH] gnu: mingw: Add x86_64 support Carl Dong
2019-08-13 22:27 ` Jan Nieuwenhuizen [this message]
2019-08-14  6:57   ` Jan Nieuwenhuizen
2019-08-14 17:54     ` Carl Dong
2019-08-14 18:40       ` Jan Nieuwenhuizen
2019-08-14 18:50         ` Carl Dong
2019-08-14 19:33           ` bug#37012: " Jan Nieuwenhuizen
2019-08-14 12:09 ` [bug#37012] " Thompson, David
2019-08-14 17:56   ` Carl Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o90sitvi.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=37012@debbugs.gnu.org \
    --cc=contact@carldong.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).