[PyKDE] PyQt v3.2 on OS X

Barron Snyder barronsnyder at mac.com
Sun May 5 18:33:00 BST 2002


Thanks for posting PyQt for the OS X eval of Qt. Before I purchase a 
TrollTech license, I want to see it work with Python and PyQt (I 
obviously won't be using it with c/c++ as shown by my complete ignorance 
of these configure/make/make install errors <g>.). I really appreciate 
all the effort going into making PyQt work with OS X.

I tried to install this version. Configure and make went well but make 
install had some problems. The "Libraries have been installed" message 
appeared which I took as a good sign, but it appeared twice. Is that 
normal? I also received a few errors (see below).

I tried to run the simple "hello world" example from Boudewijn Rempt's 
book "GUI Programming with Python Using the Qt Toolkit" (p 83):

------------------------------------------------------------
import sys
from qt import *

app = QApplication(sys.argv)
button = QPushButton("Hello World", None)
app.setMainWidget(button)
button.show()
app.exec_loop()
------------------------------------------------------------

However, I receive a "bus error". I get the same error when I try to run 
programs from the PyQt examples directory:

[localhost:~/PythonProjects] barron% python hello.py
Bus error

[localhost:/Applications/pyqt-3.2/examples] barron% python addressbook.py
Bus error

What does "Bus error" mean in this context?

Thanks,
Barron

output from make install:

...
cpp-precomp: warning: errors during smart preprocessing, retrying in 
basic mode
/Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h
/bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages
  /bin/sh ../libtool --mode=install /usr/bin/install -c  libqtcmodule.la 
/sw/lib/python2.2/site-packages/libqtcmodule.la
/usr/bin/install -c .libs/libqtcmodule-3.2.dylib 
/sw/lib/python2.2/site-packages/libqtcmodule-3.2.dylib
(cd /sw/lib/python2.2/site-packages && rm -f libqtcmodule.dylib && ln -s 
libqtcmodule-3.2.dylib libqtcmodule.dylib)
/usr/bin/install -c .libs/libqtcmodule.lai 
/sw/lib/python2.2/site-packages/libqtcmodule.la
----------------------------------------------------------------------
Libraries have been installed in:
    /sw/lib/python2.2/site-packages

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
    - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
      during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages
  /usr/bin/install -c -m 644 qt.py /sw/lib/python2.2/site-packages/qt.py
make  install-data-hook
(cd /tmp; PYTHONPATH=/sw/lib/python2.2/site-
packages:/sw/lib/python2.2/site-packages /sw/bin/python -c "import qt")
Making install in qtcanvas
c++ -E -I/sw/include/python2.2  -I/Applications/QtMacEval/include 
-DQT_THREAD_SUPPORT  -I/usr/X11R6/include -I.. 
sipqtcanvasProxyqtcanvas.h >moc_sipqtcanvasProxyqtcanvas.h
sipqtcanvasProxyqtcanvas.h:39: undefined type, found `class'
sipqtcanvasProxyqtcanvas.h:39: illegal external declaration, missing `;' 
after `sipProxyqtcanvas'
sipqtcanvasProxyqtcanvas.h:39: undefined type, found `public'
sipqtcanvasProxyqtcanvas.h:39: illegal external declaration, missing `;' 
after `sipProxy'
sipqtcanvasProxyqtcanvas.h:41: undefined type, found `Q_OBJECT'
sipqtcanvasProxyqtcanvas.h:43: illegal external declaration, missing `;' 
after `public'
sipqtcanvasProxyqtcanvas.h:46: undefined type, found `public'
sipqtcanvasProxyqtcanvas.h:46: illegal external declaration, missing `;' 
after `slots'
sipqtcanvasProxyqtcanvas.h:48: undefined type, found `QObject'
cpp-precomp: warning: errors during smart preprocessing, retrying in 
basic mode
/Applications/QtMacEval/bin/moc -o sipqtcanvasProxyqtcanvas.moc 
moc_sipqtcanvasProxyqtcanvas.h
/bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages
  /bin/sh ../libtool --mode=install /usr/bin/install -c  
libqtcanvascmodule.la /sw/lib/python2.2/site-
packages/libqtcanvascmodule.la
libtool: install: warning: relinking `libqtcanvascmodule.la'
cd /Applications/PyQt-3.2/qtcanvas; /bin/sh ../libtool --mode=relink c++ 
-fno-exceptions -O2 -o libqtcanvascmodule.la -rpath 
/sw/lib/python2.2/site-packages -release 3.2 qtcanvascmodule.lo 
sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo 
sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo 
sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo 
sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo 
sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo 
sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo 
sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L../qt 
-lqtcmodule -L/sw/lib/python2.2/site-packages 
-L/Applications/QtMacEval/lib -lsip -lqt-mt -L/usr/X11R6/lib -lSM -lICE 
-lX11
/Applications/PyQt-3.2/qtcanvas/.libs
c++ -dynamiclib -flat_namespace -undefined suppress -o 
.libs/libqtcanvascmodule-3.2.dylib  qtcanvascmodule.lo 
sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo 
sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo 
sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo 
sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo 
sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo 
sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo 
sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo  
-L/usr/X11R6/lib -L/Applications/QtMacEval/lib 
-L/sw/lib/python2.2/site-packages -L/Applications/PyQt-3.2/qt 
/sw/lib/python2.2/site-packages/libqtcmodule.dylib 
/sw/lib/python2.2/site-packages/libsip.so -lqt-mt -lSM -lICE -lX11 -lc 
-install_name  /sw/lib/python2.2/site-
packages/libqtcanvascmodule-3.2.dylib
ld: /sw/lib/python2.2/site-packages/libsip.so is input for the dynamic 
link editor, is not relocatable by the static link editor again
/usr/bin/libtool: internal link edit command failed
libtool: install: error: relink `libqtcanvascmodule.la' with the above 
command before installing it
----------------------------------------------------------------------
Libraries have been installed in:
    /sw/lib/python2.2/site-packages

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
    - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
      during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages
  /usr/bin/install -c -m 644 qtcanvas.py /sw/lib/python2.2/site-
packages/qtcanvas.py
make  install-data-hook
(cd /tmp; PYTHONPATH=/sw/lib/python2.2/site-
packages:/sw/lib/python2.2/site-packages /sw/bin/python -c "import 
qtcanvas")
Traceback (most recent call last):
   File "<string>", line 1, in ?
   File "/sw/lib/python2.2/site-packages/qtcanvas.py", line 41, in ?
     import libqtcanvasc
ImportError: No module named libqtcanvasc
make[3]: *** [install-data-hook] Error 1
make[2]: *** [install-data-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1



On Sunday, May 5, 2002, at 04:09 AM, Phil Thompson wrote:

> Barron Snyder wrote:
>>
>> When running the new v3.2 configure for PyQt, it checks for the version
>> of Qt installed. The evaluation version of Qt for Mac OS X that
>> TrollTech makes available is 3.0.2 yet PyQt is insisting on 3.0.4 or
>> higher (the release candidates allowed for 3.0.2).
>>
>> ...
>> checking for Qt version >= 304 and < 400... configure: error:
>> "incompatible Qt version"
>>
>> Will PyQt work with Qt 3.0.2? If so, do I need to change the configure
>> script so that it doesn't error out?
>
> The generated source package does not support Qt 3.0.2 - but I can
> easily generate one that does. Check the web site when you read this.
>
> Despite what Trolltech usually say, Qt versions are often not backwards
> compatible.
>
> Phil




More information about the PyQt mailing list