From owner-freebsd-current@FreeBSD.ORG Thu Aug 22 11:57:12 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 813F1A7F for ; Thu, 22 Aug 2013 11:57:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64A0E26AC for ; Thu, 22 Aug 2013 11:57:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7MBvC16039193 for ; Thu, 22 Aug 2013 11:57:12 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7MBvC4c039190 for freebsd-current@freebsd.org; Thu, 22 Aug 2013 11:57:12 GMT (envelope-from bdrewery) Received: (qmail 52125 invoked from network); 22 Aug 2013 06:57:10 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 22 Aug 2013 06:57:10 -0500 Message-ID: <5215FC91.4050401@FreeBSD.org> Date: Thu, 22 Aug 2013 06:57:05 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: Problems with iconv in base and static linking References: In-Reply-To: X-Enigmail-Version: 1.5.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DCCpLeSmFc6kQ99eHO5KkdkvorDbelMs8" Cc: Baptiste Daroussin , freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 11:57:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DCCpLeSmFc6kQ99eHO5KkdkvorDbelMs8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 8/21/2013 2:49 PM, Dimitry Andric wrote: > Hi, >=20 > While packaging my just-rebuilt ports today, I noticed a strange messag= e > occurring during the package creation stage: >=20 > $ sudo make -C /usr/ports/ports-mgmt/pkg repackage > =3D=3D=3D> Building package for pkg-1.1.4_1 > Creating package for pkg-1.1.4_1 > Service unavailable$ >=20 > In fact, *every* make package/repackage produces the "Service > unavailable" message. The message is actually produced by the pkg(8) > command, which is run as follows: >=20 > /usr/local/sbin/pkg-static create -o /usr/ports/packages pkg-1.1.4_1 >=20 > Now comes the interesting part: if you use /usr/local/sbin/pkg instead,= > the "Service unavailable" message does *not* appear. >=20 > It turns out this is because pkg(8) uses libarchive, which is now > compiled with iconv support from base by default. But the iconv in bas= e > does *not* work properly in statically linked executables. For example= , > take this small program: =2E.. > Of course, there may be other consumers of libc's iconv that might want= > to link statically, so it should really be fixed there instead. For > example, by not doing the dlopen, and failing gracefully. Or maybe by > actually linking in (a subset of) the /usr/lib/i18n libraries. >=20 > -Dimitry >=20 I agree this is an iconv issue and that should be fixed instead of bandaging consumers as they are found. --=20 Regards, Bryan Drewery --DCCpLeSmFc6kQ99eHO5KkdkvorDbelMs8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSFfyRAAoJEG54KsA8mwz5MDEP/i12F75kd9esfg7gRkkaNQ19 2J4D7lNuDpWfmLgp5oC4lkhApvGiKeTQVgBO5yodp8BQCXt+Ua4tB0zc/l1j8x3i N0krSgjbTUGV9CCOeEKFcfqsjOhdqOqRGGkNquk0Tf8w4ZgI97VhDzpJUkkPIP/J iI0pyHo2lJ+oIx1cQ+6kU2Aae6aMpvCDNBMHLknY/k5/3QUIG8TMntYEzpDxCrAn vqc+kYQ7v+63JZMzVpgtsfx0FWb3hx1uT2+iz4WOrnB/V6HN0Qt/Fj2owM3wTBCa /0KSzskKirt9W0CRt1S3dklPXUQ8Pxxm3Dzz9Cwpr53zuiRlaC1ZFnzr4FF89VnU pkn2AngvO/VwDnjZ1iHLInYhQYQmbr/ooEmSefoiNsbhAWx+4MVaJAYG0s7MC5Rj ji9/cFNM8XwnZieYNYeST3ZTgcHRXRRs00Xs52mXAVXYNXDTFC+NKgjQqSjvOYik MDsHhfJ2b9G9W+E+CBCEPA3vPqvHR/ogH0p4TaFyqHxhjGjlK4vF4CvhflAXNsJs iGwc6JqxRvDDCmT4tyvagZ1d1QjzzpYsh6yb6YnJ4UER8YTWcyEzVq7huArLjSBX kWccVMdilrpAQQHj7Fv+rauNgo4H6u5CPHuzeHxapw59phvLUItTtvzSKcctjxXe +iN4uqPu6QC8kiZ0tZpR =sdxS -----END PGP SIGNATURE----- --DCCpLeSmFc6kQ99eHO5KkdkvorDbelMs8--