Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445716 - =sys-apps/coreutils-8.20: fails to compile on uclibc system because missing link to libiconv
Summary: =sys-apps/coreutils-8.20: fails to compile on uclibc system because missing l...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-02 22:35 UTC by Anthony Basile
Modified: 2013-06-17 21:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2012-12-02 22:35:57 UTC
coreutils-.8.20 introduced a dependence on iconv in lib/striconv.c.  On uclibc system with iconv.h, the check for iconv succeeds, HAVE_ICONV is defined, etc, but the build fails with missing symbols because libiconv needs to be linked in --- see below.  This is fixed by setting CFLAGS+="-Wl,-liconv" and a check in configure.ac could be added.

make  all-recursive
make[1]: Entering directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20'
Making all in po
make[2]: Entering directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20/po'
make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20/po'
Making all in .
make[2]: Entering directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20'
  CCLD   src/factor
lib/libcoreutils.a(striconv.o): In function `mem_cd_iconv':
striconv.c:(.text+0x4f): undefined reference to `libiconv'
striconv.c:(.text+0xc3): undefined reference to `libiconv'
striconv.c:(.text+0x10e): undefined reference to `libiconv'
striconv.c:(.text+0x15e): undefined reference to `libiconv'
striconv.c:(.text+0x1b0): undefined reference to `libiconv'
lib/libcoreutils.a(striconv.o):striconv.c:(.text+0x26e): more undefined references to `libiconv' follow
lib/libcoreutils.a(striconv.o): In function `str_iconv':
striconv.c:(.text+0x561): undefined reference to `libiconv_open'
striconv.c:(.text+0x585): undefined reference to `libiconv_close'
striconv.c:(.text+0x5b4): undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make[2]: *** [src/factor] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20'
make: *** [all] Error 2


Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2013-06-17 21:33:40 UTC
This is because I'm using the breakout libiconv and need to pass -liconv, so invalid.