[PyKDE] PyQt v3.2 on OS X

Barron Snyder barronsnyder at mac.com
Tue May 7 05:52:00 BST 2002


I tried the "--without-x" flag. Everything compiles okay except the 
final "make install" for PyQt  (see below) and I still get a "Bus error" 
when I try to run anything that uses Qt like this "hello.py" script from 
Boudewijn Rempt's book (p 83):

[localhost:~/PythonProjects] barron% python -v hello.py
# /sw/lib/python2.2/site.pyc matches /sw/lib/python2.2/site.py
import site # precompiled from /sw/lib/python2.2/site.pyc
# /sw/lib/python2.2/os.pyc matches /sw/lib/python2.2/os.py
import os # precompiled from /sw/lib/python2.2/os.pyc
import posix # builtin
# /sw/lib/python2.2/posixpath.pyc matches /sw/lib/python2.2/posixpath.py
import posixpath # precompiled from /sw/lib/python2.2/posixpath.pyc
# /sw/lib/python2.2/stat.pyc matches /sw/lib/python2.2/stat.py
import stat # precompiled from /sw/lib/python2.2/stat.pyc
# /sw/lib/python2.2/UserDict.pyc matches /sw/lib/python2.2/UserDict.py
import UserDict # precompiled from /sw/lib/python2.2/UserDict.pyc
Python 2.2 (#1, Apr 17 2002, 16:11:12)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
# /sw/lib/python2.2/site-packages/qt.pyc matches 
/sw/lib/python2.2/site-packages/qt.py
import qt # precompiled from /sw/lib/python2.2/site-packages/qt.pyc
import libsip # dynamically loaded from /sw/lib/python2.2/site-
packages/libsip.so
import libqtc # dynamically loaded from /sw/lib/python2.2/site-
packages/libqtcmodule.so
Bus error

make install still gives a few errors:
[localhost:/Applications/pyqt-3.2] barron% sudo make install
Password:
Making install in features
./sip_helper >../sipQtFeatures.h
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
Making install in qt
c++ -E -I/sw/include/python2.2  -I/Applications/QtMacEval/include 
-DQT_THREAD_SUPPORT -I.. sipqtProxyqt.h >moc_sipqtProxyqt.h
sipqtProxyqt.h:39: undefined type, found `class'
sipqtProxyqt.h:39: illegal external declaration, missing `;' after 
`sipProxyqt'
sipqtProxyqt.h:39: undefined type, found `public'
sipqtProxyqt.h:39: illegal external declaration, missing `;' after 
`sipProxy'
sipqtProxyqt.h:41: undefined type, found `Q_OBJECT'
sipqtProxyqt.h:43: illegal external declaration, missing `;' after 
`public'
sipqtProxyqt.h:46: undefined type, found `public'
sipqtProxyqt.h:46: illegal external declaration, missing `;' after 
`slots'
sipqtProxyqt.h:48: undefined type, found `QAction'
sipqtProxyqt.h:50: syntax error, found `&'
sipqtProxyqt.h:50: illegal function definition, found `)'
sipqtProxyqt.h:51: syntax error, found `&'
sipqtProxyqt.h:51: illegal function definition, found `)'
sipqtProxyqt.h:52: syntax error, found `&'
sipqtProxyqt.h:52: illegal function definition, found `)'
sipqtProxyqt.h:54: syntax error, found `&'
sipqtProxyqt.h:54: illegal function definition, found `)'
sipqtProxyqt.h:58: undefined type, found `QIconViewItem'
sipqtProxyqt.h:58: syntax error, found `&'
sipqtProxyqt.h:58: illegal function definition, found `)'
sipqtProxyqt.h:61: undefined type, found `QDropEvent'
sipqtProxyqt.h:61: syntax error, found `&'
sipqtProxyqt.h:61: illegal function definition, found `)'
sipqtProxyqt.h:64: undefined type, found `QIconViewItem'
sipqtProxyqt.h:64: syntax error, found `&'
sipqtProxyqt.h:64: illegal function definition, found `)'
sipqtProxyqt.h:67: undefined type, found `QIconViewItem'
sipqtProxyqt.h:67: syntax error, found `&'
sipqtProxyqt.h:67: illegal function definition, found `)'
sipqtProxyqt.h:70: undefined type, found `QIconViewItem'
sipqtProxyqt.h:72: undefined type, found `QListBoxItem'
sipqtProxyqt.h:72: syntax error, found `&'
sipqtProxyqt.h:72: illegal function definition, found `)'
sipqtProxyqt.h:73: undefined type, found `QListBoxItem'
sipqtProxyqt.h:73: syntax error, found `&'
sipqtProxyqt.h:73: illegal function definition, found `)'
sipqtProxyqt.h:74: undefined type, found `QListBoxItem'
sipqtProxyqt.h:75: undefined type, found `QListViewItem'
sipqtProxyqt.h:76: undefined type, found `QListViewItem'
sipqtProxyqt.h:76: syntax error, found `&'
sipqtProxyqt.h:76: illegal function definition, found `)'
sipqtProxyqt.h:77: undefined type, found `QDropEvent'
sipqtProxyqt.h:78: undefined type, found `QListViewItem'
sipqtProxyqt.h:78: syntax error, found `&'
sipqtProxyqt.h:78: illegal function definition, found `)'
sipqtProxyqt.h:79: undefined type, found `QListViewItem'
sipqtProxyqt.h:79: syntax error, found `&'
sipqtProxyqt.h:79: illegal function definition, found `)'
sipqtProxyqt.h:80: undefined type, found `QListViewItem'
sipqtProxyqt.h:81: undefined type, found `QDockWindow'
sipqtProxyqt.h:82: syntax error, found `&'
sipqtProxyqt.h:82: illegal function definition, found `)'
sipqtProxyqt.h:83: syntax error, found `&'
sipqtProxyqt.h:83: illegal function definition, found `)'
sipqtProxyqt.h:84: undefined type, found `QTextCursor'
sipqtProxyqt.h:85: syntax error, found `::'
sipqtProxyqt.h:85: illegal function definition, found `)'
sipqtProxyqt.h:86: syntax error, found `&'
sipqtProxyqt.h:86: illegal function definition, found `)'
sipqtProxyqt.h:87: syntax error, found `&'
sipqtProxyqt.h:87: illegal function definition, found `)'
sipqtProxyqt.h:89: syntax error, found `::'
sipqtProxyqt.h:89: illegal function definition, found `)'
sipqtProxyqt.h:90: syntax error, found `::'
sipqtProxyqt.h:90: illegal function definition, found `)'
sipqtProxyqt.h:93: syntax error, found `&'
sipqtProxyqt.h:93: illegal function definition, found `)'
sipqtProxyqt.h:96: syntax error, found `&'
sipqtProxyqt.h:96: illegal function definition, found `)'
sipqtProxyqt.h:99: undefined type, found `QNetworkOperation'
sipqtProxyqt.h:102: syntax error, found `&'
sipqtProxyqt.h:102: illegal function definition, found `)'
sipqtProxyqt.h:105: syntax error, found `&'
sipqtProxyqt.h:105: illegal function definition, found `)'
sipqtProxyqt.h:108: undefined type, found `QNetworkOperation'
sipqtProxyqt.h:111: syntax error, found `&'
sipqtProxyqt.h:111: illegal function definition, found `)'
sipqtProxyqt.h:114: syntax error, found `&'
sipqtProxyqt.h:114: illegal function definition, found `)'
sipqtProxyqt.h:115: undefined type, found `QWidget'
sipqtProxyqt.h:116: undefined type, found `QObject'
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.. 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
/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/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 -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 Monday, May 6, 2002, at 04:39  AM, Phil Thompson wrote:

> Barron Snyder wrote:
>> I only have this package installed (xfree86-base - XFree86 libraries,
>> utilities, clients and data). Do I need the server as well
>> (xfree86-rootless)?
>
> No - you don't need X at all. Try running configure using "--without-x".
>
> Phil




More information about the PyQt mailing list