GNU bug report logs - #46740
[PATCH] gnu: make-nsis: Fix build

Previous Next

Package: guix-patches;

Reported by: Carl Dong <contact <at> carldong.me>

Date: Wed, 24 Feb 2021 03:02:02 UTC

Severity: normal

Tags: patch

Done: Carl Dong <contact <at> carldong.me>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46740 in the body.
You can then email your comments to 46740 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46740; Package guix-patches. (Wed, 24 Feb 2021 03:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carl Dong <contact <at> carldong.me>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 24 Feb 2021 03:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carl Dong <contact <at> carldong.me>
To: guix-patches <at> gnu.org
Cc: Carl Dong <contact <at> carldong.me>
Subject: [PATCH] gnu: make-nsis: Fix build
Date: Tue, 23 Feb 2021 22:00:50 -0500
* gnu/packages/installers.scm (make-nsis)[arguments]: Use
C{,PLUS}_INCLUDE_PATH instead of CPATH environment variable to fix
build.
---
 gnu/packages/installers.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index a8a5c36a18..e8196b27d0 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -96,9 +96,18 @@
                              ;; CROSS_-prefixed version of env vars
                              (setenv (string-append "CROSS_" env-name)
                                      (filter-delimited-string env-val mingw-path?))))
-                         '("CPATH" "LIBRARY_PATH"))
+                         '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH"))
                         ;; Hack to place mingw-w64 path at the end of search
                         ;; paths.  Could probably use a specfile and dirafter
+                        (setenv "CROSS_C_INCLUDE_PATH"
+                                (string-join
+                                 `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc")
+					                     "/lib/gcc/" ,triplet "/"
+							     ,(package-version xgcc) <>)
+                                                   '("/include"
+                                                     "/include-fixed"))
+                                   ,(getenv "CROSS_C_INCLUDE_PATH"))
+                                 ":"))
                         (setenv "CROSS_CPLUS_INCLUDE_PATH"
                                 (string-join
                                  `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>)
@@ -108,7 +117,7 @@
                                             ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>)
                                                    '("/include"
                                                      "/include-fixed"))))
