Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 575394

Summary: sys-libs/musl-1.1.14 does not provide iconv utility
Product: Gentoo Linux Reporter: Felix Janda <felix.janda>
Component: [OLD] Core systemAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: normal CC: herrtimson, lu_zero, musl, tek.no.katze, toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    

Description Felix Janda 2016-02-22 16:58:20 UTC
glibc provides a iconv utility for conversion between character sets.

The utility is used in some ebuilds such as media-gfx/exiv2-0.25-r2
causing compilation failures:

http://bluedragon-tinderbox.freeharbor.net/media-gfx/exiv2-0.25-r2/temp/build.log

alpine Linux includes a one-file c implementation by the author of musl:

http://git.alpinelinux.org/cgit/aports/plain/main/musl/iconv.c

(Slightly overloading this bug report, there is also a similar issue
with getconf(1).)
Comment 1 Anthony Basile gentoo-dev 2016-02-23 18:12:31 UTC
(In reply to Felix Janda from comment #0)
> glibc provides a iconv utility for conversion between character sets.
> 
> The utility is used in some ebuilds such as media-gfx/exiv2-0.25-r2
> causing compilation failures:
> 
> http://bluedragon-tinderbox.freeharbor.net/media-gfx/exiv2-0.25-r2/temp/
> build.log
> 
> alpine Linux includes a one-file c implementation by the author of musl:
> 
> http://git.alpinelinux.org/cgit/aports/plain/main/musl/iconv.c
> 
> (Slightly overloading this bug report, there is also a similar issue
> with getconf(1).)

i can't pull from that url for iconv because its at git/HEAD.  does alpine do anything like stable releases of that code.  if not, i'll find another way.

also, is there code for getconf?
Comment 2 Felix Janda 2016-02-23 19:23:40 UTC
The packaging of iconv in alpine is as if we put it into
sys-libs/musl/files. (not suggesting to do the same on gentoo)

There is also an implementation of getconf at

http://git.alpinelinux.org/cgit/aports/plain/main/musl/getconf.c

There might exist other better packaged versions somewhere else.
Comment 3 Anthony Basile gentoo-dev 2016-02-23 20:55:12 UTC
(In reply to Felix Janda from comment #2)
> The packaging of iconv in alpine is as if we put it into
> sys-libs/musl/files. (not suggesting to do the same on gentoo)
> 
> There is also an implementation of getconf at
> 
> http://git.alpinelinux.org/cgit/aports/plain/main/musl/getconf.c
> 
> There might exist other better packaged versions somewhere else.

I don't want to bloat the tree, but if we get a lot of these little guys, we may want to create a musl-extras package.  Right now we have getent and ldconfig beingin supplied from ${FILESDIR}.   With iconv and getconf we'd be up to four "extras".  Let me think about it.
Comment 4 Felix Janda 2016-02-24 13:22:31 UTC
Slightly off-topic, since musl-1.1.13, the LDSO_ARCH (relevant for
ldconfig) can be easily obtained by

/usr/lib/libc.so 2>&1 | sed -n 's/^.*(\(.*\))$/\1/;1p'
Comment 5 Nikita Gillmann 2016-05-23 10:56:50 UTC
For me this blocks building gnunet-meta (I am working on this) on musl-hardened-amd64.
I don't want to append this to the bug ticket, but I can when you tell me to otherwise you can find files here:
http://far37qbrwiredyo5.onion/static/pub/p/gentoo/
http://www.n0.is/static/pub/p/gentoo/
Comment 6 Anthony Basile gentoo-dev 2016-05-23 12:12:04 UTC
(In reply to Nils Gillmann (ng0) from comment #5)
> For me this blocks building gnunet-meta (I am working on this) on
> musl-hardened-amd64.
> I don't want to append this to the bug ticket, but I can when you tell me to
> otherwise you can find files here:
> http://far37qbrwiredyo5.onion/static/pub/p/gentoo/
> http://www.n0.is/static/pub/p/gentoo/

iconv is coming soon, i'm busy putting out some other fires.
Comment 7 Anthony Basile gentoo-dev 2016-06-05 00:35:31 UTC
Okay I've expanded the ebuild to provide iconv, getent and getconf from alpine.  I'll be dropping the getent from uclibc since its a bash script and I prefer a compiled version.

Please test musl-1.1.14-r1 and musl-9999.  Reopen this bug if these a problem, otherwise we're done here.
Comment 8 Felix Janda 2016-06-05 06:57:44 UTC
iconv is working great.

However the three binaries should be in /usr/bin instead of /usr/sbin (dosbin -> dobin).
Comment 9 Anthony Basile gentoo-dev 2016-06-05 07:56:50 UTC
(In reply to Felix Janda from comment #8)
> iconv is working great.
> 
> However the three binaries should be in /usr/bin instead of /usr/sbin
> (dosbin -> dobin).

yeah crap, i noticed too.  i'm going to have to rev bump to 1.1.14-r2.  check it out in a bit