When gcc goes to build libjava, the configure script has a bug in it. This snippet causes the bug: /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XTestQueryExtension (); int main () { XTestQueryExtension (); ; return 0; } Now, when I manually compile this code block (linking with Xtst), the result is a segfault. Because this does not return 0 by definition in either compile or run, the code proceeds to the following block: { { echo "$as_me:$LINENO: error: libXtst not found, required by java.awt.Robot" >&5 echo "$as_me: error: libXtst not found, required by java.awt.Robot" >&2;} { (exit 1); exit 1; }; }
build.log: checking for libart-2.0 >= 2.1... yes checking LIBART_CFLAGS... -I/usr/include/libart-2.0 checking LIBART_LIBS... -lart_lgpl_2 checking for XTestQueryExtension in -lXtst... no configure: error: libXtst not found, required by java.awt.Robot make[1]: *** [configure-target-libjava] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/build' make: *** [profiledbootstrap] Error 2 * * ERROR: sys-devel/gcc-4.3.1-r1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 4623: Called toolchain_src_compile * environment, line 5139: Called gcc_src_compile * environment, line 2956: Called gcc_do_make * environment, line 2779: Called die * The specific snippet of code: * emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}"; * The die message: * emake failed with profiledbootstrap * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.3.1-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.3.1-r1/temp/environment'. *
same error here with sys-devel/gcc-4.3.2 on amd64
Created attachment 170711 [details, diff] gcc-4.3.2-multilib-gcj.patch From config.log: configure:25129: checking for XTestQueryExtension in -lXtst configure:25164: /var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -m32 -o conftest -O2 -g -O2 -pipe-march=core2 conftest.c -lXtst -L/usr/X11R6/lib >&5 /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.so when searching for -lXtst /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.awhen searching for -lXtst /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libXtst.so whensearching for -lXtst /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libXtst.a when searching for -lXtst /usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lXtst collect2: ld returned 1 exit status It seems that configure tries to find a 32 bit libXtst (which is part of app-emulation/emul-linux-x86-xlibs) The attached solution would be to depend on emul-linux-x86-xlibs on amd64 multilib systems where USE="gcj" is set.
*** Bug 232315 has been marked as a duplicate of this bug. ***
*** Bug 245613 has been marked as a duplicate of this bug. ***
thanks, ive committed Chi-Thanh's patch http://sources.gentoo.org/sys-devel/gcc/gcc-4.3.2.ebuild?r1=1.6&r2=1.7