Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306693 - Qt / KDE packages fail to build when mixing different gcc versions
Summary: Qt / KDE packages fail to build when mixing different gcc versions
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 18:27 UTC by kavol
Modified: 2010-12-30 08:40 UTC (History)
2 users (show)

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


Attachments
emerge log from the relevant period (emerge.log.gz,182.02 KB, application/octet-stream)
2010-06-09 14:35 UTC, kavol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2010-02-24 18:27:07 UTC
Hi.

I am unable to emerge the recently unmasked amarok, the relevant part of the error message is:

...
-- Found automoc4: /usr/bin/automoc4
-- Checking if the QtScript Qt Bindings are installed.
-- includes /usr/include/qt4/QtCore;/usr/include/qt4/QtScript;/usr/include;/usr/include/KDE;/usr/include/KDE;/usr/include;/usr/include/qt4/QtXmlPatterns;/usr/include/qt4/QtWebKit;/usr/include/qt4/QtDBus;/usr/include/qt4/QtTest;/usr/include/qt4/QtUiTools;/usr/include/qt4/QtScript;/usr/include/qt4/QtSvg;/usr/include/qt4/QtXml;/usr/include/qt4/QtSql;/usr/include/qt4/QtOpenGL;/usr/include/qt4/QtNetwork;/usr/include/qt4/QtDesigner;/usr/include/qt4/QtDesigner;/usr/include/qt4/Qt3Support;/usr/include/qt4/QtGui;/usr/include/qt4/QtCore;/usr/include/qt4/Qt;/usr/share/qt4/mkspecs/default;/usr/include/qt4;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include libraries /usr/lib64/qt4/libQtScript.so;/usr/lib64/qt4/libQtCore.so;-lpthread;/usr/lib64/qt4/libQtGui.so;-L/usr/lib64;-lkdecore;-lkdeui
-- Performing Test BINDINGS_RUN_RESULT
-- Performing Test BINDINGS_RUN_RESULT - Failed
-- QtBindings not found. run `cd cmake/modules/bindingstest; mkdir build; cd build; cmake ..; make; ./bindingstest; echo $?` If it prints '0' then you're actually fine.
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION - Success
-- Found MySQL: /usr/include/mysql, /usr/lib64/libmysqlclient.so
-- Found MySQL Embedded: /usr/include/mysql, /usr/lib64/libmysqld.so
-- Found ZLIB: /lib64/libz.so
--   found qca2, version 2.0.2
-- Found QCA2: /usr/lib64/qca2/libqca.so
-- Strigi API needs 'signed char'
-- Found Strigi: /usr/lib64/libstreams.so

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * kdelibs - The toolkit Amarok uses to build
   * mysqld - Embedded MySQL Libraries
   * mysql - MySQL Server Libraries
   * zlib - zlib
   * qca2 - Qt Cryptographic Architecture
   * strigi - Index metadata of files

-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
-----------------------------------------------------------------------------
   * liblastfm (0.3 or higher)  <http://cdn.last.fm/src/liblastfm-0.3.0.tar.bz2>
     Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists
   * libmtp (0.3.0 or higher)  <http://libmtp.sourceforge.net/>
     Enable Support for portable media devices that use the media transfer protocol

-----------------------------------------------------------------------------
-- The following REQUIRED packages could NOT be located on your system.
-- You must install these packages before continuing.
-----------------------------------------------------------------------------
   * qtscript-qt  <http://code.google.com/p/qtscriptgenerator/>
     QtScript Qt Bindings

-----------------------------------------------------------------------------

CMake Error at /usr/share/apps/cmake/modules/MacroLogFeature.cmake:141 (MESSAGE):
  Exiting: Missing Requirements
Call Stack (most recent call first):
  CMakeLists.txt:171 (macro_display_feature_log)


Reproducible: Always
Comment 1 Piotrek Juzwiak 2010-05-12 21:10:36 UTC
I am hitting the same bug with amarok 2.3.0.90 (2.3.1 Beta). While i have both qt-script and qtscriptgenerator installed it can't find it. Right now i am compiling qtscriptgenerator once again (qt-script compiled earlier).

I hit this when compiling qtscriptgenerator

"Please wait while source files are being generated...
QTDIR environment variable not set. This may cause problems with finding the necessary include files.
** WARNING unknown directive '#warning' at /usr/include/qt4/QtCor/qglobal.h:320"

The warning is repeated many times 


Comment 2 Piotrek Juzwiak 2010-05-12 21:12:18 UTC
emerge --info

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.5.0, glibc-2.11.1-r0, 2.6.33-gentoo-r2 i686)
=================================================================
System uname: Linux-2.6.33-gentoo-r2-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 12 May 2010 17:00:01 +0000
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.6.3-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3, 4.5.0
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=atom -mtune=atom -m32 -mssse3 -fomit-frame-pointer -mfpmath=sse -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=atom -mtune=atom -m32 -mssse3 -fomit-frame-pointer -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/var/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="32bit X a52 aac acl acpi akonadi alsa archive aspell bash-completion bindist branding bzip2 cairo cli consolekit cracklib cups cxx dbus dhcpcd dri dts emboss encode exif fam ffmpeg firefox fortran gif gnutls hyperestraier iconv inotify ipod jpeg kde kipi laptop lcms libnotify lzma lzo mad matroska metalink mikmod minimal mmap mmx mng modules mp3 mp4 mpeg mudflap mysql ncurses networkmanager nls nptl nptlonly nsplugin nss offensive ogg opengl openmp optimized-qmake pam pango pcre pdf perl phonon plasma png policykit ppds python qt3support qt4 readline rss samba scanner sdl semantic-desktop session smp solid spell sse sse2 ssl ssse3 startup-notification svg svga symlink sysfs taglib tcpd theora threads tiff truetype udev unicode usb v4l2 virtuoso vorbis wifi win32codecs x264 x86 xattr xcb xcomposite xine xml xorg xulrunner xv xvid xvmc zeroconf zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Piotrek Juzwiak 2010-05-12 22:56:23 UTC
After rebuilding qtscriptgenerator i am compiling amarok just fine. Could the cause be that after upgrading to gcc 4.5.0 i had qt-script compiled with 4.5 while qtscriptgenerator was compiled with previouse gcc 4.4.3 ? Does -fstackprotection in kernel got anything to do with that bug?
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-05-12 23:14:38 UTC
Qt is known to break if its parts are built with different gcc versions.
Comment 5 Piotrek Juzwiak 2010-05-12 23:20:55 UTC
Then i have found my culprit, i wonder what could it be with the person that first reported it. Shouldn't the bug be closed with no more info or something like that? It shouldn't be opened for eternity or should it?
Comment 6 kavol 2010-05-13 13:44:35 UTC
recompiling qt was the first thing I've tried and it did not help

