NetBSD Problem Report #29205
From www@netbsd.org Wed Feb 2 23:02:51 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id 097FC63B400; Wed, 2 Feb 2005 23:02:51 +0000 (UTC)
Message-Id: <20050202230251.097FC63B400@narn.netbsd.org>
Date: Wed, 2 Feb 2005 23:02:51 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@netbsd.org
Subject: converters/antiword build fails on MacOS X 10.[12].x
X-Send-Pr-Version: www-1.0
>Number: 29205
>Category: pkg
>Synopsis: converters/antiword build fails on MacOS X 10.[12].x
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: darwin-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 02 23:03:01 +0000 2005
>Closed-Date: Mon Mar 07 18:31:45 +0000 2005
>Last-Modified: Thu Mar 17 16:12:26 +0000 2005
>Originator: John D. Baker
>Release: MacOS X 10.2.8
>Organization:
>Environment:
Darwin pm8500.technoskunk.fur 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc
>Description:
building converters/antiword on MacOS X 10.[12].x fails as follows:
===> Building for antiword-0.36.1
gcc -pipe -O2 -DNDEBUG -no-cpp-precomp -c main_u.c
main_u.c: In function `main':
main_u.c:264: error: `LC_CTYPE' undeclared (first use in this function)
main_u.c:264: error: (Each undeclared identifier is reported only once
main_u.c:264: error: for each function it appears in.)
*** Error code 1
Stop.
bmake: stopped in /Volumes/NetBSD/tmp/pkgsrc/textproc/antiword/work/antiword-0.36.1
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/textproc/antiword
>How-To-Repeat:
bootstrap pkgsrc on MacOS X 10.[12].x
cd .../pkgsrc/converters/antiword
bmake
>Fix:
Like pkg/28501, inclusion of <locale.h> is guarded by a conditional
macro in the affected file "main_u.c".
Ideally, the conditional should have the predefined target OS
identifier added (as was the case for __FreeBSD__ in pkg/28501:
#if defined(__STDC_ISO_10646__) || defined(__NetBSD__) || defined(__FreeBSD__)
#include <locale.h>
#endif /* __STDC_ISO_10646__ */
I have not yet been able to determine the correct predefined symbol
for MacOS X.
As a workaround, I edited the Makefile as follows:
--- work/antiword-0.36.1/Makefile.orig Wed Feb 2 15:55:59 2005
+++ work/antiword-0.36.1/Makefile Wed Feb 2 15:56:21 2005
@@ -18,3 +18,3 @@
-CFLAGS += -D$(DB)
+CFLAGS += -D$(DB) -D__NetBSD__
LDFLAGS =
>Release-Note:
>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/29205
Date: Wed, 2 Feb 2005 17:18:25 -0600 (CST)
A possibly suitable patch for conditional compilation is as follows:
--- work/antiword-0.36.1/main_u.c.orig2 Wed Feb 2 17:11:30 2005
+++ work/antiword-0.36.1/main_u.c Wed Feb 2 17:13:14 2005
@@ -31,3 +31,4 @@
#endif /* __dos */
-#if defined(__STDC_ISO_10646__) || defined(__NetBSD__) || defined(__FreeBSD__)
+#if defined(__STDC_ISO_10646__) || defined(__NetBSD__) \
+ || defined(__FreeBSD__) || (defined(__MACH__) && defined(__APPLE__))
#include <locale.h>
Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Thu, 03 Feb 2005 00:36:53 +0000
Responsible-Changed-Why:
Darwin pkgsrc PR.
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/29205
Date: Wed, 2 Feb 2005 18:48:48 -0600 (CST)
Oops, the package category/name should be "textproc/antiword". I
had 'converters' on my mind since that's sort-of what antiword does.
From: Min Sik Kim <minskim@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/29205 CVS commit: pkgsrc/textproc/antiword
Date: Mon, 7 Mar 2005 18:29:03 +0000 (UTC)
Module Name: pkgsrc
Committed By: minskim
Date: Mon Mar 7 18:29:03 UTC 2005
Modified Files:
pkgsrc/textproc/antiword: distinfo
pkgsrc/textproc/antiword/patches: patch-ab
Log Message:
Include locale.h to use LC_CTYPE on Darwin. Fixes PR pkg/29205.
To generate a diff of this commit:
cvs rdiff -r1.13 -r1.14 pkgsrc/textproc/antiword/distinfo
cvs rdiff -r1.7 -r1.8 pkgsrc/textproc/antiword/patches/patch-ab
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: minskim@netbsd.org
State-Changed-When: Mon, 07 Mar 2005 18:31:45 +0000
State-Changed-Why:
Fixed. Thank you for the PR!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.