Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493310 - qt4-build.eclass - build fails "cannot find -liconv", >=sys-freebsd/freebsd-lib-10.0_beta4
Summary: qt4-build.eclass - build fails "cannot find -liconv", >=sys-freebsd/freebsd-l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 488214
  Show dependency tree
 
Reported: 2013-12-04 12:24 UTC by Yuta SATOH
Modified: 2015-05-10 01:10 UTC (History)
1 user (show)

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


Attachments
sample patch for qt4-build.eclass (493310.patch,515 bytes, patch)
2013-12-04 12:28 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2013-12-04 12:24:09 UTC
Packages that use qt4-build.eclass will fail to build all.

Implementation of iconv enabled in libc on FreeBSD 10.0.
libiconv.so is no longer exists...

FYI,
http://svnweb.freebsd.org/ports/head/UPDATING?r1=325786&r2=326307&view=patch


build log)
<snip>
floatmath auto-detection... ()
x86_64-gentoo-freebsd10.0-g++ -c -pipe -O2 -pipe -ggdb -O2 -Wall -W  -I../../../mkspecs/freebsd-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -o floatmath.o floatmath.cpp
floatmath.cpp:44:5: warning: unused parameter 'argc' [-Wunused-parameter]
 int main(int argc, char **argv)
     ^
floatmath.cpp:44:5: warning: unused parameter 'argv' [-Wunused-parameter]
x86_64-gentoo-freebsd10.0-g++ -Wl,-O1 -o floatmath floatmath.o     -liconv -lgthread-2.0 -lglib-2.0 -lintl
/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../../x86_64-gentoo-freebsd10.0/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'floatmath' failed
gmake: *** [floatmath] Error 1
floatmath disabled.
mmx auto-detection... ()
x86_64-gentoo-freebsd10.0-g++ -c -pipe -mmmx -O2 -pipe -ggdb -O2 -Wall -W  -I../../../mkspecs/freebsd-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -o mmx.o mmx.cpp
x86_64-gentoo-freebsd10.0-g++ -Wl,-O1 -o mmx mmx.o     -liconv -lgthread-2.0 -lglib-2.0 -lintl -mmmx
/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../../x86_64-gentoo-freebsd10.0/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'mmx' failed
gmake: *** [mmx] Error 1
mmx disabled.
<snip>
POSIX iconv auto-detection... ()
x86_64-gentoo-freebsd10.0-g++ -c -pipe -O2 -pipe -ggdb -O2 -Wall -W  -I../../../mkspecs/freebsd-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -o iconv.o iconv.cpp
iconv.cpp: In function 'int main(int, char**)':
iconv.cpp:54:46: error: invalid conversion from 'char**' to 'const char**' [-fpermissive]
     iconv(x, &inp, &inbytes, &outp, &outbytes);
                                              ^
In file included from iconv.cpp:45:0:
/usr/include/iconv.h:56:8: error:   initializing argument 2 of 'size_t iconv(iconv_t, const char**, size_t*, char**, size_t*)' [-fpermissive]
 size_t iconv(iconv_t, const char ** __restrict,
        ^
Makefile:178: recipe for target 'iconv.o' failed
gmake: *** [iconv.o] Error 1
POSIX iconv disabled.
SUN libiconv auto-detection... ()
x86_64-gentoo-freebsd10.0-g++ -c -pipe -O2 -pipe -ggdb -O2 -Wall -W  -I../../../mkspecs/freebsd-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -o gnu-libiconv.o ../gnu-libiconv/gnu-libiconv.cpp
x86_64-gentoo-freebsd10.0-g++ -Wl,-O1 -o sun-libiconv gnu-libiconv.o     -liconv -lgthread-2.0 -lglib-2.0 -lintl
/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../../x86_64-gentoo-freebsd10.0/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'sun-libiconv' failed
gmake: *** [sun-libiconv] Error 1
SUN libiconv disabled.
GNU libiconv auto-detection... ()
x86_64-gentoo-freebsd10.0-g++ -c -pipe -O2 -pipe -ggdb -O2 -Wall -W  -I../../../mkspecs/freebsd-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -o gnu-libiconv.o gnu-libiconv.cpp
x86_64-gentoo-freebsd10.0-g++ -Wl,-O1 -o gnu-libiconv gnu-libiconv.o     -lgthread-2.0 -lglib-2.0 -lintl -liconv
/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../../x86_64-gentoo-freebsd10.0/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'gnu-libiconv' failed
gmake: *** [gnu-libiconv] Error 1
GNU libiconv disabled.
Iconv support cannot be enabled due to functionality tests!
 Turn on verbose messaging (-v) to ./configure to see the final report.
 If you believe this message is in error you may use the continue
 switch (-continue) to ./configure to continue.
 * ERROR: dev-qt/qtcore-4.8.5::gentoo failed (configure phase):
 *   ./configure failed
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_configure
 *   environment, line 3279:  Called qt4-build_src_configure
 *   environment, line 2923:  Called die
 * The specific snippet of code:
 *       ./configure ${conf} || die "./configure failed";
 *
Comment 1 Yuta SATOH 2013-12-04 12:28:23 UTC
Created attachment 364590 [details, diff]
sample patch for qt4-build.eclass
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2013-12-04 15:21:48 UTC
@bsd, can you comment on the has_version usage? would a check on CHOST be preferable?
Comment 3 Alexis Ballier gentoo-dev 2013-12-10 19:09:39 UTC
(In reply to Davide Pesavento from comment #2)
> @bsd, can you comment on the has_version usage? would a check on CHOST be
> preferable?

for bsd its indeed better use the has_version (refactored in the first if though) since the bsd iconv code has been merged in the libc; however, prefix freebsd will not work like that since they rely on system being installed on the host afaik

_maybe_ a solution could be to depend on virtual/libiconv and do a has_version '>=dev-libs/libiconv-0' so that you just rely on the virtual pulling in libiconv or not; but then this will fail for systems with a separate libiconv that is not installed with dev-libs/libiconv; I don't know any though
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2015-04-12 16:53:43 UTC
This code no longer exists in qt4-build-multilib.eclass, and does nothing even in the older qt4-build.eclass since at least Qt 4.7.0. Your patch seems to be against an even older version of the eclass, dunno where it's coming from. I'm closing as obsolete, please reopen if the issue persists with an up-to-date repository.
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2015-05-10 01:10:36 UTC
Actually I was wrong, the code was still present albeit in a different form. It's now gone completely from qt4-build-multilib.eclass; the old qt4-build.eclass is frozen and will disappear soon so I'm not touching it.