GNU bug report logs - #50086
[PATCH 0/2] Update config.guess and config.sub for powerpc64le

Previous Next

Package: guix-patches;

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

Date: Tue, 17 Aug 2021 04:51:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <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 50086 in the body.
You can then email your comments to 50086 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#50086; Package guix-patches. (Tue, 17 Aug 2021 04:51:02 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. (Tue, 17 Aug 2021 04:51:02 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 0/2] Update config.guess and config.sub for powerpc64le
Date: Tue, 17 Aug 2021 01:50:03 -0300
Hello,

These two packages have very old configure scripts, and therefore don’t
know about newer architectures such as aarch64, mips64el and
powerpc64le. For the former two architectures, the packages have been
changed to explicitly set the host system to work around this problem.

A more complete solution – which works for all architectures and
should in principle also allow cross-compiling – is to simply update
the ‘config.guess’ and ‘config.sub’ scripts from their canonical
source: the ‘config’ package.

I was able to verify that with these changes, the package builds on
powerpc64le-linux but I wasn’t able to test aarch64-linux nor
mips64el-linux.

Thanks,
Thiago

Thiago Jung Bauermann (2):
  gnu: pth: Update ‘config.guess’ and ‘config.sub’
  gnu: aalib: Update ‘config.guess’ and ‘config.sub’

 gnu/packages/pth.scm   | 21 +++++++++++++++------
 gnu/packages/video.scm | 23 +++++++++++------------
 2 files changed, 26 insertions(+), 18 deletions(-)





Information forwarded to guix-patches <at> gnu.org:
bug#50086; Package guix-patches. (Tue, 17 Aug 2021 04:57:02 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: 50086 <at> debbugs.gnu.org
Cc: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: [PATCH 1/2] gnu: pth: Update ‘config.guess’ and ‘config.sub’
Date: Tue, 17 Aug 2021 01:55:52 -0300
The original versions are too old to recognize architectures such as
aarch64 and powerpc64le.

* gnu/packages/pth.scm (pth)[arguments]: Change from quasiquote to quote.
[#:phases]{update-config-scripts}: New.
[native-inputs]: Add ‘config’.
---

Hi,

As mentioned in the cover letter, this fixes the build for
powerpc64le-linux. I believe it will also work for aarch64-linux but
I wasn’t able to test on that platform.

Thanks,
Thiago

 gnu/packages/pth.scm | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/pth.scm b/gnu/packages/pth.scm
index 1908ce776333..9f3dda5ae175 100644
--- a/gnu/packages/pth.scm
+++ b/gnu/packages/pth.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2015 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw <at> netris.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages pth)
+  #:use-module (gnu packages autotools)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -38,12 +40,19 @@
         "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:parallel-build? #f
