From nobody@FreeBSD.org  Sun Aug 25 05:20:38 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 10306F95
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 25 Aug 2013 05:20:38 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id D371E2857
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 25 Aug 2013 05:20:37 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7P5KZlr006015
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 25 Aug 2013 05:20:35 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7P5KZJj005998;
	Sun, 25 Aug 2013 05:20:35 GMT
	(envelope-from nobody)
Message-Id: <201308250520.r7P5KZJj005998@oldred.freebsd.org>
Date: Sun, 25 Aug 2013 05:20:35 GMT
From: Shane Ambler <FreeBSD@Shaneware.biz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: WITH_ICONV breaks gettext-0.18.3
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181515
>Category:       ports
>Synopsis:       WITH_ICONV breaks devel/gettext 0.18.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    autotools
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 25 05:30:00 UTC 2013
>Closed-Date:    Mon Aug 26 16:34:40 UTC 2013
>Last-Modified:  Mon Aug 26 16:34:40 UTC 2013
>Originator:     Shane Ambler
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD leader.local 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0 r250752: Sat May 18 08:03:42 CST 2013     root@leader.local:/usr/obj/usr/src/sys/dtracekern  amd64

>Description:
If buildworld is compiled with WITH_ICONV=yes in src.conf then gettext-0.18.3 fails to run. The port compiles ok but when the binaries are run they fail. At least msgfmt fails.

The previous version - gettext-0.18.1.1_1 - didn't exhibit this issue.

The same issue is present with 9.1-RELEASE-p5 and 9.2-RC3 (I don't believe 8.x has the WITH_ICONV option)

I have tested this within tinderbox. I can build a releng/9.2 jail (9.2-RC3 r254795), build gettext and it can be used. Then put WITH_ICONV=yes in the jails src.conf and re-make jail, re-build gettext and it will fail.

I have used two tinderbox builds to test (both amd64), one using CC=gcc CC=g++ CPP=cpp in the tinderbox build environment the other CC=clang CXX=clang++ CPP=clang-cpp and I get the same results with both.

A gettext binary built in a world compiled without WITH_ICONV runs fine in a world with WITH_ICONV, it needs to be compiled within a world that has WITH_ICONV to fail.

A quick test example is misc/getopt - it fails to build with msgfmt giving an invalid multibyte sequence error. Part of the logfile --

===>  Building for getopt-1.1.5
gcc -c  -DLIBCGETOPT=1 -DWITHOUT_GETTEXT=0 -DLOCALEDIR=\"/usr/local/share/locale\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"getopt\"  -Dprogram_version=\"1.1.5\" -O2 -pipe -I/usr/local/include -fno-strict-aliasing getopt.c -o getopt.o
msgfmt -o po/ca.mo po/ca.po
msgfmt -o po/cs.mo po/cs.po
msgfmt -o po/da.mo po/da.po
po/da.po:66:7: invalid multibyte sequence
po/da.po:66:8: invalid multibyte sequence
po/da.po:66:18: invalid multibyte sequence
po/da.po:66:19: invalid multibyte sequence

>How-To-Repeat:
steps taken to re-produce this issue using tinderbox -
build a test jail based on releng/9.2
create a build using the new 9.2 jail
use that build to compile devel/gettext
test gettext by compiling misc/getopt - works at this point
add WITH_ICONV=yes to ${pd}/jails/${TESTJAILNAME}/src.conf
re-make the test jail
re-compile devel/gettext
re-compile misc/getopt - now fails

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Aug 25 23:43:19 UTC 2013 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181515 
Responsible-Changed-From-To: freebsd-ports-bugs->autotools 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 25 23:44:11 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181515 
State-Changed-From-To: open->closed 
State-Changed-By: ade 
State-Changed-When: Mon Aug 26 16:32:49 UTC 2013 
State-Changed-Why:  
This is a fault with the iconv-in-libc.  It was fixed in HEAD with 
svn r254080 - a cursory inspection indicates that this was not MFC'd 
and with 9.2-R in full swing, is unlikely to be now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181515 
>Unformatted:
