GNU bug report logs - #49881
[PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency

Previous Next

Package: guix-patches;

Reported by: Thiago Jung Bauermann <bauermann <at> kolabnow.com>

Date: Wed, 4 Aug 2021 21:21:01 UTC

Severity: normal

Tags: patch

Merged with 49880, 49882

Done: Ludovic Courtès <ludo <at> gnu.org>

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 49881 in the body.
You can then email your comments to 49881 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#49881; Package guix-patches. (Wed, 04 Aug 2021 21:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thiago Jung Bauermann <bauermann <at> kolabnow.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 04 Aug 2021 21:21:01 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: guix-patches <at> gnu.org
Cc: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: [PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency
Date: Wed,  4 Aug 2021 18:20:21 -0300
The current GMP version is incompatible with MPFR 2.4 (which was released
in 2009) and causes the build of ‘mpfr-boot’ to fail.

Fix the problem by using ‘gmp-boot’, which is from early 2010.

* gnu/packages/commencement.scm (mpfr-boot)[propagated-inputs]: Add
gmp-boot.
---

Hello,

This is a problem affecting both master and core-updates-frozen, so
I suggest committing this patch to master. It applies cleanly on both
branches.

It also affects at least the i686-linux, x86_64-linux and powerpc64-linux
architectures.

For reference, there’s a ton of error messages during build but these
are the first ones:

In file included from mpfr-impl.h:81:0,
                 from add1.c:23:
mpfr.h:141:9: error: unknown type name ‘__gmp_const’
 typedef __gmp_const __mpfr_struct *mpfr_srcptr;
         ^~~~~~~~~~~
In file included from mpfr-impl.h:81:0,
                 from add.c:23:
mpfr.h:141:9: error: unknown type name ‘__gmp_const’
 typedef __gmp_const __mpfr_struct *mpfr_srcptr;
         ^~~~~~~~~~~
mpfr.h:141:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
 typedef __gmp_const __mpfr_struct *mpfr_srcptr;
                                   ^
mpfr.h:204:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘char’
 __MPFR_DECLSPEC __gmp_const char * mpfr_get_version _MPFR_PROTO
((void));
                             ^~~~
mpfr.h:205:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘char’
 __MPFR_DECLSPEC __gmp_const char * mpfr_get_patches _MPFR_PROTO
((void));
                             ^~~~


Thanks,
Thiago


 gnu/packages/commencement.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 16eb46d44d77..f8973392262f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1869,7 +1869,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
               (uri (string-append "mirror://gnu/mpfr/mpfr-" version
                                   ".tar.gz"))
               (sha256 (base32
-                       "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))))
+                       "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))
+    (propagated-inputs `(("gmp" ,gmp-boot)))))            ; <mpfr.h> refers to <gmp.h>
 
 (define mpc-boot
   (package




Merged 49881 49882. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 11 Aug 2021 21:39:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#49881; Package guix-patches. (Wed, 11 Aug 2021 21:50:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 49881 <at> debbugs.gnu.org
Subject: Re: bug#49881: [PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency
Date: Wed, 11 Aug 2021 23:49:03 +0200
[Message part 1 (text/plain, inline)]
Hi,

Thiago Jung Bauermann <bauermann <at> kolabnow.com> skribis:

> The current GMP version is incompatible with MPFR 2.4 (which was released
> in 2009) and causes the build of ‘mpfr-boot’ to fail.
>
> Fix the problem by using ‘gmp-boot’, which is from early 2010.
>
> * gnu/packages/commencement.scm (mpfr-boot)[propagated-inputs]: Add
> gmp-boot.

Indeed.  However, it turns out that ‘gmp-boot’, ‘mpfr-boot’, and
‘mpc-boot’ are not actually used as dependencies; we only ever use their
source.

I propose to instead make that explicit with the patch below.  WDYT?

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 10b2987a11..dc9b372132 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1733,38 +1733,28 @@ ac_cv_c_float_format='IEEE (little-endian)'
               "gawk" "grep" "guile" "make" "sed" "tar"))))
 
 (define gmp-boot
-  (package
-    (inherit gmp)
-    (version "4.3.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/gmp/gmp-" version
-                                  ".tar.gz"))
-              (sha256 (base32
-                       "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv"))))))
+  (let ((version "4.3.2"))
+    (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnu/gmp/gmp-" version ".tar.gz"))
+      (sha256
+       (base32 "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv")))))
 
 (define mpfr-boot
-  (package
-    (inherit mpfr)
-    (version "2.4.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/mpfr/mpfr-" version
-                                  ".tar.gz"))
-              (sha256 (base32
-                       "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))))
+  (let ((version "2.4.2"))
+    (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnu/mpfr/mpfr-" version ".tar.gz"))
+      (sha256
+       (base32 "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94")))))
 
 (define mpc-boot
-  (package
-    (inherit mpc)
-    (version "1.0.3")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "mirror://gnu/mpc/mpc-" version ".tar.gz"))
-              (sha256
-               (base32
-                "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))))
+  (let ((version "1.0.3"))
+    (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnu/mpc/mpc-" version ".tar.gz"))
+      (sha256
+       (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1")))))
 
 (define gcc-core-mesboot1
   ;; GCC 4.6.4 is the latest modular distribution.  This package is not
@@ -1782,9 +1772,9 @@ ac_cv_c_float_format='IEEE (little-endian)'
               (sha256
                (base32
                 "173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))))
-    (inputs `(("gmp-source" ,(package-source gmp-boot))
-              ("mpfr-source" ,(package-source mpfr-boot))
-              ("mpc-source" ,(package-source mpc-boot))))
+    (inputs `(("gmp-source" ,gmp-boot)
+              ("mpfr-source" ,mpfr-boot)
+              ("mpc-source" ,mpc-boot)))
     (native-inputs (%boot-mesboot1-inputs))
     (arguments
      (list #:implicit-inputs? #f
@@ -1857,14 +1847,17 @@ ac_cv_c_float_format='IEEE (little-endian)'
                                (list gmp mpfr mpc))
 
                      ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
-                     #$@(map (lambda (lib)
+                     #$@(map (lambda (lib package)
                                ;; Drop trailing letters, as gmp-6.0.0a unpacks
                                ;; into gmp-6.0.0.
                                #~(symlink #$(string-trim-right
-                                             (package-full-name lib "-")
+                                             (basename
+                                              (origin-actual-file-name lib)
+                                              ".tar.gz")
                                              char-set:letter)
-                                          #$(package-name lib)))
-                             (list gmp-boot mpfr-boot mpc-boot)))))
+                                          #$package))
+                             (list gmp-boot mpfr-boot mpc-boot)
+                             '("gmp" "mpfr" "mpc")))))
                (add-before 'configure 'setenv
                  (lambda* (#:key outputs #:allow-other-keys)
                    (let* ((out (assoc-ref outputs "out"))

Merged 49880 49881 49882. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 11 Aug 2021 21:51:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#49881; Package guix-patches. (Wed, 11 Aug 2021 21:52:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 49881 <at> debbugs.gnu.org
Subject: Re: bug#49881: [PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency
Date: Wed, 11 Aug 2021 23:51:31 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

> I propose to instead make that explicit with the patch below.  WDYT?

This would also address <https://issues.guix.gnu.org/49880> and
<https://issues.guix.gnu.org/49882> actually.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#49881; Package guix-patches. (Thu, 12 Aug 2021 19:29:02 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 49881 <at> debbugs.gnu.org
Subject: Re: bug#49881: [PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency
Date: Thu, 12 Aug 2021 16:27:59 -0300
Hi,

Em quarta-feira, 11 de agosto de 2021, às 18:49:03 -03, Ludovic Courtès 
escreveu:
> Hi,
> 
> Thiago Jung Bauermann <bauermann <at> kolabnow.com> skribis:
> > The current GMP version is incompatible with MPFR 2.4 (which was
> > released in 2009) and causes the build of ‘mpfr-boot’ to fail.
> > 
> > Fix the problem by using ‘gmp-boot’, which is from early 2010.
> > 
> > * gnu/packages/commencement.scm (mpfr-boot)[propagated-inputs]: Add
> > gmp-boot.
> 
> Indeed.  However, it turns out that ‘gmp-boot’, ‘mpfr-boot’, and
> ‘mpc-boot’ are not actually used as dependencies; we only ever use their
> source.
> 
> I propose to instead make that explicit with the patch below.  WDYT?

I think it’s a great solution! Much simpler than my patches for this issue 
and also 49880 and 49882. Thank you very much for working on it.

I also confirmed that with your patch, ‘gmp-boot’, ‘mpfr-boot’, and ‘mpc-
boot’ “build” correctly on powerpc64le-linux (not that it really matters), 
and they also “build” correctly on i686-linux. The latter system also 
builds ‘gcc-core-mesboot1’ correctly.

Out of curiosity, why did the CI even try to build ‘gmp-boot’, ‘mpfr-boot’, 
and ‘mpc-boot’ on powerpc64le-linux? They’re not public packages, and 
moreover they are only dependencies of ‘gcc-core-mesboot1’ which is only 
relevant on i686-linux…

-- 
Thanks,
Thiago






Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 12 Aug 2021 22:16:01 GMT) Full text and rfc822 format available.

Notification sent to Thiago Jung Bauermann <bauermann <at> kolabnow.com>:
bug acknowledged by developer. (Thu, 12 Aug 2021 22:16:01 GMT) Full text and rfc822 format available.

Message #23 received at 49881-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 49881-done <at> debbugs.gnu.org
Subject: Re: bug#49881: [PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency
Date: Fri, 13 Aug 2021 00:14:46 +0200
Hi,

Thiago Jung Bauermann <bauermann <at> kolabnow.com> skribis:

> Em quarta-feira, 11 de agosto de 2021, às 18:49:03 -03, Ludovic Courtès 
> escreveu:

[...]

>> Indeed.  However, it turns out that ‘gmp-boot’, ‘mpfr-boot’, and
>> ‘mpc-boot’ are not actually used as dependencies; we only ever use their
>> source.
>> 
>> I propose to instead make that explicit with the patch below.  WDYT?
>
> I think it’s a great solution! Much simpler than my patches for this issue 
> and also 49880 and 49882. Thank you very much for working on it.
>
> I also confirmed that with your patch, ‘gmp-boot’, ‘mpfr-boot’, and ‘mpc-
> boot’ “build” correctly on powerpc64le-linux (not that it really matters), 
> and they also “build” correctly on i686-linux. The latter system also 
> builds ‘gcc-core-mesboot1’ correctly.

Awesome, pushed as b417dde293080184dae9098e408849a237903a84.

> Out of curiosity, why did the CI even try to build ‘gmp-boot’, ‘mpfr-boot’, 
> and ‘mpc-boot’ on powerpc64le-linux? They’re not public packages, and 
> moreover they are only dependencies of ‘gcc-core-mesboot1’ which is only 
> relevant on i686-linux…

That comes from commit 37861f6c293d7ed1033050b2b0597885ba65186f.  The
motivation was to ensure that substitutes for these intermediate
packages would be available on the ci.guix front-end node.  Failing to
do that, Cuirass would not attempt fetch them from build nodes on the
front-end node.

Sorry that this caused a false alarm!

Thanks,
Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 12 Aug 2021 22:16:02 GMT) Full text and rfc822 format available.

Notification sent to Thiago Jung Bauermann <bauermann <at> kolabnow.com>:
bug acknowledged by developer. (Thu, 12 Aug 2021 22:16:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 12 Aug 2021 22:16:02 GMT) Full text and rfc822 format available.

Notification sent to Thiago Jung Bauermann <bauermann <at> kolabnow.com>:
bug acknowledged by developer. (Thu, 12 Aug 2021 22:16:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#49881; Package guix-patches. (Sat, 14 Aug 2021 19:47:01 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 49881 <at> debbugs.gnu.org
Subject: Re: bug#49881: [PATCH] gnu: mpfr-boot: Use gmp-boot as a dependency
Date: Sat, 14 Aug 2021 16:46:15 -0300
Hello,

Em quinta-feira, 12 de agosto de 2021, às 19:14:46 -03, Ludovic Courtès 
escreveu:
> Thiago Jung Bauermann <bauermann <at> kolabnow.com> skribis:
> > Em quarta-feira, 11 de agosto de 2021, às 18:49:03 -03, Ludovic Courtès
> > escreveu:
> [...]
> 
> >> Indeed.  However, it turns out that ‘gmp-boot’, ‘mpfr-boot’, and
> >> ‘mpc-boot’ are not actually used as dependencies; we only ever use
> >> their
> >> source.
> >> 
> >> I propose to instead make that explicit with the patch below.  WDYT?
> > 
> > I think it’s a great solution! Much simpler than my patches for this
> > issue and also 49880 and 49882. Thank you very much for working on it.
> > 
> > I also confirmed that with your patch, ‘gmp-boot’, ‘mpfr-boot’, and
> > ‘mpc- boot’ “build” correctly on powerpc64le-linux (not that it really
> > matters), and they also “build” correctly on i686-linux. The latter
> > system also builds ‘gcc-core-mesboot1’ correctly.
> 
> Awesome, pushed as b417dde293080184dae9098e408849a237903a84.

Thank you!

> > Out of curiosity, why did the CI even try to build ‘gmp-boot’,
> > ‘mpfr-boot’, and ‘mpc-boot’ on powerpc64le-linux? They’re not public
> > packages, and moreover they are only dependencies of
> > ‘gcc-core-mesboot1’ which is only relevant on i686-linux…
> 
> That comes from commit 37861f6c293d7ed1033050b2b0597885ba65186f.  The
> motivation was to ensure that substitutes for these intermediate
> packages would be available on the ci.guix front-end node.  Failing to
> do that, Cuirass would not attempt fetch them from build nodes on the
> front-end node.

Thanks for the explanation. It’s nice to learn a bit more about the CI.

> Sorry that this caused a false alarm!

No problem. In hindsight, I should have dug a little deeper. Then I could 
have noticed that these packages aren’t built on their own.

-- 
Thanks,
Thiago






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

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

Previous Next


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