[PyQt] BUG: PyQt 5.6 Build Error for iOS

David Morris othalan at othalan.net
Tue Apr 5 09:06:04 BST 2016


I am attempting to build PyQt 5.6 for iOS (development snapshot
PyQt5_gpl-5.6.dev1604021410) and have encountered a compile error:

QtWidgets/sipQtWidgetsQMenu.cpp:2848:21: error: no member named
'setAsDockMenu' in 'QMenu'
            sipCpp->setAsDockMenu();
            ~~~~~~  ^
1 error generated.

Looking into this further, this seems to originate from the file
sip/QtWidgets/qmenu.sip (lines 150 - 154), where new code was added
for OSX.  The code checks for WS_MACX.

Tracing the problem back further, I have found WS_MACX is set because
pyqtdeploy sets the following platform configuration:

py_platform = darwin

Unfortunately, "darwin" is the platform identified for BOTH OSX and
iOS (iPhone and iPad), but these two platforms have different
capabilities.  I do not see any mechanism available for
differentiating between these platforms within the PyQt build.

As a temporary solution to work around this error, I commented out the
relevant lines of code  in the qmenu.sip noted above and did not
encounter any other build errors.

I am guessing this is a bug in pyqtdeploy, PyQt5 or both, but am
uncertain where to make changes for a fix.  Any chance of a fix for
this bug?

Full compile statement:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-c -pipe -fvisibility=hidden -fpascal-strings -fmessage-length=0
-Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch
-Wno-unused-parameter -Wunused-variable -Wunused-value
-Wno-shorten-64-to-32 -Wno-sign-conversion -fexceptions -fasm-blocks
-Wno-missing-field-initializers -Wno-missing-prototypes
-Wno-implicit-atomic-properties -Wformat -Wno-missing-braces
-Wno-unused-function -Wno-unused-label -Wuninitialized
-Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants
-Wno-sign-compare -Wpointer-sign -Wno-newline-eof
-Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion
-fvisibility-inlines-hidden -Wno-non-virtual-dtor
-Wno-overloaded-virtual -Wno-exit-time-destructors -fno-exceptions
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk
-miphoneos-version-min=5.1.1  -arch armv7  -arch arm64 -O2 -fPIC
-std=c++11 -stdlib=libc++ -Wall -W -DDARWIN_NO_CARBON -DQT_NO_PRINTER
-DQT_NO_PRINTDIALOG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public
-DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I.
-I/Users/morrisde/Qt/5.5/ios/mkspecs/macx-ios-clang/ios -I.
-I../../../iRoot/include/python3.5 -I../qpy/QtWidgets
-I/Users/morrisde/Qt/5.5/ios/include
-I/Users/morrisde/Qt/5.5/ios/include/QtWidgets
-I/Users/morrisde/Qt/5.5/ios/include/QtGui
-I/Users/morrisde/Qt/5.5/ios/include/QtCore -Iiphoneos
-I/Users/morrisde/Qt/5.5/ios/mkspecs/macx-ios-clang -o
iphoneos/sipQtWidgetsQMenu.o sipQtWidgetsQMenu.cpp
/Users/morrisde/contract/PiranhaColor/ios/src/PyQt5_gpl-5.6.dev1604021410/QtWidgets/sipQtWidgetsQMenu.cpp:2848:21:
error: no member named 'setAsDockMenu' in 'QMenu'
            sipCpp->setAsDockMenu();
            ~~~~~~  ^
1 error generated.
make[3]: *** [iphoneos/sipQtWidgetsQMenu.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [iphoneos] Error 2
make[1]: *** [sub-QtWidgets-make_first-ordered] Error 2
make: *** [pyqt5] Error 2

Thank you,

David


More information about the PyQt mailing list