GNU bug report logs - #63735
[PATCH] gnu: libtree: fix building on non-x86 systems.

Previous Next

Package: guix-patches;

Reported by: Z572 <873216071 <at> qq.com>

Date: Fri, 26 May 2023 10:28:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <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 63735 in the body.
You can then email your comments to 63735 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 leo <at> famulari.name, me <at> tobias.gr, guix-patches <at> gnu.org:
bug#63735; Package guix-patches. (Fri, 26 May 2023 10:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Z572 <873216071 <at> qq.com>:
New bug report received and forwarded. Copy sent to leo <at> famulari.name, me <at> tobias.gr, guix-patches <at> gnu.org. (Fri, 26 May 2023 10:28:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: libtree: fix building on non-x86 systems.
Date: Fri, 26 May 2023 18:23:45 +0800
* gnu/packages/linux.scm (libtree): fix building on non-x86 systems.
[source]: add patch.
* gnu/packages/patches/libtree-fix-check-non-x86.patch: New file.
* gnu/local.mk (dist_path_DATA): Register it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/linux.scm                        |  3 ++
 .../patches/libtree-fix-check-non-x86.patch   | 50 +++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 gnu/packages/patches/libtree-fix-check-non-x86.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 18e8235140..7afa14d3fd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1497,6 +1497,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libtommath-fix-linkage.patch		\
   %D%/packages/patches/libtool-grep-compat.patch		\
   %D%/packages/patches/libtool-skip-tests2.patch		\
+  %D%/packages/patches/libtree-fix-check-non-x86.patch		\
   %D%/packages/patches/libusb-0.1-disable-tests.patch		\
   %D%/packages/patches/libusb-for-axoloti.patch			\
   %D%/packages/patches/libutils-add-includes.patch		\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1be505d949..9c3117510b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -73,6 +73,7 @@
 ;;; Copyright © 2022, 2023 Demis Balbach <db <at> minikn.xyz>
 ;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
+;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9854,6 +9855,8 @@ (define-public libtree
              (url "https://github.com/haampie/libtree")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
+       (patches
+        (search-patches "libtree-fix-check-non-x86.patch"))
        (sha256
         (base32 "1jbc60cslzcfxk9jwva51ncr1zl1nz0fkgfjdckgv81is11nswmb"))))
     (arguments
diff --git a/gnu/packages/patches/libtree-fix-check-non-x86.patch b/gnu/packages/patches/libtree-fix-check-non-x86.patch
new file mode 100644
index 0000000000..51f020c5d3
--- /dev/null
+++ b/gnu/packages/patches/libtree-fix-check-non-x86.patch
@@ -0,0 +1,50 @@
+From 061d3ec62707a526a83482e57d202a66f9d776cd Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael <at> iodev.co.uk>
+Date: Tue, 23 Aug 2022 19:34:39 +0200
+Subject: [PATCH] Test the -m32 and -m64 compiler flags before use
+
+Fixes: https://github.com/haampie/libtree/issues/78
+Signed-off-by: Ismael Luceno <ismael <at> iodev.co.uk>
+---
+ tests/05_32_bits/Makefile | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/tests/05_32_bits/Makefile b/tests/05_32_bits/Makefile
+index 2c0bece..5628f42 100644
+--- a/tests/05_32_bits/Makefile
++++ b/tests/05_32_bits/Makefile
+@@ -3,7 +3,7 @@
+ 
+ LD_LIBRARY_PATH=
+ 
+-.PHONY: clean
++.PHONY: clean check
+ 
+ all: check
+ 
+@@ -21,11 +21,21 @@ exe64: lib64/libx.so
+ exe32: lib32/libx.so
+ 	echo 'extern int a(); int _start(){return a();}' | $(CC) -m32 "-Wl,-rpath,$(CURDIR)/lib64" "-Wl,-rpath,$(CURDIR)/lib32" -o $@ -nostdlib -x c - -Llib32 -lx
+ 
+-check: exe32 exe64
+-	../../libtree exe32
+-	../../libtree exe64
+-
+ clean:
+ 	rm -rf lib32 lib64 exe*
+ 
+ CURDIR ?= $(.CURDIR)
++
++test-flag = 2>/dev/null ${CC} -E /dev/null
++test-end = && echo y || echo n
++support-m32 != ${test-flag} -m32 ${test-end}
++support-m64 != ${test-flag} -m64 ${test-end}
++
++check${support-m32:y=}:: exe32
++	../../libtree exe32
++
++check${support-m64:y=}:: exe64
++	../../libtree exe64
++
++check${support-m32:n=} check${support-m64:n=}::
++	@echo WARNING: test skipped at ${CURDIR}

base-commit: 3299b40b3599371890816b52d65a6a5ada1b1131
-- 
2.40.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 14 Jun 2023 21:02:02 GMT) Full text and rfc822 format available.

Notification sent to Z572 <873216071 <at> qq.com>:
bug acknowledged by developer. (Wed, 14 Jun 2023 21:02:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Z572 <873216071 <at> qq.com>
Cc: 63735-done <at> debbugs.gnu.org, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#63735: [PATCH] gnu: libtree: fix building on non-x86 systems.
Date: Wed, 14 Jun 2023 23:01:03 +0200
Hi,

Z572 <873216071 <at> qq.com> skribis:

> * gnu/packages/linux.scm (libtree): fix building on non-x86 systems.
> [source]: add patch.
> * gnu/packages/patches/libtree-fix-check-non-x86.patch: New file.
> * gnu/local.mk (dist_path_DATA): Register it.

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Jul 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 287 days ago.

Previous Next


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