qtjava fails to compile returning an 'undefined reference' error. Reproducible: Always Steps to Reproduce: 1. emerge qtjava Actual Results: .libs/libqtjava_la.all_cpp.o: In function `Java_org_kde_qt_Qt_op_1equals__Lorg_kde_qt_QGLFormat_2Lorg_kde_qt_QGLFormat_2': libqtjava_la.all_cpp.cpp:(.text+0x51388): undefined reference to `operator==(QGLFormat const&, QGLFormat const&)' .libs/libqtjava_la.all_cpp.o: In function `Java_org_kde_qt_Qt_op_1not_1equals__Lorg_kde_qt_QGLFormat_2Lorg_kde_qt_QGLFormat_2': libqtjava_la.all_cpp.cpp:(.text+0x51e88): undefined reference to `operator!=(QGLFormat const&, QGLFormat const&)' collect2: ld returned 1 exit status make[4]: *** [libqtjava.la] Error 1 make[4]: Leaving directory `/var/tmp/portage/qtjava-3.4.1/work/qtjava-3.4.1/qtjava/javalib/qtjava' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/qtjava-3.4.1/work/qtjava-3.4.1/qtjava/javalib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/qtjava-3.4.1/work/qtjava-3.4.1/qtjava' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/qtjava-3.4.1/work/qtjava-3.4.1' make: *** [all] Error 2 !!! ERROR: kde-base/qtjava-3.4.1 failed. !!! Function kde_src_compile, Line 169, Exitcode 2 !!! died running emake, kde_src_compile:make !!! If you need support, post the topmost build error, NOT this status message. soviet runlevel0 # emerge --info Portage 2.0.52-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.11-gentoo-r2 i686) ================================================================= System uname: 2.6.11-gentoo-r2 i686 AMD Duron(tm) Processor Gentoo Base System version 1.12.0_pre8 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -pipe -ftracer -fomit-frame-pointer -mfpmath=sse -falign-functions=64" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control /var/spool/fax/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -pipe -ftracer -fomit-frame-pointer -mfpmath=sse -falign-functions=64 -fvisibility-inlines-hidden" DISTDIR="/srv/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://linuv.uv.es/mirror/gentoo ftp://ftp.caliu.info/pub/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ " LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s" LINGUAS="es de en ca" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/srv/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex 3ds X aalib aavm acl acpi acpi4linux activefilter adns aim alsa amd apm arts artswrappersuid avi berkdb bitmap-fonts bonobo bootsplash bzlib caps cddb cdinstall cdparanoia cdr cdrom chroot clanJavaScript clanVoice cle266 codecs cpdflib crypt cscope ctype cups curl curlwrappers dga dillo dio directfb divx4linux dlloader dmx droproot dv dvd dvdread edl eds emboss encode esd ethereal etwin exif extensions faac faad fam fbcon fdftk festival ffmpeg fftw flac flash fluidsynth foomaticdb fortran freetds freetts freetype ftp gd gdbm ggi gif gkrellm glut gnome gnuplot gpm graphviz gs gsl gstreamer gtk gtk2 guile icq image imagemagick imap imlib imlib2 ipv6 jabber jack java jikes jpeg junit kde kdeenablefinal ladcca lcms ldap libg++ libwww mad maildir mbox mikmod mmx mozilla mp3 mpeg mpi msn mssql mysql nas ncurses nls nptl nptlonly nvidia offensive ogg oggvorbis opengl oss pam pcre pda pdflib perl pic pie plotutils png pnp posic ppds python qt quicktime readline ruby samba scanner sdl shared slang snmp soap sockets spell sqlite sse ssl svg svga szip tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts unicode usb userlocales videos vorbis wmf xine xml xml2 xmms xsl xv xvid zlib linguas_es linguas_de linguas_en linguas_ca userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, MAKEOPTS --------------------------------------------------------------------------------
Please reopen if you can reproduce it with basic CFLAGS/CXXFLAGS/LDFLAGS, thanks. In particular, nothing on the system should be compiled with -fvisibility-inlines-hidden, it gives these kind of errors.
It happens also with CXXFLAGS=${CFLAGS} and CFLAGS and LDFLAGS comented out so that they take the distro's default settings. The result is the same. /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object. .libs/libqtjava_la.all_cpp.o: In function `Java_org_kde_qt_Qt_op_1equals__Lorg_kde_qt_QGLFormat_2Lorg_kde_qt_QGLFormat_2': libqtjava_la.all_cpp.cpp:(.text+0x37937): undefined reference to `operator==(QGLFormat const&, QGLFormat const&)' .libs/libqtjava_la.all_cpp.o: In function `Java_org_kde_qt_Qt_op_1not_1equals__Lorg_kde_qt_QGLFormat_2Lorg_kde_qt_QGLFormat_2': libqtjava_la.all_cpp.cpp:(.text+0x380f7): undefined reference to `operator!=(QGLFormat const&, QGLFormat const&)' collect2: ld returned 1 exit status distcc[7729] (dcc_collect_child) cc child 7730 terminated with status 0x100 distcc[7729] (dcc_collect_child) cc times: user 5.229205s, system 0.361944s, 10630 minflt, 0 majflt distcc[7729] ERROR: compile (null) on localhost failed distcc[7729] elapsed compilation time 6.336110s distcc[7729] (dcc_exit) exit: code 1; self: 0.001999 user 0.004999 sys; children: 5.229205 user 0.361944 sys distcc[7729] (dcc_cleanup_tempfiles) deleted 0 temporary files make[4]: *** [libqtjava.la] Error 1 make[4]: Leaving directory `/var/tmp/portage/qtjava-3.4.3/work/qtjava-3.4.3/qtjava/javalib/qtjava' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/qtjava-3.4.3/work/qtjava-3.4.3/qtjava/javalib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/qtjava-3.4.3/work/qtjava-3.4.3/qtjava' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/qtjava-3.4.3/work/qtjava-3.4.3' make: *** [all] Error 2
What version of Qt do you have installed? I think this was an issue with Qt's symbol visibility, and should be either fixed in the latest Qt version OR can be fixed by re-emerging Qt without the -fvisibility flags. Anyway, closing as a worksforme - please reopen if it persists after the above checks.