now I've tried again with just qtscriptgenerator and it works, I can compile amarok now ... strange

but if it is a known issue, could there be some check added to the ebuild to warn about incompatible versions?
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-05-13 14:43:31 UTC
This issue has been "haunting" us forever as you can see on bug 64615 - I can't find any bug directly related to qt, but it also applies to qt.
I guess both KDE/Qt could try to add a note about not mixing gcc versions.
Comment 8 Piotrek Juzwiak 2010-05-13 14:50:37 UTC
I can see that judging by the amount of duplicates :D

Now i have got question. Let's say there will be a bugfix release for gcc and i will have after that 4.5.1 (there will be a bugfix for sure as i can't compile gcc 4.5.0 with gcc 4.5.0 while 4.4.3 compiled 4.5.0 just fine), would i have to rebuild everything OR it would only apply to bugs connected with this bugfix release?
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-06-09 13:06:22 UTC
Anyway, this isn't an amarok bug, so I'm changing the title.

@kde/@qt:

Besides adding a note to a FAQ or some guide, do you think we should do anything else? Should we leave this bug open or do we close it as another dupe of bug 64615 and include the bug number in the above note?
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2010-06-09 13:31:50 UTC
(In reply to comment #8)
> I can see that judging by the amount of duplicates :D
> 
> Now i have got question. Let's say there will be a bugfix release for gcc and i
> will have after that 4.5.1 (there will be a bugfix for sure as i can't compile
> gcc 4.5.0 with gcc 4.5.0 while 4.4.3 compiled 4.5.0 just fine), would i have to
> rebuild everything OR it would only apply to bugs connected with this bugfix
> release?
> 

I think this should only apply to major gcc releases. 
And I would like to point out that the gcc upgrade guide explicitly says

* run emerge -eav system
* run emerge -eav world

I think this makes this bug MORE-THAN-INVALID.

Comment 11 kavol 2010-06-09 13:47:34 UTC
(In reply to comment #10)
> I think this should only apply to major gcc releases. 
> And I would like to point out that the gcc upgrade guide explicitly says
> 
> * run emerge -eav system
> * run emerge -eav world
> 
> I think this makes this bug MORE-THAN-INVALID.

are you joking?

http://www.gentoo.org/doc/en/gcc-upgrading.xml

"If you install a new major version of GCC (such as 3.3.6 to 3.4.5), the system will not switch over to use it automatically. You'll have to explicitly request the change because the migration process might require some additional steps. If you decide not to switch, Portage will continue to use older version of your compiler until you change your mind, or remove the old compiler from the system. Non-major gcc upgrades are switched automatically for you (such as 3.4.5 to 3.4.6)."

I had NOT done any explicit gcc switch => "might require some additional steps" does not apply => "run emerge -eav system" etc. does not apply

also there is:

"Generally speaking, upgrades to bug fix releases, like from 3.3.5 to 3.3.6, should be quite safe -- just emerge new version, switch your system to use it and rebuild the only affected package, libtool."

I do not know how powerful machine do you have and how do you use it, but forcing users to spend several days each month or more often recompiling the whole system just because you prefer bruteforce workaround instead of really solving the bug is insane :-(
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2010-06-09 14:04:37 UTC
> are you joking?

In the case of Piotrek Juzwiak, no. Since he compiled part of his system with gcc-4.4 and part with gcc-4.5, he must have done an explicit switch. This is when the gcc upgrading guide applies, and where the brute force approach may be required.

It seems like I fell into the trap that this bug mixes up two different issues.

Summarizing, in your case no gcc upgrade or at most a minor version upgrade was involved. Reopening ok then, but Piotrek's case remains invalid.


Comment 13 kavol 2010-06-09 14:34:23 UTC
(In reply to comment #12)
> Summarizing, in your case no gcc upgrade or at most a minor version upgrade was
> involved. Reopening ok then, but Piotrek's case remains invalid.

ah, okay

I've scanned through my emerge log, and the last gcc update (from 4.3.3 to 4.4.4) happened before a successfull amarok upgrade, it started to fail later
Comment 14 kavol 2010-06-09 14:35:45 UTC
Created attachment 234715 [details]
emerge log from the relevant period
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2010-12-30 08:40:46 UTC
OK, I fear this is not getting anywhere. Looking through the comments again, I'm not sure if different gcc versions are even the problem. Also, the bindings in general have had several bugs in the meantime. 

If this turns up again, please file a new bug (or reopen if it's exactly the same)