[PyQt] Error during cross compile QtCore for Android

Phil Thompson phil at riverbankcomputing.com
Fri Feb 3 09:48:39 GMT 2017


On 3 Feb 2017, at 9:27 am, Rembrand at daxLAB <rembrand at daxlab.com> wrote:
> 
> Dear all
> 
> I try to cross compile PyQt5.7, Python 3.4.3, Qt 5.7 for Android on a 64bit Linux Ubuntu based Mint 14.04 machine.
> 
> First I have to remove the version number from QtCoremod.sip to avoid error below:
> 
> /usr/bin/sip -w -f -t WS_X11 -t Qt_5_7_0 -x PyQt_Desktop_OpenGL -x PyQt_SSL -B Qt_6_0_0 -P -o -c /home/thedax/PyQtDeploy/sysroot_android/srcs/PyQt5_gpl-5.7/QtBluetooth -I sip -I /home/thedax/PyQtDeploy/sysroot_android/srcs/PyQt5_gpl-5.7/sip /home/thedax/PyQtDeploy/sysroot_android/srcs/PyQt5_gpl-5.7/sip/QtBluetooth/QtBluetoothmod.sip
> sip: Deprecation warning: sip/QtCore/QtCoremod.sip:23: %Module version numbers are deprecated and ignored
> Error: Unable to create the C++ code.
>  
> Once solved, during the make process I get another error almost at the end of making QtCore
> 
> /home/thedax/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -fno-builtin-memmove -std=c++11 -fno-exceptions -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -fPIC -Wall -Wno-psabi -W -D_REENTRANT -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -I../../../app/include/python3.4 -I../qpy/QtCore -I/home/thedax/Qt4A/5.7/android_armv7/include -I/home/thedax/Qt4A/5.7/android_armv7/include/QtCore -I. -isystem /home/thedax/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /home/thedax/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /home/thedax/Android/Sdk/ndk-bundle/platforms/android-16/arch-arm/usr/include -I/home/thedax/Qt4A/5.7/android_armv7/mkspecs/android-g++ -o qpycore_chimera.o ../qpy/QtCore/qpycore_chimera.cpp
> 
> ../qpy/QtCore/qpycore_chimera.cpp: In member function 'void Chimera::set_qflags()':
> ../qpy/QtCore/qpycore_chimera.cpp:487:24: error: 'pyqt5ClassTypeDef' was not declared in this scope
>          _is_qflags = ((pyqt5ClassTypeDef *)_type)->flags & 0x01;
>                         ^
> ../qpy/QtCore/qpycore_chimera.cpp:487:43: error: expected primary-expression before ')' token
>          _is_qflags = ((pyqt5ClassTypeDef *)_type)->flags & 0x01;
>                                            ^
> ../qpy/QtCore/qpycore_chimera.cpp:487:44: error: expected ')' before '_type'
>          _is_qflags = ((pyqt5ClassTypeDef *)_type)->flags & 0x01;
>                                             ^
> make[1]: *** [qpycore_chimera.o] Error 1
> make[1]: Leaving directory `/home/thedax/PyQtDeploy/sysroot_android/srcs/PyQt5_gpl-5.7/QtCore'
> make: *** [sub-QtCore-make_first-ordered] Error 2
> 
> 
> Is there some sort of declaration missing? Got not a single clue what is happening here. Help is appriciated.

Looks like you are using an incompatible version of sip.

Phil


More information about the PyQt mailing list