* [bug#31802] [PATCH] gnu: ldb: Fix build on 32-bit systems.
@ 2018-06-12 17:55 Marius Bakke
2018-06-14 20:31 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2018-06-12 17:55 UTC (permalink / raw)
To: 31802
* guix/utils.scm (target-64bit?): New procedure.
* gnu/packages/samba.scm (ldb)[inputs]: Only add LMDB on 64-bit systems.
[arguments]: Make #:tests? conditional on LMDB availability.
---
gnu/packages/samba.scm | 9 +++++++--
guix/utils.scm | 5 +++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index abbfdd83c..e10f00a83 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -362,7 +362,10 @@ many event types, including timers, signals, and the classic file descriptor eve
#t))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ '(;; LMDB is only supported on 64-bit systems, yet the test suite
+ ;; requires it.
+ #:tests? (assoc-ref %build-inputs "lmdb")
+ #:phases
(modify-phases %standard-phases
(replace 'configure
;; ldb use a custom configuration script that runs waf.
@@ -382,7 +385,9 @@ many event types, including timers, signals, and the classic file descriptor eve
`(("talloc" ,talloc)
("tdb" ,tdb)))
(inputs
- `(("lmdb" ,lmdb)
+ `(,@(if (target-64bit?)
+ `(("lmdb" ,lmdb))
+ '())
("popt" ,popt)
("tevent" ,tevent)))
(synopsis "LDAP-like embedded database")
diff --git a/guix/utils.scm b/guix/utils.scm
index e9efea586..81aee0bf8 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -77,6 +77,7 @@
package-name->name+version
target-mingw?
target-arm32?
+ target-64bit?
version-compare
version>?
version>=?
@@ -474,6 +475,10 @@ a character other than '@'."
(define (target-arm32?)
(string-prefix? "arm" (or (%current-target-system) (%current-system))))
+(define (target-64bit?)
+ (let ((system (or (%current-target-system) (%current-system))))
+ (any (cut string-prefix? <> system) '("x86_64" "aarch64" "ppc64"))))
+
(define version-compare
(let ((strverscmp
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#31802] [PATCH] gnu: ldb: Fix build on 32-bit systems.
2018-06-12 17:55 [bug#31802] [PATCH] gnu: ldb: Fix build on 32-bit systems Marius Bakke
@ 2018-06-14 20:31 ` Ludovic Courtès
2018-06-16 19:39 ` Marius Bakke
2018-06-16 19:39 ` Marius Bakke
0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-06-14 20:31 UTC (permalink / raw)
To: Marius Bakke; +Cc: 31802
Marius Bakke <mbakke@fastmail.com> skribis:
> * guix/utils.scm (target-64bit?): New procedure.
> * gnu/packages/samba.scm (ldb)[inputs]: Only add LMDB on 64-bit systems.
> [arguments]: Make #:tests? conditional on LMDB availability.
LGTM, thanks!
Ludo'.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#31802] [PATCH] gnu: ldb: Fix build on 32-bit systems.
2018-06-14 20:31 ` Ludovic Courtès
@ 2018-06-16 19:39 ` Marius Bakke
2018-06-16 19:39 ` Marius Bakke
1 sibling, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2018-06-16 19:39 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 31802
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
ludo@gnu.org (Ludovic Courtès) writes:
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> * guix/utils.scm (target-64bit?): New procedure.
>> * gnu/packages/samba.scm (ldb)[inputs]: Only add LMDB on 64-bit systems.
>> [arguments]: Make #:tests? conditional on LMDB availability.
>
> LGTM, thanks!
Great, thanks for checking. Pushed!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#31802] [PATCH] gnu: ldb: Fix build on 32-bit systems.
2018-06-14 20:31 ` Ludovic Courtès
2018-06-16 19:39 ` Marius Bakke
@ 2018-06-16 19:39 ` Marius Bakke
1 sibling, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2018-06-16 19:39 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 31802
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
ludo@gnu.org (Ludovic Courtès) writes:
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> * guix/utils.scm (target-64bit?): New procedure.
>> * gnu/packages/samba.scm (ldb)[inputs]: Only add LMDB on 64-bit systems.
>> [arguments]: Make #:tests? conditional on LMDB availability.
>
> LGTM, thanks!
I also added mips64 as suggested by Efraim on IRC.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-16 19:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-12 17:55 [bug#31802] [PATCH] gnu: ldb: Fix build on 32-bit systems Marius Bakke
2018-06-14 20:31 ` Ludovic Courtès
2018-06-16 19:39 ` Marius Bakke
2018-06-16 19:39 ` Marius Bakke
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).