[PyKDE] SIP/PyQt v3.2rc4 on OS X

Barron Snyder barronsnyder at mac.com
Mon Apr 29 21:06:00 BST 2002


Okay, I tried it again with v3.2rc4 following Ludger's advice and 
Dimitri's libtool directions. Things *seem* to be getting closer to a 
clean install but when I run the examples at the command line, the 
system goes away for a long while (and I get my hopes up) but then comes 
back with a bus error. I've included my "make install" and my try at 
running dclock.py just in case they are of use to anyone <g>.

-Barron


PyQt's make install:

[localhost:/Applications/pyqt-3.2rc4] 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/usr/X11R6/include -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.so 
/sw/lib/python2.2/site-packages/libqtcmodule-3.2.so
(cd /sw/lib/python2.2/site-packages && rm -f libqtcmodule.so && ln -s 
libqtcmodule-3.2.so libqtcmodule.so)
/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 ../libtool --mode=link c++ -fno-exceptions -O2   -o 
libqtcanvascmodule.la -rpath /sw/lib/python2.2/site-packages -module 
-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
rm -fr .libs/libqtcanvascmodule.la .libs/libqtcanvascmodule.* 
.libs/libqtcanvascmodule-3.2.*

*** Warning: This library needs some functionality provided by 
-lqtcmodule.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libqtcanvascmodule.  Therefore, libtool will 
create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
ar cru .libs/libqtcanvascmodule.a 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
ranlib .libs/libqtcanvascmodule.a
creating libqtcanvascmodule.la
(cd .libs && rm -f libqtcanvascmodule.la && ln -s 
../libqtcanvascmodule.la libqtcanvascmodule.la)
/Applications/pyqt-3.2rc4/qtcanvas/.libs
/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.2rc4/qtcanvas; /bin/sh ../libtool --mode=relink 
c++ -fno-exceptions -O2 -o libqtcanvascmodule.la -rpath 
/sw/lib/python2.2/site-packages -module -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.2rc4/qtcanvas/.libs
mv: rename libqtcanvascmodule-3.2.so to libqtcanvascmodule-3.2.soU: No 
such file or directory
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


And then I tried to run one of the examples but still no go...

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





On Monday, April 29, 2002, at 12:48 AM, Ludger Humbert wrote:

> Barron Snyder wrote:
>
>> Well, I went ahead and ran "make install" on PyQt with the following 
>> results:
>>
>
> ...
>
>
>> ImportError: Inappropriate file type for dynamic loading
>
> ----------->
>
>> 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
>> I tried to run one of the examples but no go...
>> [localhost:/Applications/PyQt-3.2rc4] barron% cd examples
>> [localhost:/Applications/PyQt-3.2rc4/examples] barron% python 
>> addressbook.py
>> Traceback (most recent call last):
>>   File "addressbook.py", line 7, in ?
>>     from qt import *
>>   File "/sw/lib/python2.2/site-packages/qt.py", line 46, in ?
>>     import libsip
>> ImportError: Inappropriate file type for dynamic loading
> ----------->
>
>
> The problem remains -- I you look at
> ...python-2.2/site-packages/
> you'll find some libs
> With
> 	file ...
> you can detect the type of a file
>
> If you look at
> 	libsip*
> you'll find, that there is *no*  bundle file.
>
>
> So, you have to fiddle with
> the generated "libtool" -- file as
> Dimitri
> described in
> 	http://mats.gmd.de/pipermail/pykde/2002-April/002594.html
> 	in B)
>
> The main element for producing bundle libs:
> for sip and for PyQt on the Mac OS X:
> Look for
> \\"x   ... \\
> and change it to
> \"x  ... \
> After this, you have to
> make ; make install
>
> I the meantime, I rejected rc4 and did it all with rc2 on the Mac
> and .. it works -- not perfect, e.g.
> QToolButton()  does not work.
>
>
> 	Ludger
>
>
>
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde




More information about the PyQt mailing list