-                                   ,(getenv "CROSS_CPATH"))
+                                   ,(getenv "CROSS_CPLUS_INCLUDE_PATH"))
                                  ":"))))
                     (add-before 'build 'fix-target-detection
                       (lambda _
-- 
2.30.1





Information forwarded to guix-patches <at> gnu.org:
bug#46740; Package guix-patches. (Wed, 24 Feb 2021 08:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 46740 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Carl Dong <contact <at> carldong.me>
Cc: 46740 <at> debbugs.gnu.org
Subject: Re: [bug#46740] [PATCH] gnu: make-nsis: Fix build
Date: Wed, 24 Feb 2021 08:43:15 +0000
[Message part 1 (text/plain, inline)]
Carl Dong <contact <at> carldong.me> writes:

> * gnu/packages/installers.scm (make-nsis)[arguments]: Use
> C{,PLUS}_INCLUDE_PATH instead of CPATH environment variable to fix
> build.
> ---
>  gnu/packages/installers.scm | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
> index a8a5c36a18..e8196b27d0 100644
> --- a/gnu/packages/installers.scm
> +++ b/gnu/packages/installers.scm
> @@ -96,9 +96,18 @@
>                               ;; CROSS_-prefixed version of env vars
>                               (setenv (string-append "CROSS_" env-name)
>                                       (filter-delimited-string env-val mingw-path?))))
> -                         '("CPATH" "LIBRARY_PATH"))
> +                         '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH"))
>                          ;; Hack to place mingw-w64 path at the end of search
>                          ;; paths.  Could probably use a specfile and dirafter
> +                        (setenv "CROSS_C_INCLUDE_PATH"
> +                                (string-join
> +                                 `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc")
> +					                     "/lib/gcc/" ,triplet "/"
> +							     ,(package-version xgcc) <>)
> +                                                   '("/include"
> +                                                     "/include-fixed"))
> +                                   ,(getenv "CROSS_C_INCLUDE_PATH"))
> +                                 ":"))
>                          (setenv "CROSS_CPLUS_INCLUDE_PATH"
>                                  (string-join
>                                   `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>)
> @@ -108,7 +117,7 @@
>                                              ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>)
>                                                     '("/include"
>                                                       "/include-fixed"))))
> -                                   ,(getenv "CROSS_CPATH"))
> +                                   ,(getenv "CROSS_CPLUS_INCLUDE_PATH"))
>                                   ":"))))
>                      (add-before 'build 'fix-target-detection
>                        (lambda _

Hey!

Looks like this does fix things which is great [1], but it also
introduces some lint warnings [2].

1: https://data.guix-patches.cbaines.net/compare/package-derivations?base_commit=c418c6b64cbfa7a4eb1bfb7d02a99083103dd40e&target_commit=28d1e194346b3dae2ae4e969c00724d4d1037ff4&locale=en_US.UTF-8
2: https://data.guix-patches.cbaines.net/compare?base_commit=c418c6b64cbfa7a4eb1bfb7d02a99083103dd40e&target_commit=28d1e194346b3dae2ae4e969c00724d4d1037ff4

So, I'd remove the tabs and tweak the indentation so you're not
introducing any new long lines. But apart from that I think it's fine to
push, you can push right?

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46740; Package guix-patches. (Wed, 24 Feb 2021 20:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 46740 <at> debbugs.gnu.org (full text, mbox):

From: Carl Dong <contact <at> carldong.me>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 46740 <at> debbugs.gnu.org
Subject: Re: [bug#46740] [PATCH] gnu: make-nsis: Fix build
Date: Wed, 24 Feb 2021 15:42:01 -0500
[Message part 1 (text/plain, inline)]
Hi Chris!

Been a while since I last submitted a patch, so want to make sure I get this right :-)
Thanks for your help!

Does this look alright?

From 6b4460bdb64db6f7f9f33c80710bc7020b8fd1f0 Mon Sep 17 00:00:00 2001
From: Carl Dong <contact <at> carldong.me>
Date: Wed, 3 Feb 2021 20:21:31 +0000
Subject: [PATCH] gnu: make-nsis: Fix build

* gnu/packages/installers.scm (make-nsis)[arguments]: Use
C{,PLUS}_INCLUDE_PATH instead of CPATH environment variable to fix
build.
---
 gnu/packages/installers.scm | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index a8a5c36a18..775b91f0f7 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -92,13 +92,23 @@
                              ;; for native toolchain
                              (setenv env-name
                                      (filter-delimited-string env-val (negate mingw-path?)))
-                             ;; Add the removed paths back into
-                             ;; CROSS_-prefixed version of env vars
+                             ;; Add the removed paths back into CROSS_-prefixed
+                             ;; version of env vars
                              (setenv (string-append "CROSS_" env-name)
                                      (filter-delimited-string env-val mingw-path?))))
-                         '("CPATH" "LIBRARY_PATH"))
+                         '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH"))
                         ;; Hack to place mingw-w64 path at the end of search
                         ;; paths.  Could probably use a specfile and dirafter
+                        (setenv "CROSS_C_INCLUDE_PATH"
+                                (string-join
+                                 `(,@(map (cut string-append
+                                               (assoc-ref %build-inputs "xgcc")
+                                               "/lib/gcc/" ,triplet "/"
+                                               ,(package-version xgcc) <>)
+                                          '("/include"
+                                            "/include-fixed"))
+                                   ,(getenv "CROSS_C_INCLUDE_PATH"))
+                                 ":"))
                         (setenv "CROSS_CPLUS_INCLUDE_PATH"
                                 (string-join
                                  `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>)
@@ -108,21 +118,20 @@
                                             ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>)
                                                    '("/include"
                                                      "/include-fixed"))))
-                                   ,(getenv "CROSS_CPATH"))
+                                   ,(getenv "CROSS_CPLUS_INCLUDE_PATH"))
                                  ":"))))
                     (add-before 'build 'fix-target-detection
                       (lambda _
-                        ;; NSIS target detection is screwed up, manually
-                        ;; change it ourselves
+                        ;; NSIS target detection is screwed up, manually change
+                        ;; it ourselves
                         (substitute* "Source/build.cpp" (("m_target_type=TARGET_X86ANSI")
                                                          (string-append "m_target_type=" ,nsis-target-type))))))))
       (home-page "http://nsis.sourceforge.net/")
       (synopsis "A professional open source system to create Windows installers")
       (description
-       "NSIS (Nullsoft Scriptable Install System) is a professional open
-source system to create Windows installers. It is designed to be as small and
-flexible as possible and is therefore very suitable for internet
-distribution.")
+       "NSIS (Nullsoft Scriptable Install System) is a professional open source
+system to create Windows installers. It is designed to be as small and flexible
+as possible and is therefore very suitable for internet distribution.")
       (license (license:non-copyleft "file://COPYING"
                                      "See COPYING in the distribution.")))))