-       #:configure-flags (list 
-                           ,@(if (string=? "aarch64-linux"
-                                           (%current-system))
-                               '("--host=aarch64-unknown-linux-gnu")
-                               '()))))
+     '(#:parallel-build? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'update-config-scripts
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Replace outdated config.guess and config.sub.
+             (for-each (lambda (file)
+                         (install-file
+                          (search-input-file (or native-inputs inputs)
+                                             (string-append "/bin/" file)) "."))
+                       '("config.guess" "config.sub")))))))
+    (native-inputs
+     (list config))
     (home-page "https://www.gnu.org/software/pth/")
     (synopsis "Portable thread library")
     (description




Information forwarded to guix-patches <at> gnu.org:
bug#50086; Package guix-patches. (Tue, 17 Aug 2021 04:57:02 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: 50086 <at> debbugs.gnu.org
Cc: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: [PATCH 2/2] gnu: aalib: Update ‘config.guess’ and ‘config.sub’
Date: Tue, 17 Aug 2021 01:55:53 -0300
The original versions are too old to recognize architectures such as
aarch64, mips64el and powerpc64le.

* gnu/packages/video.scm (aalib)[native-inputs]: Add ‘config’.
[arguments]<#:phases>{update-configure-scripts}: New.
{configure}: Don’t set host explicitly.
---

Hi,

As mentioned in the cover letter, this fixes the build for
powerpc64le-linux. I believe it will also work for aarch64-linux and
mips64el-linux but I wasn’t able to test on those platforms.

Thanks,
Thiago

 gnu/packages/video.scm | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index ac6fc14b1f58..2c79daf8845f 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -53,6 +53,7 @@
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2020 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
 ;;; Copyright © 2021 Raghav Gururajan <rg <at> raghavgururajan.name>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -676,12 +677,21 @@ stream decoding")
                 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("makeinfo" ,texinfo)))
+     `(("config" ,config)
+       ("makeinfo" ,texinfo)))
     (inputs
      `(("ncurses" ,ncurses)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'update-config-scripts
+           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+             ;; Replace outdated config.guess and config.sub.
+             (for-each (lambda (file)
+                         (install-file
+                          (search-input-file (or native-inputs inputs)
+                                             (string-append "/bin/" file)) "."))
+                       '("config.guess" "config.sub"))))
          (replace 'configure
                   (lambda* (#:key build inputs outputs #:allow-other-keys)
                     ;; This old `configure' script doesn't support
@@ -692,17 +702,6 @@ stream decoding")
                       (invoke "./configure"
                               (string-append "--prefix=" out)
                               (string-append "--build=" build)
-                              ;; The ancient config.guess is unable to
-                              ;; guess the host triplet on mips64el.
-                              ,@(if (string=? "mips64el-linux"
-                                              (%current-system))
-                                    '("--host=mips64el-unknown-linux-gnu")
-                                    '())
-                              ;; The same is also true with aarch64.
-                              ,@(if (string=? "aarch64-linux"
-                                              (%current-system))
-                                    '("--host=aarch64-unknown-linux-gnu")
-                                    '())
                               (string-append "--with-ncurses="
                                              ncurses))))))))
     (home-page "http://aa-project.sourceforge.net/aalib/")




Information forwarded to guix-patches <at> gnu.org:
bug#50086; Package guix-patches. (Tue, 17 Aug 2021 14:28:01 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: 50086 <at> debbugs.gnu.org
Subject: Re: [PATCH 1/2] gnu: pth: Update
 ‘config.guess’ and ‘config.sub’
Date: Tue, 17 Aug 2021 11:26:47 -0300
Hello,

I forgot to mention that this patch series is for core-updates-frozen.

Also in the meantime I was able to confirm that with this patch it’s 
possible to cross-compile ‘pth’ for aarch64-linux, which is nice.

Em terça-feira, 17 de agosto de 2021, às 01:55:52 -03, Thiago Jung 
Bauermann escreveu:
> The original versions are too old to recognize architectures such as
> aarch64 and powerpc64le.
> 
> * gnu/packages/pth.scm (pth)[arguments]: Change from quasiquote to quote.

Finally, the changelog is missing a line here:

[#:configure-flags]: Remove.

> [#:phases]{update-config-scripts}: New.
> [native-inputs]: Add ‘config’.

-- 
Thanks,
Thiago






Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Thu, 19 Aug 2021 15:05:02 GMT) Full text and rfc822 format available.

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

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 50086-done <at> debbugs.gnu.org
Subject: Re: bug#50086: [PATCH 0/2] Update config.guess and config.sub for
 powerpc64le
Date: Thu, 19 Aug 2021 17:04:50 +0200
Hello Thiago,

> These two packages have very old configure scripts, and therefore don’t
> know about newer architectures such as aarch64, mips64el and
> powerpc64le. For the former two architectures, the packages have been
> changed to explicitly set the host system to work around this problem.

Looks nice, I pushed the patchset on core-update-frozen.

Thanks,

Mathieu




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

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 50086 <at> debbugs.gnu.org
Subject: Re: bug#50086: [PATCH 0/2] Update config.guess and config.sub for
 powerpc64le
Date: Thu, 19 Aug 2021 19:15:56 -0300
Hello Mathieu,

Em quinta-feira, 19 de agosto de 2021, às 12:04:50 -03, Mathieu Othacehe 
escreveu:
> Hello Thiago,
> 
> > These two packages have very old configure scripts, and therefore don’t
> > know about newer architectures such as aarch64, mips64el and
> > powerpc64le. For the former two architectures, the packages have been
> > changed to explicitly set the host system to work around this problem.
> 
> Looks nice, I pushed the patchset on core-update-frozen.

Thank you!

-- 
Thanks,
Thiago






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

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

Previous Next


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