[Kde-bindings] PyKDE 4.14 fails to build on OS X

Hanspeter Niederstrasser fink at snaggledworks.com
Mon Sep 1 23:31:44 UTC 2014


I have KDE 4.14.0 running on OS X 10.9 with no real problems.  When I 
try to build PyKDE, I get the following errors.  The system has 
Qt-4.8.6, PyQt-4.11, and SIP-4.16.1.

PyKDE first fails with this error:

/sw/var/lib/fink/path-prefix-libcxx/g++  -MD  -DQT_CORE_LIB -DQT_GUI_LIB 
-DSIP_PROTECTED_IS_PUBLIC -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API 
-D_REENTRANT -Dprotected=public -Dpython_module_PyKDE4_akonadi_EXPORTS 
-fno-common -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align 
-Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security 
-Woverloaded-virtual -fno-common -fvisibility=hidden -Werror=return-type 
-fvisibility-inlines-hidden -Wno-return-type-c-linkage -O2 -DNDEBUG 
-DQT_NO_DEBUG -arch x86_64 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk 
-mmacosx-version-min=10.9 -fPIC 
-I/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/build 
-I/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0 
-I/sw/opt/kde4/mac/include -I/sw/opt/kde4/mac/include/KDE 
-I/sw/lib/qt4-mac/lib/phonon.framework/KDE -F/sw/lib/qt4-mac/lib 
-I/sw/lib/qt4-mac/include/phonon -I/sw/lib/qt4-mac/include/QtXmlPatterns 
-I/sw/lib/qt4-mac/include/QtXml -I/sw/lib/qt4-mac/include/QtWebKit 
-I/sw/lib/qt4-mac/include/QtUiTools -I/sw/lib/qt4-mac/include/QtTest 
-I/sw/lib/qt4-mac/include/QtSvg -I/sw/lib/qt4-mac/include/QtSql 
-I/sw/lib/qt4-mac/include/QtScriptTools 
-I/sw/lib/qt4-mac/include/QtScript -I/sw/lib/qt4-mac/include/QtOpenGL 
-I/sw/lib/qt4-mac/include/QtNetwork 
-I/sw/lib/qt4-mac/include/QtMultimedia -I/sw/lib/qt4-mac/include/QtHelp 
-I/sw/lib/qt4-mac/include/QtDesigner 
-I/sw/lib/qt4-mac/include/QtDeclarative -I/sw/lib/qt4-mac/include/QtDBus 
-I/sw/lib/qt4-mac/include/QtAssistant 
-I/sw/lib/qt4-mac/include/Qt3Support -I/sw/lib/qt4-mac/include/QtGui 
-I/sw/lib/qt4-mac/include/QtCore -I/sw/lib/qt4-mac/include/Qt 
-I/sw/lib/qt4-mac/share/qt4/mkspecs/default -I/sw/lib/qt4-mac/include 
-I/sw/include/python2.7 -I/sw/opt/kde4/mac/include/solid 
-I/sw/opt/kde4/mac/include/kio -I/sw/opt/kde4/mac/include/dom 
-I/sw/opt/kde4/mac/include/ksettings 
-I/sw/opt/kde4/mac/include/knewstuff2 -I/sw/opt/kde4/mac/include/dnssd 
-I/sw/opt/boost-1_55/include -I/sw/opt/soprano/mac/include    -o 
CMakeFiles/python_module_PyKDE4_akonadi.dir/sip/akonadi/sipakonadipart2.cpp.o 
-c 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/build/sip/akonadi/sipakonadipart2.cpp
In file included from 
/sw/share/sip-py27/pyqt4-mac/QtGui/qx11info_x11.sip:39:
/sw/lib/qt4-mac/include/QtGui/qx11info_x11.h:47:26: error: typedef 
redefinition with different types ('struct _XDisplay' vs 'void')
typedef struct _XDisplay Display;
                          ^
/sw/opt/kde4/mac/include/KDE/../kapplication.h:42:14: note: previous 
definition is here
typedef void Display;
              ^

Sip seems to be trying to use X11 related headers, which are not 
relevant in this case, since Qt4 and PyQt have been built for the OS X 
native backend.  Indeed, earlier in the build, there's this:

/sw/bin/sip -t ALL -t WS_X11 -t Qt_4_8_6 -x VendorID -x 
PyQt_NoPrintRangeBug -P -g -x PyKDE_QVector -x Py_v3 -x PyKDE_GLuint -j 
8 -c 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/build/sip/akonadi 
-I /sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/build -I 
/sw/share/sip-py27/pyqt4-mac -I 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/sip 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/sip/akonadi/akonadimod.sip

So I patched CMakeLists.txt to use WS_MACX instead of WS_X11, and now 
the build fails with this error:

/sw/bin/sip -t ALL -t WS_MACX -t Qt_4_8_6 -x VendorID -x 
PyQt_NoPrintRangeBug -P -g -x PyKDE_QVector -x Py_v3 -x PyKDE_GLuint -j 
8 -c 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/build/sip/akonadi 
-I /sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/build -I 
/sw/share/sip-py27/pyqt4-mac -I 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/sip 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/sip/akonadi/akonadimod.sip
sip: Deprecation warning: 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/sip/kdeui/kxmlguibuilder.sip:41: 
Annotations should not be used in explicit C/C++ signatures
sip: Deprecation warning: 
/sw/build.build/pykde4-mac-py27-4.14.0-1/pykde4-4.14.0/sip/akonadi/itemserializerplugin.sip:33: 
Annotation is invalid
sip: Display is undefined

I'm guessing Display refers to an X11 DISPLAY envvar (or similar)?  In 
theory, this should not apply on OS X since we are using the cocoa 
backend.  But the error persists even if I have Xquartz (the OS X X11 
server) running and DISPLAY exported.

I haven't been able to find where 'Display' is coming from. Is PyKDE 
just assuming that it's going to have X available?  If not, what is a 
fix for this issue?  Thanks for your help,

Hanspeter


More information about the Kde-bindings mailing list