--
2.30.1

Cheers,
Carl Dong
contact <at> carldong.me
"I fight for the users"

> On Feb 24, 2021, at 3:43 AM, Christopher Baines <mail <at> cbaines.net> wrote:
> 
> 
> Carl Dong <contact <at> carldong.me> writes:
> 
>> * gnu/packages/installers.scm (make-nsis)[arguments]: Use
>> C{,PLUS}_INCLUDE_PATH instead of CPATH environment variable to fix
>> build.
>> ---
>> gnu/packages/installers.scm | 13 +++++++++++--
>> 1 file changed, 11 insertions(+), 2 deletions(-)
>> 
>> diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
>> index a8a5c36a18..e8196b27d0 100644
>> --- a/gnu/packages/installers.scm
>> +++ b/gnu/packages/installers.scm
>> @@ -96,9 +96,18 @@
>>                              ;; CROSS_-prefixed version of env vars
>>                              (setenv (string-append "CROSS_" env-name)
>>                                      (filter-delimited-string env-val mingw-path?))))
>> -                         '("CPATH" "LIBRARY_PATH"))
>> +                         '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH"))
>>                         ;; Hack to place mingw-w64 path at the end of search
>>                         ;; paths.  Could probably use a specfile and dirafter
>> +                        (setenv "CROSS_C_INCLUDE_PATH"
>> +                                (string-join
>> +                                 `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc")
>> +					                     "/lib/gcc/" ,triplet "/"
>> +							     ,(package-version xgcc) <>)
>> +                                                   '("/include"
>> +                                                     "/include-fixed"))
>> +                                   ,(getenv "CROSS_C_INCLUDE_PATH"))
>> +                                 ":"))
>>                         (setenv "CROSS_CPLUS_INCLUDE_PATH"
>>                                 (string-join
>>                                  `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>)
>> @@ -108,7 +117,7 @@
>>                                             ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>)
>>                                                    '("/include"
>>                                                      "/include-fixed"))))
>> -                                   ,(getenv "CROSS_CPATH"))
>> +                                   ,(getenv "CROSS_CPLUS_INCLUDE_PATH"))
>>                                  ":"))))
>>                     (add-before 'build 'fix-target-detection
>>                       (lambda _
> 
> Hey!
> 
> Looks like this does fix things which is great [1], but it also
> introduces some lint warnings [2].
> 
> 1: https://data.guix-patches.cbaines.net/compare/package-derivations?base_commit=c418c6b64cbfa7a4eb1bfb7d02a99083103dd40e&target_commit=28d1e194346b3dae2ae4e969c00724d4d1037ff4&locale=en_US.UTF-8
> 2: https://data.guix-patches.cbaines.net/compare?base_commit=c418c6b64cbfa7a4eb1bfb7d02a99083103dd40e&target_commit=28d1e194346b3dae2ae4e969c00724d4d1037ff4
> 
> So, I'd remove the tabs and tweak the indentation so you're not
> introducing any new long lines. But apart from that I think it's fine to
> push, you can push right?
> 
> Chris

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#46740; Package guix-patches. (Thu, 25 Feb 2021 09:00:02 GMT) Full text and rfc822 format available.

Message #14 received at 46740 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Carl Dong <contact <at> carldong.me>
Cc: 46740 <at> debbugs.gnu.org
Subject: Re: [bug#46740] [PATCH] gnu: make-nsis: Fix build
Date: Thu, 25 Feb 2021 08:59:23 +0000
[Message part 1 (text/plain, inline)]
Carl Dong <contact <at> carldong.me> writes:

> Been a while since I last submitted a patch, so want to make sure I
> get this right :-) Thanks for your help!
>
> Does this look alright?

Yep, that looks fine.

There's a couple of changes that look a bit redundant, the rearranging
of a comment and the description string, but that's not a problem.
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 46740 <at> debbugs.gnu.org and Carl Dong <contact <at> carldong.me> Request was from Carl Dong <contact <at> carldong.me> to control <at> debbugs.gnu.org. (Fri, 26 Feb 2021 17:05:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 27 Mar 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.