Problems with iconv in base and static linking

Bryan Drewery bdrewery at FreeBSD.org
Thu Aug 22 11:57:12 UTC 2013


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130822/bca6f8e2/attachment.sig>


More information about the freebsd-current mailing list