NetBSD Problem Report #40716

From hauke@Espresso.Rhein-Neckar.DE  Sun Feb 22 20:47:54 2009
Return-Path: <hauke@Espresso.Rhein-Neckar.DE>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7774263B8C3
	for <gnats-bugs@gnats.netbsd.org>; Sun, 22 Feb 2009 20:47:54 +0000 (UTC)
Message-Id: <200902222020.n1MKKl310666@mara.causeuse.org>
Date: Sun, 22 Feb 2009 21:20:48 +0100 (CET)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Reply-To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@gnats.netbsd.org
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: gettext-lib breaks gtar on older NetBSD versions
X-Send-Pr-Version: 3.95

>Number:         40716
>Category:       pkg
>Synopsis:       gettext-lib breaks gtar on older NetBSD versions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    joerg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 22 20:50:00 +0000 2009
>Closed-Date:    Sun Sep 01 06:45:57 +0000 2013
>Last-Modified:  Sun Sep 01 06:45:57 +0000 2013
>Originator:     Hauke Fath
>Release:        NetBSD 1.5.4_ALPHA
>Organization:
Falling Raindrops
>Environment:


System: NetBSD mara 1.5.4_ALPHA (MARA-$Revision: 1.1 $) #0: Wed Jul 9 11:37:12 CEST 2008 hauke@mara:/local/cvswork/netbsd/netbsd-1-5/src/sys/arch/mac68k/compile/MARA mac68k
Architecture: m68k
Machine: mac68k
>Description:

	As reported in 
	<http://mail-index.netbsd.org/pkgsrc-users/2006/06/22/msg001977.html>, 
	on a NetBSD 1.5 system, building archivers/gtar-base fails with 

[...]
Making all in lib
/usr/bin/make-5_99_3  all-am
source='argp-help.c' object='argp-help.o' libtool=no  DEPDIR=.deps depmode=gcc /bin/sh ../build-aux/depcomp  cc -DHAVE_CONFIG_H -I. -I..    -I/usr/pkg/include  -O2 -pipe -I/usr/pkg/include -c -o argp-help.o argp-help.c
In file included from argp-help.c:50:
argp-fmtstream.h:132: `libintl_printf' is an unrecognized format function type
argp-fmtstream.h:135: `libintl_printf' is an unrecognized format function type
argp-help.c:579: warning: `always_inline' attribute directive ignored
*** Error code 1

Stop.
make-5_99_3: stopped in /var/obj/pkgsrc/archivers/gtar-base/work/tar-1.20/lib
*** Error code 1

	Looking around, I found the problem is related to a GNU gettext issue 
	reported against NetBSD 3 in 
	<http://groups.google.com/group/gnu.utils.bug/browse_thread/thread/ce43685b506fec17?hl=en&q=libintl_printf+is+an+unrecognized+format+function+type+group:gnu.utils.bug#19126020bd1b3aea>.

	The thread resulted in a patch
	<http://groups.google.com/group/gnu.utils.bug/msg/19126020bd1b3aea> which
	apparently was not pulled up to the 0.14.6 release branch installed 
	by pkgsrc.

>How-To-Repeat:

	On a NetBSD 1.5 system (probably any version before integration of gettext) 
	install gtar-base. Watch the build fail with the above error.

>Fix:
	Long term solution: Upgrade gettext packages.

	Short term solution: Add the patch

$NetBSD$

--- intl/libgnuintl.h.in.orig	2005-05-20 23:03:38.000000000 +0200
+++ intl/libgnuintl.h.in
@@ -300,6 +300,13 @@ extern int fprintf (FILE *, const char *
 extern int vfprintf (FILE *, const char *, va_list);

 #undef printf
+/* NetBSD fix pulled up from gettext 0.17 */
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
+/* Don't break __attribute__((format(printf,M,N))).
+   This redefinition is only possible because the libc in NetBSD, Cygwin,
+   mingw does not have a function __printf__.  */
+# define libintl_printf __printf__
+#endif
 #define printf libintl_printf
 extern int printf (const char *, ...);
 #undef vprintf

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 23 Feb 2009 08:40:49 +0000
Responsible-Changed-Why:
Over to maintainer.
Please note that 1.5 is definitely unsupported though.


State-Changed-From-To: open->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Sun, 01 Sep 2013 06:45:57 +0000
State-Changed-Why:
gettext was updated to 0.18, so it contains the fix.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.