Compiling of gcc-3.4.6-r2 fails with: ... checking for deflate in -lz... yes checking for pkg-config... /usr/bin/pkg-config checking for GTK+ - version >= 2.2.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. make[1]: *** [configure-target-libjava] Error 1 It is installed gtk+-2.12.8. If I understand the configure files correctly gtk+-2.0 is expected. Reproducible: Always root@condor:/root(25)# emerge --info Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.2.3, glibc-2.7-r1, 2.6.24-gentoo-r3 x86_64) ================================================================= System uname: 2.6.24-gentoo-r3 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz Timestamp of tree: Mon, 17 Mar 2008 08:30:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.5 dev-lang/python: 2.4.4-r9, 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.24 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-p hp5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="de fr" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages/All" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclu de=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/science /usr/portage/local/layman/arcon /usr/local/portage /usr/local/portage/xeffects /usr/local/sci" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d a52 aac acl acpi administrator afs aiglx alsa amd64 amrr ao aotuv apache2 asf atlas auctex audacious audiofile automount bash-completion beagle ber kdb bjam blas bluetooth bonobo boo boost bzip2 c++ cairo cdda cddb cdf cdio cdparanoia cdr cgi chm cli corba cracklib cran crypt cups curl daap dbus device-mapp er dga dia divx djvu dlloader dmi dri ds3490 dv dvb dvd dvdr dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo examples exif expat extra f am fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx galago gd gdal gdbm geos gif gimp gimpprint ginac glade glitz gml gmp gnokii gnome gnuplot gnu tls gphoto2 gpm graphics graphviz gs gsl gsm gstreamer gtk guile hal hardened hddtemp hdf hdf5 hlapi http hvm iconv icq icu id3 imagemagick imap innodb ipv6 ird a irmc isdnlog ithreads jabber java jbig john jpeg jpeg2k kerberos kexi keyring ladspa lame lapack latex lcms ldap libgda libsamplerate lirc lm_sensors lua lzo lzw mad maildir math matroska midi mmx mmxext mng mod mono motif mozdevelop mozilla mozsvg mozxmlterm mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap musicbrainz mys ql mysqli nautilus ncurses neXt netcdf netpbm network networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs numarray numeric nvidia obex ocaml octave odbc ogd i ogg ole opengl openmp pae pam pcre pda pdf perl plotutils plugins png posix postgres postscript pppd preview-latex proj projectx pstricks python qhull quickti me readline reflection reiserfs rhythmbox rle rpc rrdcgi rrdtool samba sasl science sdl session slang slp smp sndfile snmp soup sox speex spell spl sqlite sse s se2 ssl stlport subtitles subversion suexec svg t1lib tcl tcpd tex theora threads thunderbird tidy tiff tk truetype unicode userlocales utempter v4l2 vorbis wmf wxwindows xattr xemacs xext xine xml xmlreader xmlrpc xorg xpm xv xvid xvmc zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias aut h_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mim e mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELI BC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" USE RLAND="GNU" VIDEO_CARDS="nv nvidia vesa fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Attach the config.log here and reopen then.
Created attachment 146589 [details] config.log complaining about gtk+ I am not completely sure what is the config.log which is connected with the error. I assume it is work/build/x86_64-pc-linux-gnu/libjava/config.log.
I attached a config.log
<snip> /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/libstdc++.so.6: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0' </snip> hardly looks like something gtk+ related.
"USE=-gcj emerge -vD =gcc-3*" works. I need gcc-3.4 to compile kvm from arcon overlay. I hope I don't ned gcj to do this.
I still tried, if 'emerge -pvuDe system' is able to solve the problem. But it did not. I still get: configure:6981: /var/tmp/portage/sys-devel/gcc-3.4.6-r2/work/build/gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-3.4.6-r2/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 -o conftest -O2 -march=nocona -O2 -pipe -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -O2 -march=nocona -O2 -pipe conftest.c -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 1>&5 /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/libstdc++.so.6: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0' if the gcj flag is set.
I normally don't do the "me too"... But I can reproduce this too. I cannot build older versions of gcc (needed to compile qemu). qemu also fails due to this bug, when gcc-3.3.6 is used. Is this a configuration issue or something else?
IIUC, the C++ abi across GCC versions has been known to break. you can probably fix it by emerging gtk+ (and possibly the libraries it links to) with GCC 3.4 first. if you don't have 3.4 already installed, you should be able to emerge it without the gcj USE flag, rebuild gtk+ and etc with it, and then emerge gcc again with gcj enabled. however, there are probably a number of other libraries containing c++ code that will fail to link with a similar error. if you switch back to gcc-4 with gcc-config you might get the same type of errors linking to the libraries you've rebuilt with gcc-3. you might need to use gcc-config to switch to the gcc-3 version before you can run programs linking to libraries built with gcc-3 - same for gcc-4. these are some of the problems you run into when mixing gcc versions. if at all possible, it's best to try to avoid it. if you just need gcc-3 for kvm/qemu and don't need the java compiler you might be able to get by with just disabling the gcj USE flag. no guarantees though.
> if you just need gcc-3 for kvm/qemu and don't need the java compiler you might > be able to get by with just disabling the gcj USE flag. no guarantees though. > This is not a problem with gcj USE flag for gcc-3. I was found patch which disabling lsd gui for qemu and adding xlib interface. More info: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/qemu.spec
> disabling lsd gui for qemu and adding xlib interface. SDL. Sorry ;-)
As Ryan said, you'd have to work around this. Its not going to "Just Work" when you try going back to versions of gcc like this.
i don't think it's that simple. normally, gtk+ should not pull in C++ deps, so this wouldn't come up. but if gtk+ is built against cairo, and cairo is built with USE=qt4, and qt links against C++, we end up with a link that pulls in a gcc library. so the problem is that we're testing with the local ./xgcc, and gcc is configured with -B flags to search the local built tree for libgcc_s.so, but not for libstdc++. since libgcc_s is from gcc-3.4, but libstdc++ is from the host gcc version (4.x or whatever), we hit the mismatch and it build fails with the weird missing symbol error. simple workaround thus is to build cairo with USE=-qt4 it'd be nice if upstream gcc could handle this in libjava/configure ...