[PATCH 0/2] Update config.guess and config.sub for powerpc64le

  • Done
  • quality assurance status badge
Details
2 participants
  • Thiago Jung Bauermann
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Thiago Jung Bauermann
Severity
normal
T
T
Thiago Jung Bauermann wrote on 17 Aug 2021 06:50
(address . guix-patches@gnu.org)(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)
20210817045003.11592-1-bauermann@kolabnow.com
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(-)
T
T
Thiago Jung Bauermann wrote on 17 Aug 2021 06:55
[PATCH 1/2] gnu: pth: Update ‘config.gues s’ and ‘config.sub’
(address . 50086@debbugs.gnu.org)(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)
20210817045553.11746-1-bauermann@kolabnow.com
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(-)

Toggle diff (46 lines)
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@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@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
T
T
Thiago Jung Bauermann wrote on 17 Aug 2021 06:55
[PATCH 2/2] gnu: aalib: Update ‘config.gu ess’ and ‘config.sub’
(address . 50086@debbugs.gnu.org)(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)
20210817045553.11746-2-bauermann@kolabnow.com
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(-)

Toggle diff (53 lines)
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@gmail.com>
;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@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/")
T
T
Thiago Jung Bauermann wrote on 17 Aug 2021 16:26
Re: [PATCH 1/2] gnu: pth: Update ‘config.guess’ and ‘config.sub’
(address . 50086@debbugs.gnu.org)
2826053.KW6u5B8PcX@popigai
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:
Toggle quote (5 lines)
> 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.

Toggle quote (3 lines)
> [#:phases]{update-config-scripts}: New.
> [native-inputs]: Add ‘config’.

--
Thanks,
Thiago
M
M
Mathieu Othacehe wrote on 19 Aug 2021 17:04
Re: bug#50086: [PATCH 0/2] Update config.guess and config.sub for powerpc64le
(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)(address . 50086-done@debbugs.gnu.org)
871r6pear1.fsf@gnu.org
Hello Thiago,

Toggle quote (5 lines)
> 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
Closed
T
T
Thiago Jung Bauermann wrote on 20 Aug 2021 00:15
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 50086@debbugs.gnu.org)
1820218.rTE8yDn85b@popigai
Hello Mathieu,

Em quinta-feira, 19 de agosto de 2021, às 12:04:50 -03, Mathieu Othacehe
escreveu:
Toggle quote (9 lines)
> 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
?
Your comment

This issue is archived.

To comment on this conversation send an email to 50086@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 50086
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch