GNU bug report logs - #55021
parted 3.5 Build failure with --disable-nls on s390x alpine linux (musl libc)

Previous Next

Package: parted;

Reported by: Natanael Copa <ncopa <at> alpinelinux.org>

Date: Tue, 19 Apr 2022 11:01:02 UTC

Severity: normal

To reply to this bug, email your comments to 55021 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#55021; Package parted. (Tue, 19 Apr 2022 11:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Natanael Copa <ncopa <at> alpinelinux.org>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Tue, 19 Apr 2022 11:01:02 GMT) Full text and rfc822 format available.

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

From: Natanael Copa <ncopa <at> alpinelinux.org>
To: bug-parted <at> gnu.org
Subject: parted 3.5 Build failure with --disable-nls on s390x alpine linux
 (musl libc)
Date: Tue, 19 Apr 2022 13:00:51 +0200
Hi,

I'd like to upstream a patch that we have had in Alpine Linux for a while.

parted 3.5 fails to build on s390x with the following error:

make[4]: Entering directory '/home/ncopa/aports/main/parted/src/parted-3.5/libparted/labels'
  CC       dasd.lo
  CC       fdasd.lo
  CC       vtoc.lo
  CC       aix.lo
  CC       atari.lo
  CC       bsd.lo
  CC       dos.lo
dasd.c:44:10: fatal error: libintl.h: No such file or directory
   44 | #include <libintl.h>
      |          ^~~~~~~~~~~
compilation terminated.
fdasd.c:27:10: fatal error: libintl.h: No such file or directory
   27 | #include <libintl.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:1691: dasd.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile:1691: fdasd.lo] Error 1
vtoc.c:15:10: fatal error: libintl.h: No such file or directory
   15 | #include <libintl.h>
      |          ^~~~~~~~~~~
compilation terminated.

This is what we have used to solve it:

From 4b2a566a3e007184d3ee9ce5b399a63eebbdadc3 Mon Sep 17 00:00:00 2001
From: "Tuan M. Hoang" <tmhoang <at> flatglobe.org>
Date: Thu, 23 Feb 2017 07:53:02 +0000
Subject: [PATCH] main/parted: disable nls on s390x

Because we build with --disable-nls by default, we need to remove libintl.h in 
these files on s390x. This is specific for DASD devices only on s390x.
---
 libparted/labels/dasd.c  | 2 +-
 libparted/labels/fdasd.c | 2 +-
 libparted/labels/vtoc.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index fa9414f..5acf844 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/labels/dasd.c
@@ -40,8 +40,8 @@
 #include <parted/fdasd.h>
 #include <arch/linux.h>
 
-#include <libintl.h>
 #if ENABLE_NLS
+#  include <libintl.h>
 #  define _(String) dgettext (PACKAGE, String)
 #else
 #  define _(String) (String)
diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
index 1f87937..e6a9086 100644
--- a/libparted/labels/fdasd.c
+++ b/libparted/labels/fdasd.c
@@ -24,8 +24,8 @@
 
 #include <parted/parted.h>
 
-#include <libintl.h>
 #if ENABLE_NLS
+#  include <libintl.h>
 #  define _(String) dgettext (PACKAGE, String)
 #else
 #  define _(String) (String)
diff --git a/libparted/labels/vtoc.c b/libparted/labels/vtoc.c
index fdfa94f..64ba149 100644
--- a/libparted/labels/vtoc.c
+++ b/libparted/labels/vtoc.c
@@ -12,8 +12,8 @@
 
 #include <parted/parted.h>
 
-#include <libintl.h>
 #if ENABLE_NLS
+#  include <libintl.h>
 #  define _(String) dgettext (PACKAGE, String)
 #else
 #  define _(String) (String)
-- 
2.11.1





This bug report was last modified 2 years and 222 days ago.

Previous Next


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