[vtk-developers] building w/ sip, Qt error

Eric E. Monson emonson at cs.duke.edu
Mon Aug 23 14:19:15 EDT 2010


Hey Randy,

So, how did you build PyQt? I haven't tried all of this with Qt 4.7, but I got it all to work with 4.6.2. I configured Qt with:

./configure -release -arch x86_64 -cocoa

and did a "sudo make install" into /usr/local/Trolltech/Qt-4.6.2. My PATH environment variable includes the Qt-4.6.2/bin directory, and then I built SIP and PyQt4 with:

SIP-4.10

python configure.py --arch x86_64
make
sudo make install

PyQt-mac-gpl-4.7

python configure.py --use-arch x86_64
make
sudo make install

Then, my settings for VTK/Python/SIP stuff are:

SIP_EXECUTABLE:FILEPATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin/sip
SIP_INCLUDE_DIR:PATH=/System/Library/Frameworks/Python.framework/Headers
SIP_PYQT_DIR:PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/share/sip/PyQt4

Good luck,
-Eric


On Aug 23, 2010, at 10:56 AM, Randy Heiland wrote:

> Actually, I misspoke - I guess cmake automagically sets the SIP_PYQT_DIR to be the path that you listed.  I ran things again and got the same QFileIconProvider undefined error.  I also tried setting this cmake keyword to one of the these:
> SIP_INCLUDE_DIR:PATH=/System/Library/Frameworks/Python.framework/Headers
> SIP_INCLUDE_DIR:PATH=/usr/local/Trolltech/Qt-4.7.0/include/QtGui
> SIP_INCLUDE_DIR:PATH=/usr/local/Trolltech/Qt-4.7.0/include
> 
> and get the same undefined error.  Googling, I see something about needing a "-t" flag to sip(?) to specify the version of Qt (I'm trying out the 4.7 beta).  Wasn't sure if that was buried somewhere in cmake or not.  I'm going to attempt a verbose build now...
> 
> -Randy
> 
> On Aug 22, 2010, at 12:01 PM, <vtk-developers-request at vtk.org> wrote:
>> Message: 2
>> Date: Sat, 21 Aug 2010 19:18:14 -0600
>> From: Clinton Stimpson <clinton at elemtech.com>
>> Subject: Re: [vtk-developers] building w/ sip, Qt errors
>> To: vtk-developers at vtk.org
>> Message-ID: <4C707AD6.3070506 at elemtech.com>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> 
>> 
>> Shouldn't you have this?
>> 
>> SIP_PYQT_DIR:PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/share/sip/PyQt4
>> 
>> Its not complaining about the C++ header from your Qt installation.  The 
>> error is coming from .sip files.
>> 
>> Clint
>> 
>> On 08/21/2010 05:52 PM, Randy Heiland wrote:
>>> Trying to build recent git (8/20/10) w/ sip:  -DVTK_USE_QT=ON   -DVTK_WRAP_PYTHON=ON       -DVTK_WRAP_PYTHON_SIP=ON   -DSIP_EXECUTABLE=/System/Library/Frameworks/Python.framework/Versions/2.6/bin/sip ...
>>> 
>>> and get the following compile error:
>>> 
>>> [ 90%] Built target QVTK
>>> [ 90%] Generating sipQVTKPythonQVTKWidget.cpp, sipQVTKPythonQVTKInteractor.cpp, sipQVTKPythonQVTKInteractorAdapter.cpp, sipQVTKPythonvtkQtAbstractModelAdapter.cpp, sipQVTKPythonvtkQtAnnotationLayersModelAdapter.cpp, sipQVTKPythonvtkQtTableModelAdapter.cpp, sipQVTKPythonvtkQtTreeModelAdapter.cpp, sipQVTKPythoncmodule.cpp
>>> sip: QFileIconProvider is undefined
>>> make[2]: *** [GUISupport/Qt/sipQVTKPythonQVTKWidget.cpp] Error 1
>>> make[1]: *** [GUISupport/Qt/CMakeFiles/QVTKPython.dir/all] Error 2
>>> 
>>> in my cmakecache:
>>> QT_QTGUI_INCLUDE_DIR:PATH=/usr/local/Trolltech/Qt-4.7.0/include/QtGui
>>> SIP_PYQT_DIR:PATH=/Users/heiland/dev/Python/PyQt-mac-gpl-4.7.4/sip
>>> 
>>> and indeed I have:
>>> -rw-r--r--@ 1 root  wheel  31 Aug 19 17:30 /usr/local/Trolltech/Qt-4.7.0/include/QtGui/QFileIconProvider
>>> 
>>> ls /Users/heiland/dev/Python/PyQt-mac-gpl-4.7.4/sip
>>> Qt/            QtDesigner/    QtMultimedia/  QtScript/      QtSvg/         QtXml/         pyqt-gpl.sip
>>> QtAssistant/   QtGui/         QtNetwork/     QtScriptTools/ QtTest/        QtXmlPatterns/
>>> QtCore/        QtHelp/        QtOpenGL/      QtSql/         QtWebKit/      phonon/
>>> 
>>> Also have env var:
>>> QTDIR=/usr/local/Trolltech/Qt-4.7.0
>>> 
>>> 
>>> Saw the thread at  http://comments.gmane.org/gmane.comp.lib.vtk.user/50529
>>> but unsure of definite solution.  I've built Qt 4.7.0beta2 from source.
>>> 
>>> thanks, Randy
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>> 
>> 
>> 
>> 
>> ------------------------------
>> 
>> _______________________________________________
>> vtk-developers mailing list
>> vtk-developers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>> 
>> 
>> End of vtk-developers Digest, Vol 76, Issue 29
>> **********************************************
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers




More information about the vtk-developers mailing list