[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors.
From: |
Maxime Devos |
Subject: |
[bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors. |
Date: |
Wed, 25 Aug 2021 20:02:58 +0200 |
* gnu/packages/dbm.scm
(bdb-4.8)[arguments]<#:phases>{update-config.sub}: Update 'config.sub'
when cross-compiling for 'powerpc64le' or 'aarch64'.
---
gnu/packages/dbm.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index ce84ef9eda..607e4aecf8 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
(define-module (gnu packages dbm)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -57,6 +59,19 @@
#:disallowed-references ("doc")
#:phases
(modify-phases %standard-phases
+ ;; The configure script is too old to recognise aarch64 and
+ ;; powerpc64le as valid architectures. The trick below works
+ ;; for "--build", but not for "--host", so update config.sub.
+ ,@(if (and (%current-target-system)
+ (or (target-ppc64le? (%current-target-system))
+ (target-aarch64? (%current-target-system))))
+ `((add-after 'unpack 'update-config.sub
+ (lambda* (#:key native-inputs #:allow-other-keys)
+ (delete-file "dist/config.sub")
+ (symlink
+ (search-input-file native-inputs "/bin/config.sub")
+ "dist/config.sub"))))
+ '())
(replace 'configure
(lambda* (#:key target outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -97,6 +112,12 @@
;; of db_cxx.h into C++ files works; it leads to
;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
"--enable-cxx")))))))
+ (native-inputs
+ (if (and (%current-target-system)
+ (or (target-ppc64le? (%current-target-system))
+ (target-aarch64? (%current-target-system))))
+ `(("config" ,config)) ; for config.sub
+ '()))
(synopsis "Berkeley database")
(description
"Berkeley DB is an embeddable database allowing developers the choice of
--
2.33.0
- [bug#50201] [PATCH 20/52] gnu: gamin: Recognise aarch64 as architecture when cross-compiling., (continued)
- [bug#50201] [PATCH 14/52] gnu: gobject-introspection: Don't build introspection data when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 19/52] gnu: graphene: Don't build introspection data when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 23/52] gnu: heimdal: Fix inputs when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 05/52] gnu: perl: Find 'bash' when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 13/52] gnu: polkit: Prevent cross-compilation build error., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors.,
Maxime Devos <=
- [bug#50201] [PATCH 25/52] gnu: heimdal: Refer to cross-compiled bash., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 16/52] gobject-introspection: Correct library name when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 11/52] build-system/glib-or-gtk: Support cross-compilaton., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 15/52] gobject-introspection: Fix inputs when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 21/52] gnu: gamin: Fix 'configure' script when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 24/52] gnu: heimdal: Fix linking error when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 28/52] gnu: heimdal: Use libcom_err from input when cross-compiling., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 26/52] gnu: heimdal: Use the cross-compiled bash in "su"., Maxime Devos, 2021/08/25
- [bug#50201] [PATCH 27/52] gnu: heimdal: Find tools when cross-compiling., Maxime Devos, 2021/08/25