From sengelha@yahoo.com  Thu Feb 28 20:20:28 2002
Return-Path: <sengelha@yahoo.com>
Received: from sccimhc01.insightbb.com (sccimhc01.insightbb.com [63.240.76.163])
	by hub.freebsd.org (Postfix) with ESMTP id 4143D37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 28 Feb 2002 20:20:24 -0800 (PST)
Received: from sirius.my.domain ([12.221.68.118])
          by sccimhc01.insightbb.com
          (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP
          id <20020301042020.GLBF22905.sccimhc01.insightbb.com@sirius.my.domain>;
          Fri, 1 Mar 2002 04:20:20 +0000
Received: (from sengelha@localhost)
	by sirius.my.domain (8.11.6/8.11.6) id g214KJr96922;
	Thu, 28 Feb 2002 22:20:19 -0600 (CST)
	(envelope-from sengelha)
Message-Id: <200203010420.g214KJr96922@sirius.my.domain>
Date: Thu, 28 Feb 2002 22:20:19 -0600 (CST)
From: Steven Engelhardt <sengelha@yahoo.com>
Reply-To: Steven Engelhardt <sengelha@yahoo.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sengelha@yahoo.com
Subject: undefined reference to `gettext' when compiling makeinfo
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35439
>Category:       gnu
>Synopsis:       undefined reference to `gettext' when compiling makeinfo
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 28 20:30:01 PST 2002
>Closed-Date:    Thu Feb 28 21:31:01 PST 2002
>Last-Modified:  Thu Feb 28 21:31:13 PST 2002
>Originator:     Steven Engelhardt
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD sirius.my.domain 4.4-STABLE FreeBSD 4.4-STABLE #2: Mon Oct 1 09:08:16 CDT 2001 root@sirius.my.domain:/usr/obj/export/src/freebsd/src/sys/SIRIUS i386

gettext-0.10.35 installed in /usr/local

>Description:

I modified /etc/make.conf to include the following:

CFLAGS=-O -pipe -I/usr/local/include -I/usr/X11R6/include

When I cvsup'd to the latest 4.5-STABLE and did a 'make buildworld', the
compile failed with the following error messages:

cc -O -pipe -I/usr/local/include -I/usr/X11R6/include  -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/share/locale\" -I/export/src/freebsd/src/gnu/usr.bin/texinfo/makeinfo /../../../../contrib/texinfo -I/export/src/freebsd/src/gnu/usr.bin/texinfo/makeinfo/../../../../contrib/texinfo/lib -static -o makeinfo cmds.o defun.o files.o footnote.o html.o index.o insertion.o lang.o macro.o makeinfo.o multi.o node.o sectioning.o toc.o /usr/obj/export/src/freebsd/src/i386/export/src/freebsd/src/gnu/usr.bin/texinfo/makeinfo/../libtxi/libtxi.a
cmds.o: In function `cm_today':
cmds.o(.text+0x194): undefined reference to `gettext'
cmds.o: In function `cm_var':
cmds.o(.text+0x3f1): undefined reference to `gettext'
cmds.o: In function `cm_sc':
cmds.o(.text+0x591): undefined reference to `gettext'
cmds.o: In function `cm_obsolete':
cmds.o(.text+0x7d8): undefined reference to `gettext'
cmds.o: In function `cm_sp':
cmds.o(.text+0x8ae): undefined reference to `gettext'
cmds.o(.text+0xe82): more undefined references to `gettext' follow
makeinfo.o: In function `main':
makeinfo.o(.text+0x2e0): undefined reference to `bindtextdomain'
makeinfo.o(.text+0x2ed): undefined reference to `textdomain'
makeinfo.o(.text+0x38d): undefined reference to `gettext'
makeinfo.o(.text+0x414): undefined reference to `gettext'
makeinfo.o(.text+0x434): undefined reference to `gettext'
makeinfo.o(.text+0x489): undefined reference to `gettext'
makeinfo.o(.text+0x57a): undefined reference to `gettext'
makeinfo.o(.text+0x706): more undefined references to `gettext' follow
*** Error code 1

Stop in /export/src/freebsd/src/gnu/usr.bin/texinfo/makeinfo.
*** Error code 1

Stop in /export/src/freebsd/src/gnu/usr.bin/texinfo.
*** Error code 1

Stop in /export/src/freebsd/src.
*** Error code 1

Stop in /export/src/freebsd/src.
*** Error code 1

Stop in /export/src/freebsd/src.

>How-To-Repeat:

- Install gettext into /usr/local
- Set CFLAGS in /etc/make.conf to have -I/usr/local/include
- Run 'make buildworld'

>Fix:

Removing the CFLAGS line entirely fixed the problem.  I suspect this is
caused by the "-I/usr/local/include" line.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cjc 
State-Changed-When: Thu Feb 28 21:31:01 PST 2002 
State-Changed-Why:  
I am not really sure what the purpose of this PR was. As the submitter 
discovered, you cannot add arbitrary things to CFLAGS and expect 
'buildworld' and other targets to work. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=35439 
>Unformatted:
