[PyQt] configuring pykde4, error

Jim Bublitz jbublitz at nwinternet.com
Wed May 14 23:54:57 BST 2008


On Wednesday 14 May 2008 13:54, Darren Dale wrote:
> On Wednesday 14 May 2008 04:14:43 pm Jim Bublitz wrote:
> > On Wednesday 14 May 2008 12:09, Darren Dale wrote:
> > > On Wednesday 14 May 2008 01:58:37 pm Jim Bublitz wrote:
> > > > On Wednesday 14 May 2008 10:27, Darren Dale wrote:

> g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8
> -pipe -fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG
> -DQT_CORE_LIB -DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include
> -I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui
> -I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet
> -I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4
> -I/usr/X11R6/include -o sipkdecoreKSocketFactory.o
> sipkdecoreKSocketFactory.cpp
> /usr/share/sip/QtNetwork/qtcpsocket.sip:42:24: error: qtcpsocket.h: No such
> file or directory
> /usr/share/sip/QtNetwork/qtcpserver.sip:42:24: error: qtcpserver.h: No such
> file or directory
> /usr/share/sip/QtNetwork/qhostaddress.sip:46:26: error: qhostaddress.h: No
> such file or directory
> /usr/share/sip/QtNetwork/qudpsocket.sip:46:24: error: qudpsocket.h: No such
> file or directory
> /usr/share/sip/QtNetwork/qnetworkproxy.sip:42:27: error: qnetworkproxy.h:
> No such file or directory
> make[1]: *** [sipkdecoreKSocketFactory.o] Error 1
> make[1]: Leaving directory `/home/share/packages/PyKDE4-4.0.2-1/kdecore'
> make: *** [all] Error 2
>
> I searched for qtcpsocket.h and came up with:
> /usr/include/qt4/Qt/qtcpsocket.h
> /usr/include/qt4/QtNetwork/qtcpsocket.h
>
> gentoo is splitting qt-4.4 into seperately installable modules. I don't
> know if that is surprising to anyone or not, is this a nonstandard location
> for qt headers? I didn't see an option in configure.py to direct make to
> the qt headers. Have I overlooked anything?

Around line 100 in configure.py there's a Python dict where the keys are the 
module name and the values are a list of include paths - QtNetwork should be 
in the list for kdecore.

What you're showing above for an include path is:

  -I/usr/kde/4.0/include/QtNetwork

Does that path really exist? I'm not sure how configure.py is coming up with 
that - notice that you have what look like correct qt4 paths farther down, 
but none for QtNetwork.

Just from a quick look at my Qt4.3 install, it looks like the Qt/ directory 
just duplicates the files from QtNetwork/, so I don't think that Qt/ needs to 
be included.

What would help is if a) you could post a copy of the info at the beginning of 
configure.py's run - where it thinks everything is. It should be finding the 
Qt directories from your PyQt4 installation (there should be a pyqtconfig.py 
file in site-packages/ or site-packages/PyQt4 that has the paths from the 
PyQt4 install)  - it doesn't actually look for those; and b) around line 607 
in configure.py, there should be a statement:

   if incdir.startswith ('Q'):

If you could add:

   print incdir, opt_qt_inc_dir

*before* that 'if' stmt, it should indicate if QtNetwork is being added as an 
include path. A print statement after the 'if' (in it's block) would indicate 
whether the include path is being added to the Makefile.

It seems like the directory layout isn't something configure.py is expecting.

Jim


More information about the PyQt mailing list