[PyQt] Link error during PyQt HelloWorld on

Phil Thompson phil at riverbankcomputing.com
Sat Feb 25 17:12:02 GMT 2017


On 3 Feb 2017, at 2:22 pm, Rembrand at daxLAB <rembrand at daxlab.com> wrote:
> 
> 
> I'm getting closer to deploy a simple helloworld.py app to Android but this looks like there is a function missing inside  libpython3.4.a the Python lib for Android.
> The Python versions do match (in the cross compile chain between Linux host and target (Android))
> 
> Is this a version mismatch (output has been shortened for clarification)?  The compile process went well for the .pro file generared by pyqtdeploy.
> 
> arm-linux-androideabi-g++ \
> --sysroot=/home/thedax/Android/Sdk/ndk-bundle/platforms/android-9/arch-arm/  \
> -Wl,-soname,libHelloWorld.so \
> -Wl,-rpath=/home/thedax/Qt4A/5.7/android_armv7/lib \
> -Wl,--no-undefined -Wl,-z,noexecstack -shared \
> -o libHelloWorld.so pyqtdeploy_main.o \
> pyqtdeploy_start.o pdytools_module.o \
> _heapqmodule.o \
> mathmodule.o selectmodule.o timemodule.o \
> _posixsubprocess.o _math.o qrc_pyqtdeploy.o \
> -L/home/thedax/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a \
> -L/home/thedax/Android/Sdk/ndk-bundle/platforms/android-9/arch-arm//usr/lib \
> -L/home/thedax/PyQtDeploy/sysroot_android/app/lib/python3.4/site-packages -lsip \
> -L/home/thedax/PyQtDeploy/sysroot_android/app/lib/python3.4/site-packages/PyQt5 \
> -lQt -lQtCore -lQtGui -lQtWidgets \
> -L/home/thedax/PyQtDeploy/sysroot_android/app/lib -lpython3.4 \
> -L/home/thedax/Qt4A/5.7/android_armv7/lib -lQt5Widgets \
> -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a \
> -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib \
> -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
> ...../sysroot_android/app/lib/libpython3.4.a(pytime.o):pytime.c:function _PyTime_gettimeofday: error: undefined reference to 'ftime'
> ...../sysroot_android/app/lib/libpython3.4.a(pytime.o):pytime.c:function _PyTime_gettimeofday_info: error: undefined reference to 'ftime'
> ...../sysroot_android/app/lib/libpython3.4.a(posixmodule.o):posixmodule.c:function posix_wait3: error: undefined reference to 'wait3'
> 
> collect2: error: ld returned 1 exit status
> make: *** [libHelloWorld.so] Error 1
> 15:04:28: The process "/usr/bin/make" exited with code 2.
> Error while building/deploying project HelloWorld (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
> 
> 
> Help again is much needed.

The ftime() problem should be fixed in tonight's snapshot. However wait3() is already disabled for Android so I don't know what's going on there.

Phil


More information about the PyQt mailing list