[PyQt] configuring pykde4, error
Darren Dale
darren.dale at cornell.edu
Thu May 15 13:26:35 BST 2008
On Wednesday 14 May 2008 06:54:57 pm Jim Bublitz wrote:
> 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?
No, it doesn't exist. I'm not sure where that location came from. Gentoo
installs kde into /usr/kde/{3.5,4.0}, and I need to run configure.py with
something like "-k /usr/kde/4.0". I also
tried "-k /usr -o /usr/kde/4.0/include/ -n /usr/kde/4.0/lib64/", but that
yields the same result.
> 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;
My pyqtconfig is located in /usr/lib/python2.5/site-packages/. Here is the
output of $ python configure.py -k /usr/kde/4.0/:
package /usr/lib64/python2.5/site-packages/PyKDE4
PyKDE version 4.0.2
-------
Python include directory is /usr/include/python2.5
Python version is 2.5.2
sip version is 4.7.5 (4.7.5)
Qt directory is /usr
Qt version is 4.4.0
PyQt directory is /usr/share/sip
PyQt version is 4.4 (4.4.0)
gcc version 4.2.3
no concatenation
if extra_cflags:
makefile.extra_cflags.append(extra_cflags)
if extra_cxxflags:
makefile.extra_cxxflags.append(extra_cxxflags)
if opt_dep_warnings == 0:
makefile.extra_cflags.append ("-Wno-deprecated-declarations")
makefile.extra_cxxflags.append ("-Wno-deprecated-declarations")
if extra_define:
makefile.extra_defines.append(extra_define)
makefile.extra_include_dirs.append (os.path.join ("..", "extra",
kde_version_extra))
makefile.extra_include_dirs.append (opt_kdeincdir)
if pykde_includes [mname]:
for incdir in pykde_includes [mname]:
makefile.extra_include_dirs.append (os.path.join (opt_kdeincdir,
incdir))
if extra_include_dir:
makefile.extra_include_dirs.append(extra_include_dir)
if extra_lflags:
makefile.extra_lflags.append(extra_lflags)
makefile.extra_lib_dirs.append (opt_kdelibdir)
if extra_lib_dir:
makefile.extra_lib_dirs.append(extra_lib_dir)
makefile.extra_libs.append(extra_lib)
if pykde_libs [mname]:
for lib in pykde_libs [mname]:
makefile.extra_libs.append (lib)
if sipcfg.sip_version < 0x040000 and imports:
# Inter-module links.
for im in imports:
makefile.extra_lib_dirs.insert(0, os.path.join("..", im))
KDE base directory is /usr/kde/4.0/
KDE include directory is /usr/kde/4.0/include
KDE lib directory is /usr/kde/4.0/lib64
lib directory is lib
KDE version is 4.0.3 (0x40003)
PyKDE modules will be installed in /usr/lib64/python2.5/site-packages/PyKDE4
PyKDE .sip files will be installed in /usr/share/sip/PyKDE4
PyKDE modules to be built:
kdecore solid kdeui kio kutils kparts khtml
> 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.
I think I must have a different version of configure.py than you are
expecting. I'm using the one that comes with pykde-4.0.2-1 at the
riverbankcomputing website. It doesnt have a variable called opt_qt_inc_dir,
nor a statement like "if incdir.startswith ('Q')". Here is part of
configure.py, starting at line 587:
if extra_cflags:
makefile.extra_cflags.append(extra_cflags)
if extra_cxxflags:
makefile.extra_cxxflags.append(extra_cxxflags)
if opt_dep_warnings == 0:
makefile.extra_cflags.append ("-Wno-deprecated-declarations")
makefile.extra_cxxflags.append ("-Wno-deprecated-declarations")
if extra_define:
makefile.extra_defines.append(extra_define)
makefile.extra_include_dirs.append (os.path.join ("..", "extra",
kde_version_extra))
makefile.extra_include_dirs.append (opt_kdeincdir)
if pykde_includes [mname]:
for incdir in pykde_includes [mname]:
makefile.extra_include_dirs.append (os.path.join (opt_kdeincdir,
incdir))
if extra_include_dir:
makefile.extra_include_dirs.append(extra_include_dir)
if extra_lflags:
makefile.extra_lflags.append(extra_lflags)
makefile.extra_lib_dirs.append (opt_kdelibdir)
if extra_lib_dir:
makefile.extra_lib_dirs.append(extra_lib_dir)
makefile.extra_libs.append(extra_lib)
if pykde_libs [mname]:
for lib in pykde_libs [mname]:
makefile.extra_libs.append (lib)
if sipcfg.sip_version < 0x040000 and imports:
# Inter-module links.
for im in imports:
makefile.extra_lib_dirs.insert(0, os.path.join("..", im))
Darren
More information about the PyQt
mailing list