the problem is that qt2 or qt3 will not compile here is the error message: g++ -L/var/tmp/portage/qt-2.3.2-r1/work/qt-2.3.2/lib -Wl,-rpath,/var/tmp/portage/qt-2.3.2-r1/work/qt-2.3.2/lib -lpthread -o ./guithreads main.o -lqt-mt /usr/i686-pc-linux-gnu/bin/ld: warning: liblcms.so.1, needed by /usr/lib/libmng.so.1, not found (try using -rpath or -rpath-link) /usr/lib/libmng.so.1: undefined reference to `cmsOpenProfileFromMem' /usr/lib/libmng.so.1: undefined reference to `cmsDoTransform' /usr/lib/libmng.so.1: undefined reference to `cmsErrorAction' /usr/lib/libmng.so.1: undefined reference to `cmsCreateRGBProfile' /usr/lib/libmng.so.1: undefined reference to `cmsFreeGamma' /usr/lib/libmng.so.1: undefined reference to `cmsOpenProfileFromFile' /usr/lib/libmng.so.1: undefined reference to `cmsCloseProfile' /usr/lib/libmng.so.1: undefined reference to `cmsDeleteTransform' /usr/lib/libmng.so.1: undefined reference to `cmsCreateTransform' /usr/lib/libmng.so.1: undefined reference to `cmsBuildGamma' /usr/lib/libmng.so.1: undefined reference to `cmsWhitePointFromTemp' collect2: ld returned 1 exit status make[2]: *** [guithreads] Error 1 make[2]: Leaving directory `/var/tmp/portage/qt-2.3.2-r1/work/qt-2.3.2/examples/guithreads' make[1]: *** [src-mt] Error 2 make[1]: Leaving directory `/var/tmp/portage/qt-2.3.2-r1/work/qt-2.3.2' make: *** [src-mt] Error 2 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 61, Exitcode 2 !!! (no error message) !!! emerge aborting on /usr/portage/x11-libs/qt/qt-2.3.2-r1.ebuild . Also the compile fase of qt-2.3.2 is not very paralelized, it's only unsing one of my two CPU's (only one g++ is running each time)
Making the following symlink solves the problem: ln -s /usr/lib/liblcms.so.1.0.8 /usr/lib/liblcms.so.1 Also, while compiling qt I noticed that if one has some idle cpu hog (seti@home, dnetc, etc..) the compiles will only run a compile at a time. This should not happen since the other cpu hogs are with a high nice value. So the compiler has priority and should run more processes..
*** Bug 2482 has been marked as a duplicate of this bug. ***
remerge lcms, and it should fix the symlink
I'm adding the missing lcms dep to the qt ebuilds, btw. And, as Seemant said, remerge lcms and it should create the symlink this time (hopefully). If it doesn't, emerge -c lcms (to remove 1.0.6) and emerge lcms again; that may help. If it still doesn't create the proper symlink, say so.
*** Bug 2859 has been marked as a duplicate of this bug. ***
I get a different error when I tried to compile the latest qt... g++ -c -pipe -fno-exceptions -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/postgresql/libpq -Wall -W -O2 -D_REENTRANT -fPIC -DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_NIS -DQT_NAS_SUPPORT -DQT_NO_REMOTE -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_COMPACT -I/usr/X11R6/include/freetype2 -I/usr/qt/3/include -I/usr/X11R6/include -I/usr/X11R6/include -I.moc/release-mt/ -I/usr/qt/3/mkspecs/linux-g++ -o .obj/release-mt/qpopupmenu.o widgets/qpopupmenu.cpp widgets/qpopupmenu.cpp: In method `void QPopupMenu::popup(const QPoint &, int = 0)': widgets/qpopupmenu.cpp:502: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `int QPopupMenu::itemAtPos(const QPoint &, bool = TRUE) const': widgets/qpopupmenu.cpp:827: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:833: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `class QRect QPopupMenu::itemGeometry(int)': widgets/qpopupmenu.cpp:874: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::updateSize()': widgets/qpopupmenu.cpp:1026: `SH_PopupMenu_Scrollable' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1029: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::drawContents(QPainter *)': widgets/qpopupmenu.cpp:1351: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1352: `PE_PopupMenuScroller' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1362: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1395: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1396: `PE_PopupMenuScroller' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::keyPressEvent(QKeyEvent *)': widgets/qpopupmenu.cpp:1870: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::subScrollTimer()': widgets/qpopupmenu.cpp:1946: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::updateRow(int)': widgets/qpopupmenu.cpp:2076: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:2089: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' make[1]: *** [.obj/release-mt/qpopupmenu.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/qt-3.0.4.1/work/qt-copy-3.0.4/src' make: *** [sub-src] Error 2
I've just tried to compile the latest ebuild that was just released... I'm still getting the same errors in qpopupmenu.cpp though I noticed some other errors furthur up in the terminal: g++ -c -pipe -fno-exceptions -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/postgresql/libpq -Wall -W -O2 -D_REENTRANT -fPIC -DQT_SHARED -DQT_NO_DEBUG -DQ T_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_NIS -DQT_NAS_SUPPORT -DQT_NO_REMOTE -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE - DQT_NO_STYLE_COMPACT -I/usr/X11R6/include/freetype2 -I/usr/qt/3/include -I/usr/X11R6/include -I/usr/X11R6/include -I.moc/release-mt/ -I/usr/qt/3/mkspecs/linux-g++ -o .ob j/release-mt/qprogressbar.o widgets/qprogressbar.cpp widgets/qpopupmenu.cpp: In method `int QPopupMenu::itemAtPos(const QPoint &, bool = TRUE) const': widgets/qpopupmenu.cpp:827: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:833: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `class QRect QPopupMenu::itemGeometry(int)': widgets/qpopupmenu.cpp:874: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::updateSize()': widgets/qpopupmenu.cpp:1026: `SH_PopupMenu_Scrollable' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1029: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::drawContents(QPainter *)': widgets/qpopupmenu.cpp:1351: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1352: `PE_PopupMenuScroller' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1362: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1395: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:1396: `PE_PopupMenuScroller' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::keyPressEvent(QKeyEvent *)': widgets/qpopupmenu.cpp:1870: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::subScrollTimer()': widgets/qpopupmenu.cpp:1946: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp: In method `void QPopupMenu::updateRow(int)': widgets/qpopupmenu.cpp:2076: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' widgets/qpopupmenu.cpp:2089: `PM_PopupMenuScrollerHeight' is not a member of type `QStyle' g++ -c -pipe -fno-exceptions -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/postgresql/libpq -Wall -W -O2 -D_REENTRANT -fPIC -DQT_SHARED -DQT_NO_DEBUG -DQ T_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_NIS -DQT_NAS_SUPPORT -DQT_NO_REMOTE -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE - DQT_NO_STYLE_COMPACT -I/usr/X11R6/include/freetype2 -I/usr/qt/3/include -I/usr/X11R6/include -I/usr/X11R6/include -I.moc/release-mt/ -I/usr/qt/3/mkspecs/linux-g++ -o .ob j/release-mt/qpushbutton.o widgets/qpushbutton.cpp make[1]: *** [.obj/release-mt/qpopupmenu.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/qt-3.0.4.20020606-r1/work/qt-copy-3.0.4/src' make: *** [sub-src] Error 2 cd qmake && make
Those are the same errors, it's just that by default portage runs make -j2 (i.e. with 2 threads) and so each one fails and every error is echoed twice.
You're not using gcc3 by any chance? (grasping at straws maybe)
no i'm not, I'm using 2.95.3
Finally! I fixed it... The problem was that it was looking for include files in /usr/qt/3/include, instead of the work directory... I went into the /etc/env.d dir and changed all instances to /var/tmp/portage/qt-yahdayahda/work/qt-copy-3.0.4/ and it worked like a charm... This seems like something that should be fixed to me.
Yes, it needs to be fixed indeed! But, normally it works; the ebuild exports QTDIR=${S} before building and usually it's enough. There's no reason afaics why env.d files should override that. In fact, afaics they can only do so if a new login session is started, which causes profile.env to be read, etc. But "normally" that does not happen. I can't think of much to do since I can't reproduce the problem, but we can put lots of "echo QTDIR=$QTDIR" statements everywhere and try to locate the place in the build process where the QTDIR=${S} setting is overridden. I don't know if we'll find anything, but I want to try. If it doesn't help, we'll try putting lots of extra "export QTDIR=$S" statements all over. Sometimes brute force methods work :-) I'm going to commit a qt-3.0.4.20020606-r3.ebuild with these statements, please try to emerge it and post all the relevant output here (if it fails). This also includes the testing items from r2 (extra optimizations), but that shouldn't be a problem, I'm running it myself and it's ok so far. (Both r2 and r3 are masked).
I once had this problem originally building qt3. I'm merging r3 right now. It seems to be failing at a completely different place now. g++ -c -o makefile.o -march=i686 -O3 -pipe -march=i686 -O3 -pipe -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I../include -I/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4/include -I../src/tools -DQT_NO_TEXTCODEC -DQT_NO_COMPONENT -DQT_NO_STL -I/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4/mkspecs/linux-g++ -march=i686 -O3 -pipe -march=i686 -O3 -pipe generators/makefile.cpp generators/makefile.cpp: In method `void MakefileGenerator::init()': generators/makefile.cpp:981: virtual memory exhausted cpp0: output pipe has been closed make: *** [makefile.o] Error 1 QMake failed to build. Aborting.
That's because of the changes from r2; qt is compiled with lots of optimizations and apparently it takes a _lot_ of memory. Other pople reported that as well. Im committing a new r3 based on r1 (i.e. with the QTDIR echo statements, no r2 optimizations). Please try that.
I got around the "virtual memory exhausted problem" by removing optimizations for files compiled under the qmake folder. I hacked up the e-build for qt-3.0.4-20020606-r3 in the following manner. 72,73c72,73 < sed -e "s:CFLAGS=:CFLAGS=${CFLAGS} :" \ < -e "s:CXXFLAGS= \$(CFLAGS):CXXFLAGS= \$(CFLAGS) ${CXXFLAGS} :" GNUmakefile.in.orig > GNUmakefile.in --- > sed -e "s:CFLAGS=:CFLAGS=-march=i686 -pipe :" \ > -e "s:CXXFLAGS= \$(CFLAGS):CXXFLAGS= \$(CFLAGS) -march=i686 -pipe:" GNUmakefile.in.orig > GNUmakefile.in The rest of the library I believed compiled using the $CFLAGS in make.conf
Ok.. so r3 fails still here's the output make[3]: *** [.obj/qsql_psql.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4/plugins/src/sqldrivers/psql' make[2]: *** [sub-psql] Error 2 make[2]: Leaving directory `/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4/plugins/src/sqldrivers' make[1]: *** [sub-sqldrivers] Error 2 make[1]: Leaving directory `/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4/plugins/src' make: *** [sub-plugins] Error 2 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 84, Exitcode 2 !!! (no error message) --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/tmp/sandbox-qt-3.0.4.20020606-r3-26339.log" unlink: /usr/qt/3/lib/libqt-mt.so.3.0.4 unlink: /usr/qt/3/lib/libqt-mt.so unlink: /usr/qt/3/lib/libqt-mt.so.3 unlink: /usr/qt/3/lib/libqt-mt.so.3.0 rename: /usr/qt/3/lib/libqt-mt.so.3.0.4 unlink: /usr/qt/3/lib/libqt-mt.so unlink: /usr/qt/3/lib/libqt-mt.so.3 unlink: /usr/qt/3/lib/libqt-mt.so.3.0 unlink: /usr/qt/3/lib/libqt-mt.so.3.0.4 unlink: /usr/qt/3/lib/libqt-mt.so unlink: /usr/qt/3/lib/libqt-mt.so.3 unlink: /usr/qt/3/lib/libqt-mt.so.3.0 rename: /usr/qt/3/lib/libqt-mt.so.3.0.4 unlink: /usr/qt/3/lib/libqt-mt.so unlink: /usr/qt/3/lib/libqt-mt.so.3 unlink: /usr/qt/3/lib/libqt-mt.so.3.0 unlink: /usr/qt/3/lib/libqt-mt.so.3.0.4 unlink: /usr/qt/3/lib/libqt-mt.so unlink: /usr/qt/3/lib/libqt-mt.so.3 unlink: /usr/qt/3/lib/libqt-mt.so.3.0 rename: /usr/qt/3/lib/libqt-mt.so.3.0.4 unlink: /usr/qt/3/lib/libqt-mt.so unlink: /usr/qt/3/lib/libqt-mt.so.3 unlink: /usr/qt/3/lib/libqt-mt.so.3.0 --------------------------------------------- also the beginning output may be of some interest.. >>> md5 ;-) qt-copy-3.0.4.tar.bz2 >>> md5 ;-) qt-copy-3.0.4-onthespot.patch >>> md5 ;-) qt-3.0.4.20020606-cvs.patch.tar.bz2 main section, QTDIR=/usr/qt/3 main section, QTDIR=/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4 main section, QTDIR=/usr/qt/3 main section, QTDIR=/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4 >>> Checking qt-copy-3.0.4.tar.bz2's mtime... >>> Checking qt-copy-3.0.4-onthespot.patch's mtime... >>> Checking qt-3.0.4.20020606-cvs.patch.tar.bz2's mtime... >>> WORKDIR is up-to-date, keeping... main section, QTDIR=/usr/qt/3 main section, QTDIR=/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4 src_compile, QTDIR=/var/tmp/portage/qt-3.0.4.20020606-r3/work/qt-copy-3.0.4 nas gif mysql postgres
This is maddening... Why does it access /usr/qt/3?! The QTDIR= printouts seem ok. (What about the one between the running of configure and the running of make?) Hm...
I'm trying the ebuild again w/out mysql and postgres. But I just looked at the compile lines and there were two things that looked fishy: -I/usr/qt/3/include -I/usr/qt/3/mkspecs/linux-g++ it seems like if the old version and the new version are sufficiently different, then the compile will probably fail. I don't see anything about /var/tmp/... blah/qt/work
r3 seemed to build and merge properly.. though I still got access violations at the end.
You're right about comment #18. What about qt 3.0.5? (faint hope) BTW, qt's configure _cannot_ run when QTDIR isn't set to its current directory, it will abort! This is extremely baffling. Let's make a test: move your /usr/qt/3 directory somewhere else and emerge qt. If it tries to include files from there it'll fail compiling. We should ask on the qt mailing list.
Well, I got 3.0.5 merged, but I had to do the same thing as I've done on the past 4 ebuilds. I tried the first time, and it failed, so I went to then env.d folder and commented every line on every qt file. That seemed to fix it... But it seems very strange.. I'll try to move the /usr/qt/3 and see what happens. Should I uncomment those environment variables?
Hannes, maybe you have some idea what on earth can be causing this?... I don't :-(
well, this is imho an environment problem, don't know why, but QTDIR is exported during the build with /usr/qt/3. I really don't know why, is there anything special we should know about your hardware? (gcc-2.95.3) what console do you use for emerge? (xterm? konsole? text-console?).
Shouldn't be anything special, though I installed gentoo back in the 1.0rc days, and haven't done a clean install since. I still get this problem when I recompile qt.. Though now that I know the problem, I just go into /etc/confd and comment out any QT env vars. And it works fine. Its a very strange thing. Oh and as for my system, its an athalon XP gcc-3.2 (though this happened when I used 2.95 as well) with all the most recent updates.
Well, I can't believe it. I'm building the latest qt right now .. qt-3.1_pre... Anyway, its using the proper include path.. Go figure, maybe something has changed on my system.. Its been quite a while since I installed qt.
so, seems that no problems are left, i will close this.