Re: [PyQt] Help needed with SIP
I solved it, I was missing linking the ossimPlanetQt library in makefile.extra_libs in config.py file. Thanks for your replies. On Tue, Aug 9, 2011 at 4:59 PM, Hans-Peter Jansen wrote: > On Sunday 07 August 2011, 15:29:59 Vipul Raheja wrote: > > Hi, > > > > Thanks for your replies, Pete and Phil, I was able to fix the issues > > and build PyQt on my system by doing a few rebuilds with changes in > > them. I had earlier installed sip and PyQt using apt-get, but later I > > did the same by directly building the sources, and it worked. > > > > However, now I am facing a different issue. I was able to create a > > .so file by executing configure.oy with python and doing a make and > > make install, however, when I do an import of the library in python > > console, it gives me this error: http://paste.debian.net/125358/ (I > > hope paste.debian is fine, if not, kindly suggest an alternate way) > > Hard to say, what's going on. I guess, it cannot locate the ossim.so > lib, at least not the version, that you linked to. > > Maybe, it's just missing a call to ldconfig. > > Try to check the python site libs with ldd, and compare with the build > logs. > > If that stuff is publically available somewhere, please provide a > detailed description on what you did, which versions, etc., and I might > try to reproduce your issue in a couple of days.. > > Pete > -- *Vipul Raheja* Senior Undergraduate Computer Science and Engineering (Dual) Lab for Spatial Informatics IIIT Hyderabad ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help needed with SIP
On Sunday 07 August 2011, 15:29:59 Vipul Raheja wrote: > Hi, > > Thanks for your replies, Pete and Phil, I was able to fix the issues > and build PyQt on my system by doing a few rebuilds with changes in > them. I had earlier installed sip and PyQt using apt-get, but later I > did the same by directly building the sources, and it worked. > > However, now I am facing a different issue. I was able to create a > .so file by executing configure.oy with python and doing a make and > make install, however, when I do an import of the library in python > console, it gives me this error: http://paste.debian.net/125358/ (I > hope paste.debian is fine, if not, kindly suggest an alternate way) Hard to say, what's going on. I guess, it cannot locate the ossim.so lib, at least not the version, that you linked to. Maybe, it's just missing a call to ldconfig. Try to check the python site libs with ldd, and compare with the build logs. If that stuff is publically available somewhere, please provide a detailed description on what you did, which versions, etc., and I might try to reproduce your issue in a couple of days.. Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help needed with SIP
Hi, Thanks for your replies, Pete and Phil, I was able to fix the issues and build PyQt on my system by doing a few rebuilds with changes in them. I had earlier installed sip and PyQt using apt-get, but later I did the same by directly building the sources, and it worked. However, now I am facing a different issue. I was able to create a .so file by executing configure.oy with python and doing a make and make install, however, when I do an import of the library in python console, it gives me this error: http://paste.debian.net/125358/ (I hope paste.debian is fine, if not, kindly suggest an alternate way) Here is my config.py file : http://paste.debian.net/125359/ Help will be greatly appreciated. Thanks and regards, Vipul Raheja On Sun, Aug 7, 2011 at 4:22 AM, Hans-Peter Jansen wrote: > On Saturday 06 August 2011, 23:28:05 Vipul Raheja wrote: > > Hi, > > > > Thanks for your reply Phil. > > > > I had earlier installed SIP and PyQt4 through apt-get in Ubuntu, but > > was still getting the same problem since there was no QtGuimod.sip > > file present on my system. > > Probably, your local sip/PyQt maintainer provides some matching -devel > packages somewhere, since without these files, you cannot build any > descendant packages ({python-}qscintilla, PyKDE, PyQwt, ..). > > > I removed them and tried installing SIP > > and PyQt4 again from their sources. I am getting the following error > > now while building PyQt4 and cannot find any answers over the web : > > http://pastebin.com/apSq180u > > Don't provide build logs via paste bin services, please. When they > vanish, followers by search engines will fail. > > This looks like the usual installed by packetmanager/from source > dichotomy (for package sip in your case). > > Pete > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help needed with SIP
On Sun, 7 Aug 2011 02:58:05 +0530, Vipul Raheja wrote: > Hi, > > Thanks for your reply Phil. > > I had earlier installed SIP and PyQt4 through apt-get in Ubuntu, but was > still getting the same problem since there was no QtGuimod.sip file present > on my system. I removed them and tried installing SIP and PyQt4 again from > their sources. I am getting the following error now while building PyQt4 > and > cannot find any answers over the web : http://pastebin.com/apSq180u You probably have bits of the older version of SIP still installed. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help needed with SIP
On Saturday 06 August 2011, 23:28:05 Vipul Raheja wrote: > Hi, > > Thanks for your reply Phil. > > I had earlier installed SIP and PyQt4 through apt-get in Ubuntu, but > was still getting the same problem since there was no QtGuimod.sip > file present on my system. Probably, your local sip/PyQt maintainer provides some matching -devel packages somewhere, since without these files, you cannot build any descendant packages ({python-}qscintilla, PyKDE, PyQwt, ..). > I removed them and tried installing SIP > and PyQt4 again from their sources. I am getting the following error > now while building PyQt4 and cannot find any answers over the web : > http://pastebin.com/apSq180u Don't provide build logs via paste bin services, please. When they vanish, followers by search engines will fail. This looks like the usual installed by packetmanager/from source dichotomy (for package sip in your case). Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help needed with SIP
Hi, Thanks for your reply Phil. I had earlier installed SIP and PyQt4 through apt-get in Ubuntu, but was still getting the same problem since there was no QtGuimod.sip file present on my system. I removed them and tried installing SIP and PyQt4 again from their sources. I am getting the following error now while building PyQt4 and cannot find any answers over the web : http://pastebin.com/apSq180u Kindly help. Thanks and regards, Vipul Raheja On Sat, Aug 6, 2011 at 9:19 PM, Phil Thompson wrote: > On Sat, 6 Aug 2011 20:45:19 +0530, Vipul Raheja > wrote: > > Hi all, > > > > I am trying to wrap the Qt module of OSSIM, an image-processing tool. I > was > > just beginning to dive into the wrapping process and created a .sip file > to > > wrap a class, ossimPlanetQtAboutDialog. But I am getting the following > > error > > on executing the sip command: > > > > vipul@vipul-laptop:~/ossim-svn/src/pyossim/sip$ sip -I /usr/include/qt4 > -c > > . > > pyossim.sip > > sip: /usr/include/qt4/QtGui/QWidget:1: syntax error > > > > Here is the file ossimPlanetAboutDialog.h that I am trying to wrap: > > > > > > #ifndef ossimPlanetAboutDialog_HEADER > > #define ossimPlanetAboutDialog_HEADER > > #include > > #include > > #include > > > > class OSSIMPLANETQT_DLL ossimPlanetQtAboutDialog : public QDialog, > public > > Ui::ossimPlanetQtAboutDialog > > { > > public: > > ossimPlanetQtAboutDialog(QWidget* parent); > > }; > > > > #endif > > > > > > > > > > Here is the file pyossim.sip that I am trying to compile: > > > > > > %Module pyossim 0 > > > > %Import QtGui/QWidget > > %Import QtGui/QDialog > > These are Qt .h files not .sip files. > > Do something like... > > %Import QtGui/QtGuimod.sip > > Phil > ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help needed with SIP
On Sat, 6 Aug 2011 20:45:19 +0530, Vipul Raheja wrote: > Hi all, > > I am trying to wrap the Qt module of OSSIM, an image-processing tool. I was > just beginning to dive into the wrapping process and created a .sip file to > wrap a class, ossimPlanetQtAboutDialog. But I am getting the following > error > on executing the sip command: > > vipul@vipul-laptop:~/ossim-svn/src/pyossim/sip$ sip -I /usr/include/qt4 -c > . > pyossim.sip > sip: /usr/include/qt4/QtGui/QWidget:1: syntax error > > Here is the file ossimPlanetAboutDialog.h that I am trying to wrap: > > #ifndef ossimPlanetAboutDialog_HEADER > #define ossimPlanetAboutDialog_HEADER > #include > #include > #include > > class OSSIMPLANETQT_DLL ossimPlanetQtAboutDialog : public QDialog, public > Ui::ossimPlanetQtAboutDialog > { > public: > ossimPlanetQtAboutDialog(QWidget* parent); > }; > > #endif > > > > Here is the file pyossim.sip that I am trying to compile: > > %Module pyossim 0 > > %Import QtGui/QWidget > %Import QtGui/QDialog These are Qt .h files not .sip files. Do something like... %Import QtGui/QtGuimod.sip Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Help needed with SIP
Hi all, I am trying to wrap the Qt module of OSSIM, an image-processing tool. I was just beginning to dive into the wrapping process and created a .sip file to wrap a class, ossimPlanetQtAboutDialog. But I am getting the following error on executing the sip command: vipul@vipul-laptop:~/ossim-svn/src/pyossim/sip$ sip -I /usr/include/qt4 -c . pyossim.sip sip: /usr/include/qt4/QtGui/QWidget:1: syntax error Here is the file ossimPlanetAboutDialog.h that I am trying to wrap: #ifndef ossimPlanetAboutDialog_HEADER #define ossimPlanetAboutDialog_HEADER #include #include #include class OSSIMPLANETQT_DLL ossimPlanetQtAboutDialog : public QDialog, public Ui::ossimPlanetQtAboutDialog { public: ossimPlanetQtAboutDialog(QWidget* parent); }; #endif Here is the file pyossim.sip that I am trying to compile: %Module pyossim 0 %Import QtGui/QWidget %Import QtGui/QDialog class ossimPlanetQtAboutDialog : QDialog { %TypeHeaderCode #include #include %End public: ossimPlanetQtAboutDialog (QWidget *parent /TransferThis/ = 0); }; Kindly help. Thanks and regards, Vipul Raheja ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] help needed with SIP
Hello, I'm trying to use SIP to wrap a Qt widget provided by the PLplot plotting library. The Qt widget driver library is located here: /usr/local/lib/plplot5.9.2/driversd/qt.so The plplot library itself is located here: /usr/local/lib/libplplotd.so And the header file for qt.so in here: /usr/local/include/plplot/qt.h Configure seems to work ok, but then the make fails: hbabc...@hbabcock-laptop:~/Python/qt-test/v3$ python plplot_pyqt_configure.py hbabc...@hbabcock-laptop:~/Python/qt-test/v3$ make g++ -c -I/usr/include/qt4/QtGui -pipe -fPIC -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/usr/X11R6/include -o sipplplot_pyqtcmodule.o sipplplot_pyqtcmodule.cpp sipplplot_pyqtcmodule.cpp: In function ‘PyObject* func_plfreeqtdev(PyObject*, PyObject*)’: sipplplot_pyqtcmodule.cpp:88: error: ‘plfreeqtdev’ was not declared in this scope sipplplot_pyqtcmodule.cpp: In function ‘PyObject* func_plsetqtdev(PyObject*, PyObject*)’: sipplplot_pyqtcmodule.cpp:109: error: ‘QtExtWidget’ was not declared in this scope sipplplot_pyqtcmodule.cpp:109: error: ‘a0’ was not declared in this scope sipplplot_pyqtcmodule.cpp:114: error: ‘plsetqtdev’ was not declared in this scope make: *** [sipplplot_pyqtcmodule.o] Error 1 It looks to me like maybe it is not finding the qt.h file? This is the sip file: %Module plplot_pyqt 0 %Import QtCore/QtCoremod.sip %Import QtGui/QtGuimod.sip class QtPLDriver { %TypeHeaderCode #include "plplot/qt.h" %End public: QtPLDriver(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y); virtual ~QtPLDriver(); }; class QtPLWidget: QWidget, QtPLDriver { %TypeHeaderCode #include "plplot/qt.h" %End public: QtPLWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0); virtual ~QtPLWidget(); }; class QtExtWidget: QtPLWidget { %TypeHeaderCode #include "plplot/qt.h" %End public: QtExtWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0); virtual ~QtExtWidget(); }; void plsetqtdev(QtExtWidget* widget); void plfreeqtdev(); And this is the configure file: import os import sipconfig from PyQt4 import pyqtconfig # The name of the SIP build file generated by SIP and used by the build # system. build_file = "plplot_pyqt.sbf" # Get the PyQt configuration information. config = pyqtconfig.Configuration() # Get the extra SIP flags needed by the imported qt module. Note that # this normally only includes those flags (-x and -t) that relate to SIP's # versioning system. qt_sip_flags = config.pyqt_sip_flags # Run SIP to generate the code. Note that we tell SIP where to find the qt # module's specification files using the -I flag. os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", config.pyqt_sip_dir, qt_sip_flags, "plplot_pyqt.sip"])) # We are going to install the SIP specification file for this module and # its configuration module. installs = [] installs.append(["plplot_pyqt.sip", os.path.join(config.default_sip_dir, "plplot_pyqt")]) # Create the Makefile. The QtModuleMakefile class provided by the # pyqtconfig module takes care of all the extra preprocessor, compiler and # linker flags needed by the Qt library. makefile = pyqtconfig.QtCoreModuleMakefile( configuration=config, build_file=build_file, installs=installs ) # Add the library we are wrapping. The name doesn't include any platform # specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the # ".dll" extension on Windows). #makefile.LFLAGS.append("-L../c++") makefile.extra_cxxflags = ["-I/usr/include/qt4/QtGui"] makefile.extra_libs = ["/usr/local/lib/plplot5.9.2/driversd/qt.so", "plplotd"] # Generate the Makefile itself. makefile.generate() Any ideas about what I am doing wrong would be much appreciated. Thanks! -Hazen ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt