Message ID | 975888973eb4debf457d394fc3669a36168566ac.1629193993.git.efraim@flashner.co.il |
---|---|
State | New |
Headers | show |
Series | Add riscv64 support | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Hello Efraim, Em terça-feira, 17 de agosto de 2021, às 07:19:05 -03, Efraim Flashner escreveu: > * gnu/packages/dbm.scm (bdb)[arguments]: Modify configure to build for > the currect architecture when building for riscv64-linux. > --- > gnu/packages/dbm.scm | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) > > diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm > index ce84ef9eda..c2bdaf782a 100644 > --- a/gnu/packages/dbm.scm > +++ b/gnu/packages/dbm.scm > @@ -1,7 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright © 2012, 2013, 2014, 2016, 2020 Ludovic Courtès > <ludo@gnu.org> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> > -;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner > <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018, 2020, 2021 > Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 > Marius Bakke <mbakke@fastmail.com> > ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> > ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> > @@ -28,7 +28,8 @@ > #:use-module (guix packages) > #:use-module (guix download) > #:use-module (guix build-system gnu) > - #:use-module (guix utils)) > + #:use-module (guix utils) > + #:use-module (ice-9 match)) > > ;;; Commentary: > ;;; > @@ -72,15 +73,15 @@ > (string-append "CONFIG_SHELL=" (which "bash")) > (string-append "SHELL=" (which "bash")) > > - ;; Bdb doesn't recognize aarch64 as an > architecture. - ,@(if (string=? "aarch64-linux" > (%current-system)) - > '("--build=aarch64-unknown-linux-gnu") - > '()) > - > - ;; Bdb doesn't recognize powerpc64le as an > architecture. - ,@(if (string=? > "powerpc64le-linux" (%current-system)) - > '("--build=powerpc64le-unknown-linux-gnu") - > '()) > + ;; Bdb doesn't recognize very many architectures. > + ,@(match (%current-system) > + ("aarch64-linux" > + '("--build=aarch64-unknown-linux-gnu")) > + ("powerpc64le-linux" > + '("--build=powerpc64le-unknown-linux-gnu")) > + ("riscv64-linux" > + '("--build=riscv64-unknown-linux-gnu")) > + (_ '())) > > ,@(if (%current-target-system) ; cross > building '((string-append "--host=" target)) Can this be fixed instead by updating ‘config.guess’ and ‘config.sub’ as done in https://issues.guix.gnu.org/50086#1 ? That could possibly even fix cross-building (as it does for ‘pth’) and eliminate the need for all the “,@” forms in the ‘configure’ phase.
On Tue, Aug 17, 2021 at 11:58:44AM -0300, Thiago Jung Bauermann wrote: > Hello Efraim, > > Em terça-feira, 17 de agosto de 2021, às 07:19:05 -03, Efraim Flashner > escreveu: > > * gnu/packages/dbm.scm (bdb)[arguments]: Modify configure to build for > > the currect architecture when building for riscv64-linux. > > --- > > gnu/packages/dbm.scm | 23 ++++++++++++----------- > > 1 file changed, 12 insertions(+), 11 deletions(-) > > > > diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm > > index ce84ef9eda..c2bdaf782a 100644 > > --- a/gnu/packages/dbm.scm > > +++ b/gnu/packages/dbm.scm > > @@ -1,7 +1,7 @@ > > ;;; GNU Guix --- Functional package management for GNU > > ;;; Copyright © 2012, 2013, 2014, 2016, 2020 Ludovic Courtès > > <ludo@gnu.org> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> > > -;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner > > <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018, 2020, 2021 > > Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 > > Marius Bakke <mbakke@fastmail.com> > > ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> > > ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> > > @@ -28,7 +28,8 @@ > > #:use-module (guix packages) > > #:use-module (guix download) > > #:use-module (guix build-system gnu) > > - #:use-module (guix utils)) > > + #:use-module (guix utils) > > + #:use-module (ice-9 match)) > > > > ;;; Commentary: > > ;;; > > @@ -72,15 +73,15 @@ > > (string-append "CONFIG_SHELL=" (which "bash")) > > (string-append "SHELL=" (which "bash")) > > > > - ;; Bdb doesn't recognize aarch64 as an > > architecture. - ,@(if (string=? "aarch64-linux" > > (%current-system)) - > > '("--build=aarch64-unknown-linux-gnu") - > > '()) > > - > > - ;; Bdb doesn't recognize powerpc64le as an > > architecture. - ,@(if (string=? > > "powerpc64le-linux" (%current-system)) - > > '("--build=powerpc64le-unknown-linux-gnu") - > > '()) > > + ;; Bdb doesn't recognize very many architectures. > > + ,@(match (%current-system) > > + ("aarch64-linux" > > + '("--build=aarch64-unknown-linux-gnu")) > > + ("powerpc64le-linux" > > + '("--build=powerpc64le-unknown-linux-gnu")) > > + ("riscv64-linux" > > + '("--build=riscv64-unknown-linux-gnu")) > > + (_ '())) > > > > ,@(if (%current-target-system) ; cross > > building '((string-append "--host=" target)) > > Can this be fixed instead by updating ‘config.guess’ and ‘config.sub’ as > done in https://issues.guix.gnu.org/50086#1 ? > > That could possibly even fix cross-building (as it does for ‘pth’) and > eliminate the need for all the “,@” forms in the ‘configure’ phase. > Sorry for taking so long to get back to you. I finally tried this but there seems to be a cycle somewhere between bdb and config, so using config and dropping the custom --build flag isn't currently an option.
Hello Efraim, Em quinta-feira, 23 de setembro de 2021, às 04:28:33 -03, Efraim Flashner escreveu: > On Tue, Aug 17, 2021 at 11:58:44AM -0300, Thiago Jung Bauermann wrote: > > Hello Efraim, > > > > Em terça-feira, 17 de agosto de 2021, às 07:19:05 -03, Efraim Flashner > > > > escreveu: > > > @@ -72,15 +73,15 @@ > > > > > > (string-append "CONFIG_SHELL=" (which > > > "bash")) > > > (string-append "SHELL=" (which "bash")) > > > > > > - ;; Bdb doesn't recognize aarch64 as an > > > architecture. - ,@(if (string=? "aarch64-linux" > > > (%current-system)) - > > > '("--build=aarch64-unknown-linux-gnu") - > > > '()) > > > - > > > - ;; Bdb doesn't recognize powerpc64le as an > > > architecture. - ,@(if (string=? > > > "powerpc64le-linux" (%current-system)) - > > > '("--build=powerpc64le-unknown-linux-gnu") - > > > '()) > > > + ;; Bdb doesn't recognize very many > > > architectures. + ,@(match (%current-system) > > > + ("aarch64-linux" > > > + '("--build=aarch64-unknown-linux-gnu")) > > > + ("powerpc64le-linux" > > > + > > > '("--build=powerpc64le-unknown-linux-gnu")) > > > + ("riscv64-linux" > > > + '("--build=riscv64-unknown-linux-gnu")) > > > + (_ '())) > > > > > > ,@(if (%current-target-system) ; > > > cross > > > > > > building '((string-append "--host=" target)) > > > > Can this be fixed instead by updating ‘config.guess’ and ‘config.sub’ > > as > > done in https://issues.guix.gnu.org/50086#1 ? > > > > That could possibly even fix cross-building (as it does for ‘pth’) and > > eliminate the need for all the “,@” forms in the ‘configure’ phase. > > Sorry for taking so long to get back to you. Not a problem. > I finally tried this but there seems to be a cycle somewhere between bdb > and config, so using config and dropping the custom --build flag isn't > currently an option. Thanks for trying it out. Interestingly, `guix graph --path` can’t find it, even with `-t bag`. If you’d like to make a second try, some packages get the updated ‘config.guess’ and ‘config.sub’ files from ‘automake’ instead (e.g., the ‘indent’ package). I don’t know if there would be a cycle in that case as well or not.
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index ce84ef9eda..c2bdaf782a 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2016, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> @@ -28,7 +28,8 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (guix utils)) + #:use-module (guix utils) + #:use-module (ice-9 match)) ;;; Commentary: ;;; @@ -72,15 +73,15 @@ (string-append "CONFIG_SHELL=" (which "bash")) (string-append "SHELL=" (which "bash")) - ;; Bdb doesn't recognize aarch64 as an architecture. - ,@(if (string=? "aarch64-linux" (%current-system)) - '("--build=aarch64-unknown-linux-gnu") - '()) - - ;; Bdb doesn't recognize powerpc64le as an architecture. - ,@(if (string=? "powerpc64le-linux" (%current-system)) - '("--build=powerpc64le-unknown-linux-gnu") - '()) + ;; Bdb doesn't recognize very many architectures. + ,@(match (%current-system) + ("aarch64-linux" + '("--build=aarch64-unknown-linux-gnu")) + ("powerpc64le-linux" + '("--build=powerpc64le-unknown-linux-gnu")) + ("riscv64-linux" + '("--build=riscv64-unknown-linux-gnu")) + (_ '())) ,@(if (%current-target-system) ; cross building '((string-append "--host=" target))