Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304115 - =dev-python/PyQt4-4.7 with USE="-X" tries to link with -lXext
Summary: =dev-python/PyQt4-4.7 with USE="-X" tries to link with -lXext
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-09 10:46 UTC by Thomas Capricelli
Modified: 2010-05-27 14:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2010-02-09 10:46:05 UTC
This is very probably because of the minimalist USE flags i'm using. Some web application requires PyQt. This web server does not use dbus, X or gui, and those USE flags eliminates a lot of dependencies:

[ebuild  N    ] dev-python/PyQt4-4.7  USE="-X -assistant -dbus -debug -doc -examples -kde -multimedia -opengl -phonon -sql -svg -webkit -xmlpatterns"


The compilation ends with: ....

x86_64-pc-linux-gnu-g++ -c -march=native -O3 -pipe -fPIC -Wall -W -D_REENTRANT -DNDEBUG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/bigtmp/portage/dev-python/PyQt4-4.7/work/PyQt-x11-gpl-4.7-2.6/qpy/QtCore -I/usr/include/python2.6 -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/usr/X11R6/include -o sipQtCoreQtKeyboardModifiers.o sipQtCoreQtKeyboardModifiers.cpp
x86_64-pc-linux-gnu-g++ -c -march=native -O3 -pipe -fPIC -Wall -W -D_REENTRANT -DNDEBUG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/bigtmp/portage/dev-python/PyQt4-4.7/work/PyQt-x11-gpl-4.7-2.6/qpy/QtCore -I/usr/include/python2.6 -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/usr/X11R6/include -o sipQtCoreQt.o sipQtCoreQt.cpp
x86_64-pc-linux-gnu-g++ -c -march=native -O3 -pipe -fPIC -Wall -W -D_REENTRANT -DNDEBUG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/bigtmp/portage/dev-python/PyQt4-4.7/work/PyQt-x11-gpl-4.7-2.6/qpy/QtCore -I/usr/include/python2.6 -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/usr/X11R6/include -o sipQtCoreQSysInfo.o sipQtCoreQSysInfo.cpp
x86_64-pc-linux-gnu-g++ -Wl,-O1 -shared  -Wl,-rpath,/usr/lib64/qt4 -Wl,--version-script=QtCore.exp -o QtCore.so sipQtCorecmodule.o sipQtCoreQList0600QPair0100QByteArray0100QByteArray.o sipQtCoreQList0600QPair0100QString0100QString.o sipQtCoreQSet0101QAbstractState.o sipQtCoreQList0100QUrl.o sipQtCoreQList0101QAbstractAnimation.o sipQtCoreQList0101QAbstractState.o sipQtCoreQHash18000100QByteArray.o sipQtCoreQMap18000100QVariant.o sipQtCoreQList0100QByteArray.o sipQtCoreQVector0100QXmlStreamNotationDeclaration.o sipQtCoreQVector0100QXmlStreamNamespaceDeclaration.o sipQtCoreQVector0100QXmlStreamEntityDeclaration.o sipQtCoreQMap0100QString0100QVariant.o sipQtCoreQList0100QVariant.o sipQtCoreQHash0100QString0100QVariant.o sipQtCoreQVector0600QPair24000100QVariant.o sipQtCoreQList0101QObject.o sipQtCoreQList0100QModelIndex.o sipQtCoreQList0100QFileInfo.o sipQtCoreQXmlStreamWriter.o sipQtCoreQXmlStreamReader.o sipQtCoreQXmlStreamEntityResolver.o sipQtCoreQXmlStreamEntityDeclaration.o sipQtCoreQXmlStreamNotationDeclaration.o sipQtCoreQXmlStreamNamespaceDeclaration.o sipQtCoreQXmlStreamAttributes.o sipQtCoreQXmlStreamAttribute.o sipQtCoreQWaitCondition.o sipQtCoreQVector2400.o sipQtCoreQVector1900.o sipQtCoreQVariant_5.o sipQtCoreQVariant_4.o sipQtCoreQUuid.o sipQtCoreQUrlFormattingOptions.o sipQtCoreQUrl.o sipQtCoreQTranslator.o sipQtCoreQTimer.o sipQtCoreQTimeLine.o sipQtCoreQThreadPool.o sipQtCoreQThread.o sipQtCoreQTextStreamManipulator.o sipQtCoreQTextStreamNumberFlags.o sipQtCoreQTextStream.o sipQtCoreQTextDecoder.o sipQtCoreQTextEncoder.o sipQtCoreQTextCodecConverterState.o sipQtCoreQTextCodecConversionFlags.o sipQtCoreQTextCodec.o sipQtCoreQTextBoundaryFinderBoundaryReasons.o sipQtCoreQTextBoundaryFinder.o sipQtCoreQTemporaryFile.o sipQtCoreQSystemSemaphore.o sipQtCoreQStringMatcher_0.o sipQtCoreQStringList_0.o sipQtCoreQStringList_1.o sipQtCoreQStringRef_0.o sipQtCoreQStringRef_1.o sipQtCoreQLatin1String_0.o sipQtCoreQStringSectionFlags_0.o sipQtCoreQString_0.o sipQtCoreQString_1.o sipQtCoreQStateMachineWrappedEvent.o sipQtCoreQStateMachineSignalEvent.o sipQtCoreQStateMachine.o sipQtCoreQState.o sipQtCoreQSocketNotifier.o sipQtCoreQSizeF.o sipQtCoreQSize.o sipQtCoreQSignalTransition.o sipQtCoreQSignalMapper.o sipQtCoreQSharedMemory.o sipQtCoreQSettings.o sipQtCoreQSequentialAnimationGroup.o sipQtCoreQSemaphore.o sipQtCoreQRunnable.o sipQtCoreQResource.o sipQtCoreQRegExp.o sipQtCoreQRectF.o sipQtCoreQRect.o sipQtCoreQWriteLocker.o sipQtCoreQReadLocker.o sipQtCoreQReadWriteLock.o sipQtCoreQPropertyAnimation.o sipQtCoreQVariantAnimation.o sipQtCoreQProcessEnvironment.o sipQtCoreQProcess.o sipQtCoreQPointF.o sipQtCoreQPoint.o sipQtCoreQPluginLoader.o sipQtCoreQPauseAnimation.o sipQtCoreQParallelAnimationGroup.o sipQtCoreQPair18001800.o sipQtCoreQGenericReturnArgument.o sipQtCoreQGenericArgument.o sipQtCoreQMetaObject.o sipQtCoreQObjectCleanupHandler.o sipQtCoreQWidget.o sipQtCoreQMutexLocker.o sipQtCoreQMutex.o sipQtCoreQMimeData.o sipQtCoreQMetaType.o sipQtCoreQMetaClassInfo.o sipQtCoreQMetaProperty.o sipQtCoreQMetaEnum.o sipQtCoreQMetaMethod.o sipQtCoreQMargins.o sipQtCoreQList0100QLocaleCountry.o sipQtCoreQSystemLocale.o sipQtCoreQLocaleNumberOptions.o sipQtCoreQLocale.o sipQtCoreQList2400.o sipQtCoreQList1800.o sipQtCoreQList0600QPair24002400.o sipQtCoreQList0600QPair18001800.o sipQtCoreQLineF.o sipQtCoreQLine.o sipQtCoreQLibraryInfo.o sipQtCoreQLibraryLoadHints.o sipQtCoreQLibrary.o sipQtCoreQIODeviceOpenMode.o sipQtCoreQHistoryState.o sipQtCoreQFSFileEngine.o sipQtCoreQFinalState.o sipQtCoreQFileSystemWatcher.o sipQtCoreQFileInfo.o sipQtCoreQFilePermissions.o sipQtCoreQFile.o sipQtCoreQEventTransition.o sipQtCoreQEventLoopProcessEventsFlags.o sipQtCoreQEventLoop.o sipQtCoreQEasingCurve.o sipQtCoreQDirIteratorIteratorFlags.o sipQtCoreQDirIterator.o sipQtCoreQDirSortFlags.o sipQtCoreQDirFilters.o sipQtCoreQDir.o sipQtCoreQDateTime.o sipQtCoreQTime.o sipQtCoreQDate.o sipQtCoreQDataStream.o sipQtCoreQCryptographicHash.o sipQtCoreQDynamicPropertyChangeEvent.o sipQtCoreQChildEvent.o sipQtCoreQTimerEvent.o sipQtCoreQEvent.o sipQtCoreQCoreApplication.o sipQtCoreQChar_0.o sipQtCoreQChar_1.o sipQtCoreQLatin1Char_0.o sipQtCoreQByteArrayMatcher.o sipQtCoreQByteArray.o sipQtCoreQBuffer.o sipQtCoreQIODevice.o sipQtCoreQBitArray.o sipQtCoreQBasicTimer.o sipQtCoreQAnimationGroup.o sipQtCoreQAbstractTransition.o sipQtCoreQAbstractState.o sipQtCoreQAbstractListModel.o sipQtCoreQAbstractTableModel.o sipQtCoreQAbstractItemModel.o sipQtCoreQPersistentModelIndex.o sipQtCoreQModelIndex.o sipQtCoreQAbstractFileEngineIterator.o sipQtCoreQAbstractFileEngineHandler.o sipQtCoreQAbstractFileEngineFileFlags.o sipQtCoreQAbstractFileEngine.o sipQtCoreQAbstractEventDispatcher.o sipQtCoreQAbstractAnimation.o sipQtCoreQObject.o sipQtCoreQtGestureFlags.o sipQtCoreQtTouchPointStates.o sipQtCoreQtInputMethodHints.o sipQtCoreQtTextInteractionFlags.o sipQtCoreQtMatchFlags.o sipQtCoreQtItemFlags.o sipQtCoreQtDropActions.o sipQtCoreQtToolBarAreas.o sipQtCoreQtDockWidgetAreas.o sipQtCoreQtImageConversionFlags.o sipQtCoreQtWindowStates.o sipQtCoreQtWindowFlags.o sipQtCoreQtAlignment.o sipQtCoreQtOrientations.o sipQtCoreQtMouseButtons.o sipQtCoreQtKeyboardModifiers.o sipQtCoreQt.o sipQtCoreQSysInfo.o -L/bigtmp/portage/dev-python/PyQt4-4.7/work/PyQt-x11-gpl-4.7-2.6/qpy/QtCore -L/usr/lib64/qt4 -L/usr/X11R6/lib -lqpycore -lQtCore -L/usr/lib64 -L/usr/lib64/qt4 -lgthread-2.0 -lrt -lglib-2.0 -L/usr/lib64/qt4 -lpthread -lXext -lX11 -lm -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lXext
collect2: ld returned 1 exit status
make[1]: *** [QtCore.so] Error 1
make[1]: Leaving directory `/bigtmp/portage/dev-python/PyQt4-4.7/work/PyQt-x11-gpl-4.7-2.6/QtCore'
make: *** [all] Error 2
 * ERROR: dev-python/PyQt4-4.7 failed:



Reproducible: Always
Comment 1 Thomas Capricelli 2010-02-09 10:49:42 UTC
as a side note, if i remove " -lXext -lX11 " from the link step, it links ok. I dont know if this is PyQt or gentoo ebuild that forces those uneeded linking flags.
Comment 2 Rafał Mużyło 2010-02-09 13:39:20 UTC
I'm not 100% sure, but that reminds me of something I've
read in recent release notes of Qt about qmake.
What's your version of qt ?
Comment 3 Rafał Mużyło 2010-02-09 16:43:55 UTC
See http://qt.nokia.com/developer/changes/changes-4.6.0
at "qmake no longer adds Qt internal dependencies".
Could this be your problem ?
Comment 4 Thomas Capricelli 2010-02-09 23:52:58 UTC
i use qt-4.6.1 (the current on in ~amd64). The problem i have with PyQt seems to be the opposite of the one mentionned on the qt announce you mentionned : they say qmake no longer add those, and my problem is that the X11 libs are (wrongly) there.

% qmake --version
QMake version 2.01a
Using Qt version 4.6.1 in /usr/lib64/qt4
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2010-02-10 13:35:03 UTC
PyQt4 uses the sip build system, therefore qmake's behaviour is irrelevant.
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2010-02-10 14:56:52 UTC
Thomas, please post the output of:

python -c 'import sipconfig; print sipconfig._default_macros["LIBS_X11"]'
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2010-02-10 15:47:42 UTC
I'm quite sure the culprit is the value of LIBS_X11, which is injected in the LIBS variable of every Makefile generated by the sipconfig module. LIBS_X11 is obtained from a platform-specific spec file, more precisely from the value of QMAKE_LIBS_X11, which is parsed by siputils.parse_build_macros() during sip configuration. So the bug is in dev-python/sip rather than PyQt4.

A proper fix for this issue does not look easy. I suggest reporting it to upstream and see what they think.
On the other hand, the Qt configure script always requires libX11 and libXext, even when building QtCore (it's been patched in Gentoo to skip those checks), thus they might just ignore the problem because it's an unsupported configuration.
Comment 8 Thomas Capricelli 2010-02-10 18:07:24 UTC
(In reply to comment #6)
> Thomas, please post the output of:
> 
> python -c 'import sipconfig; print sipconfig._default_macros["LIBS_X11"]'
> 

Here it is:
% python -c 'import sipconfig; print sipconfig._default_macros["LIBS_X11"]'
-lXext -lX11 -lm
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2010-02-10 20:50:01 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Thomas, please post the output of:
> > 
> > python -c 'import sipconfig; print sipconfig._default_macros["LIBS_X11"]'
> > 
> 
> Here it is:
> % python -c 'import sipconfig; print sipconfig._default_macros["LIBS_X11"]'
> -lXext -lX11 -lm
> 

As expected. The above output confirms my thesis.
Comment 10 Davide Pesavento (RETIRED) gentoo-dev 2010-03-13 13:43:52 UTC
Thomas, could you report this issue to the PyQt4 mailing list please?
Comment 11 Thomas Capricelli 2010-03-14 01:51:21 UTC
done. I could not find a bugtracker (which is the usual place to report bug, not lists)
Comment 12 Davide Pesavento (RETIRED) gentoo-dev 2010-03-14 10:53:17 UTC
(In reply to comment #11)
> done. I could not find a bugtracker (which is the usual place to report bug,
> not lists)
> 

Thanks. There isn't a bugtracker anyway :) Bugs go to pyqt@riverbankcomputing.com
Please keep us informed of any reply you get.
Comment 13 Davide Pesavento (RETIRED) gentoo-dev 2010-03-23 20:48:54 UTC
Any news? I can't find your mail in PyQt archives...
Comment 14 Thomas Capricelli 2010-03-24 06:27:40 UTC
i can't find it neither... i dont know why. I've checked my sentbox, the email address is right, and i haven't received any 'error mail'.. so i dont know :-(
Comment 15 Davide Pesavento (RETIRED) gentoo-dev 2010-03-24 14:33:10 UTC
You must be subscribed to the ML in order to make posts...
Comment 16 Thomas Capricelli 2010-03-24 15:27:14 UTC
mm.. and my mail gest lost in the void ? Weird.. usually you get at least an email telling you that your post was discarded and why.

Anyway, I'm not able to subscribe to yet another mailing list, sorry for this. I will understand if you just close the bug as 'wontfix', or 'upstream'.
Comment 17 Davide Pesavento (RETIRED) gentoo-dev 2010-03-24 17:55:08 UTC
Don't worry. I asked Phil (upstream dev) to take a look at this bug.
Comment 18 Davide Pesavento (RETIRED) gentoo-dev 2010-03-26 14:06:58 UTC
Fixed in SIP's hg repo:

http://www.riverbankcomputing.com/hg/sip/rev/9fe1eb5bf1ac
Comment 19 Thomas Capricelli 2010-03-27 16:19:27 UTC
it belongs to the 4.10 branch, so it should be included in the next release, dev-python/sip-4.10.2
Comment 20 Markos Chandras (RETIRED) gentoo-dev 2010-04-17 09:23:59 UTC
4.10.2 is on tree
This bug may close now
Reopen if needed
Comment 21 Thomas Capricelli 2010-05-27 14:29:28 UTC
i confirm,
dev-python/PyQt4-4.7.3  USE="svg -X -assistant -dbus -debug -doc -examples -kde -multimedia -opengl -phonon -sql -webkit -xmlpatterns"

emerges fine. Thanks!