Subject: pkg/13642: devel/gettext build fails
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 08/06/2001 07:00:43
>Number:         13642
>Category:       pkg
>Synopsis:       devel/gettext build fails
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 06 06:11:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jim Bernard
>Release:        OS: 1.5.1; pkgsrc: August 5, 2001
>Organization:
>Environment:
System: NetBSD snow 1.5.1 NetBSD 1.5.1 (SNOW-$Revision: 1.5 $) #1: Mon Jul 23 20:51:14 MDT 2001 jim@snow:/usr/src/sys/arch/macppc/compile/SNOW macppc

>Description:
===> Building for gettext-0.10.35nb2
...
Making all in lib
...
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I/usr/local/src/netbsd-current/usr/pkg
src/devel/gettext/work/.buildlink/include -I/usr/local/src/netbsd-current/usr/pkg
src/devel/gettext/work/.buildlink/include -O -c xmalloc.c
In file included from ../intl/libintl.h:1,
		 from ../intl/libintl.h:1,
		 from ../intl/libintl.h:1,
		 from ../intl/libintl.h:1,
... (zillions more of these)
		 from xmalloc.c:40:
../intl/libintl.h:1: macro or `#include' recursion too deep
*** Error code 1

	The problem stems from the fact that xmalloc.c has:

	  # include <libintl.h>

	and in ../intl there is the symlink:

	  libintl.h -> .././intl/libgettext.h

	and libgettext.h contains:

	  #include <libintl.h>

	which, I guess, is supposed to include the /usr/pkg/include/libintl.h
	file from gettext-lib-0.10.35nb1 via the .buildlink/include/libintl.h
	symlink.

>How-To-Repeat:
	Try to build gettext.  It could be specific to 1.5.1 or to macppc,
	but I think not.

>Fix:
	I don't think there's any way to order the -I directives that will
	make both of the inclusions of <libintl.h> pick up the correct
	files.  I expect the only option is to change one of the names.
	Perhaps removing the symlink libintl.h in the intl directory and
	changing xmalloc.c (and others??) to include libgettext.h rather
	than libintl.h is a reasonable approach.  I haven't tried it out,
	though.
>Release-Note:
>Audit-Trail:
>Unformatted: