<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div><font face="sans-serif">Same error, even with default=1... I'm confused because that patch seems like it should fix it </font></div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:85%;color:#575757" dir="auto">Sent from my T-Mobile 4G LTE Device</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Phil Thompson <phil@riverbankcomputing.com> </div><div>Date: 8/27/18  5:08 AM  (GMT-08:00) </div><div>To: Jonathan Leaders <jonathan@leadersandco.com> </div><div>Cc: pyqt@riverbankcomputing.com </div><div>Subject: Re: [PyQt] Android & the pyqtdeploy tool: the provided demo relies on undocumented libraries/headers? </div><div><br></div></div>On 23 Aug 2018, at 9:09 pm, Jonathan Leaders <jonathan@leadersandco.com> wrote:<br>> <br>> Hey Phil! Thank you so much for the direction. We got further by following your advice of using the same versions of SIP & PyQt5 that was found in the pyqtdeploy demo image in the docs<br>> <br>> I'm a big fan of software that is "one-click" dev environment setup. I noticed I had to use specific old versions of PyQt5, Python, SIP, for the pyqtdeploy demo to work. It'd be interesting to add a --download-libs argument to demo-build.py that automatically downloads the source archives, since only certain versions are compatible. To help make that easier, here is a list of statements to download versions that are listed in your docs image:<br>> <br>> <br>> # you must first run the universal Qt Installer script to install exactly 5.9.3<br>> # I used qt-unified-linux-x64-3.0.5-online.run to install exactly 5.9.3 in ~/Qt5.9.3<br>> ln -s ~/Qt5.9.3/ src/Qt<br>> <br>> cd src<br>> <br>> # Download source archive required by pyqtdeploy 2.1 (only certain versions work)<br>> wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz<br>> wget https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.6/sip-4.19.6.tar.gz<br>> wget https://phoenixnap.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.9.2/PyQt5_gpl-5.9.2.tar.gz<br>> wget https://download.qt.io/archive/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz<br>> <br>> # Versions that are known to fail in pyqtdeploy 2.1:<br>> #wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz<br>> #wget http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz<br>> #wget https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.12/sip-4.19.12.tar.gz<br>> #wget https://phoenixnap.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.11.2/PyQt5_gpl-5.11.2.tar.gz<br>> <br>> cd -<br>> <br>> <br>> <br>> The documentation aside, here's where I'm stuck now. Have you seen this error before? This happens after everything is built, the build directory is removed, and things are freezing, so it's really late in the process. It looks like its an issue linking:<br>> ---------------------<br>> <br>> /home/jonny/Android/android-ndk-r17b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/jonny/Android/android-ndk-r17b/platforms/android-28/arch-arm/ -Wl,-soname,libpyqt-demo.so -Wl,-rpath=/home/jonny/Qt5.9.3/5.9.3/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libpyqt-demo.so pyqtdeploy_main.o pyqtdeploy_start.o pdytools_module.o _heapqmodule.o _math.o _posixsubprocess.o mathmodule.o selectmodule.o timemodule.o qrc_pyqtdeploy.o   -L/home/jonny/Android/android-ndk-r17b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/jonny/Android/android-ndk-r17b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x -L/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/lib -L/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/lib/python3.6/site-packages -L/home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/lib/python3.6/site-packages/PyQt5 -lQtAndroidExtras -lQtCore -lQtGui -lQtNetwork -lQtWidgets -lpython3.6 -lsip -L/home/jonny/Qt5.9.3/5.9.3/android_armv7/lib -lQt5Widgets -L/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9 -lQt5Gui -lQt5Network -lQt5AndroidExtras -lQt5Core -lGLESv2 -lgnustl_shared -lgcc -llog -lz -lm -ldl -lc<br>> /home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/lib/libpython3.6.a(posixmodule.o):posixmodule.c:function os_makedev: error: undefined reference to 'makedev'<br>> /home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/lib/libpython3.6.a(posixmodule.o):posixmodule.c:function os_minor: error: undefined reference to 'minor'<br>> /home/jonny/Projects/organic-mail/tools/pyqtdeploy-2.1/demo/sysroot-android-32/lib/libpython3.6.a(posixmodule.o):posixmodule.c:function os_major: error: undefined reference to 'major'<br>> collect2: error: ld returned 1 exit status<br>> Makefile:259: recipe for target 'libpyqt-demo.so' failed<br>> make: *** [libpyqt-demo.so] Error 1<br>> <br>> -----------<br>> <br>> Doing some digging into the C code, it appears it has to with this block in line 58 of posixmodule.c https://github.com/python/cpython/blob/3.6/Modules/posixmodule.c:<br>> ------<br>> <br>> #ifdef HAVE_SYS_SYSMACROS_H<br>> /* GNU C Library: major(), minor(), makedev() */<br>> #include <sys/sysmacros.h><br>> #endif<br>> <br>> --------<br>> I wonder if it was a recent change based on this comment in February: https://github.com/IntelRealSense/librealsense/pull/1114#issuecomment-362528830<br>> <br>> Any ideas? I'm stumped on how to get the Android APK of the pyqtdeploy demo built. Even with the versions listed it seems to fail building.<br><br>Try this patch.<br><br>Phil<br><br></body></html>