Date: Thu, 22 Aug 2013 06:57:05 -0500 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, freebsd-current@freebsd.org Subject: Re: Problems with iconv in base and static linking Message-ID: <5215FC91.4050401@FreeBSD.org> In-Reply-To: <A06C430D-D0E6-4FCA-BAD3-A3DA2B590513@FreeBSD.org> References: <A06C430D-D0E6-4FCA-BAD3-A3DA2B590513@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 8/21/2013 2:49 PM, Dimitry Andric wrote: > Hi, > > While packaging my just-rebuilt ports today, I noticed a strange message > occurring during the package creation stage: > > $ sudo make -C /usr/ports/ports-mgmt/pkg repackage > ===> Building package for pkg-1.1.4_1 > Creating package for pkg-1.1.4_1 > Service unavailable$ > > 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: > > /usr/local/sbin/pkg-static create -o /usr/ports/packages pkg-1.1.4_1 > > Now comes the interesting part: if you use /usr/local/sbin/pkg instead, > the "Service unavailable" message does *not* appear. > > 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 base > does *not* work properly in statically linked executables. For example, > take this small program: ... > 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. > > -Dimitry > I agree this is an iconv issue and that should be fixed instead of bandaging consumers as they are found. -- Regards, Bryan Drewery [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5215FC91.4050401>
