<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>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 <a moz-do-not-send="true"
        href="http://pyqt.sourceforge.net/Docs/pyqtdeploy/_images/pyqt-demo.png">pyqtdeploy
        demo image in the docs</a><br>
    </p>
    <p> 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<tt> --download-libs</tt> argument to <tt>demo-build.py</tt>
      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>
    </p>
    <p><br>
      <tt># you must first run the universal Qt Installer script to
        install exactly 5.9.3</tt><tt><br>
      </tt><tt># I used qt-unified-linux-x64-3.0.5-online.run to install
        exactly 5.9.3 in ~/Qt5.9.3</tt><tt><br>
      </tt><tt>ln -s ~/Qt5.9.3/ src/Qt</tt><tt><br>
      </tt><tt><br>
      </tt><tt>cd src</tt><tt><br>
      </tt><tt><br>
      </tt><tt># Download source archive required by pyqtdeploy 2.1
        (only certain versions work)</tt><tt><br>
      </tt><tt>wget
        <a class="moz-txt-link-freetext" href="https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz">https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz</a></tt><tt><br>
      </tt><tt>wget
<a class="moz-txt-link-freetext" href="https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.6/sip-4.19.6.tar.gz">https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.6/sip-4.19.6.tar.gz</a></tt><tt><br>
      </tt><tt>wget
<a class="moz-txt-link-freetext" href="https://phoenixnap.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.9.2/PyQt5_gpl-5.9.2.tar.gz">https://phoenixnap.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.9.2/PyQt5_gpl-5.9.2.tar.gz</a></tt><tt><br>
      </tt><tt>wget
<a class="moz-txt-link-freetext" href="https://download.qt.io/archive/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz">https://download.qt.io/archive/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz</a></tt><tt><br>
      </tt><tt><br>
      </tt><tt># Versions that are known to fail in pyqtdeploy 2.1:</tt><tt><br>
      </tt><tt>#wget
        <a class="moz-txt-link-freetext" href="https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz">https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz</a></tt><tt><br>
      </tt><tt>#wget
<a class="moz-txt-link-freetext" href="http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz">http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz</a></tt><tt><br>
      </tt><tt>#wget
<a class="moz-txt-link-freetext" href="https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.12/sip-4.19.12.tar.gz">https://superb-sea2.dl.sourceforge.net/project/pyqt/sip/sip-4.19.12/sip-4.19.12.tar.gz</a></tt><tt><br>
      </tt><tt>#wget
<a class="moz-txt-link-freetext" href="https://phoenixnap.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.11.2/PyQt5_gpl-5.11.2.tar.gz">https://phoenixnap.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.11.2/PyQt5_gpl-5.11.2.tar.gz</a></tt><tt><br>
      </tt><tt><br>
      </tt><tt>cd -</tt><tt><br>
      </tt><br>
      <br>
    </p>
    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>
    <div class="moz-cite-prefix">---------------------<br>
      <br>
      <tt>/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>
      </tt>-----------<br>
      <br>
      Doing some digging into the C code, it appears it has to with this
      block in line 58 of posixmodule.c <a moz-do-not-send="true"
        href="https://github.com/python/cpython/blob/3.6/Modules/posixmodule.c">https://github.com/python/cpython/blob/3.6/Modules/posixmodule.c</a>:<br>
      ------<br>
      <tt><br>
      </tt><tt>#ifdef HAVE_SYS_SYSMACROS_H</tt><tt><br>
      </tt><tt>/* GNU C Library: major(), minor(), makedev() */</tt><tt><br>
      </tt><tt>#include <sys/sysmacros.h></tt><tt><br>
      </tt><tt>#endif</tt><tt><br>
      </tt><tt><br>
      </tt>--------<br>
      I wonder if it was a recent change based on this comment in
      February: <a moz-do-not-send="true"
href="https://github.com/IntelRealSense/librealsense/pull/1114#issuecomment-362528830">https://github.com/IntelRealSense/librealsense/pull/1114#issuecomment-362528830</a><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>
      Thanks for your time, you've been very helpful.<br>
      <br>
      <br>
      On 08/22/2018 02:18 PM, Phil Thompson wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:0CE1083A-8621-4B59-8091-05F16690F0A5@riverbankcomputing.com">
      <pre wrap="">On 22 Aug 2018, at 10:13 pm, Jonathan Leaders <a class="moz-txt-link-rfc2396E" href="mailto:jonathan@leadersandco.com"><jonathan@leadersandco.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">The missing steps in the docs would be which versions to download (it would be nice to have a series of wget commands to download  the exact versions required in the docs). I didn't see any versioning requirements in the docs, but I did see the image of versions here: <a class="moz-txt-link-freetext" href="http://pyqt.sourceforge.net/Docs/pyqtdeploy/demo.html">http://pyqt.sourceforge.net/Docs/pyqtdeploy/demo.html</a>

Are these versions in the image the ones I should use?
</pre>
      </blockquote>
      <pre wrap="">If you don't want to change anything, eg. the sysroot.json file.

</pre>
      <blockquote type="cite">
        <pre wrap="">In any case, I notice I'm using openssl-1.0.2p.tar.gz -- not sure if 1.0.2p that is the same as 1.0.2 but it is failing to build trying to find the standard library (stdlib). Perhaps because the sysroot-android-32/includedirectory is empty? Shouldn't there be *.h files in there? I tried removing the sysroot and running again but it still failed.
</pre>
      </blockquote>
      <pre wrap="">The include directory is populated as the sysroot is built.

Do you have a working Android development environment set up?

Phil</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <br>
      <br>
      <br>
      <style type="text/css">
  a.link{margin:0;padding:0;border:none !important;text-decoration:none !important;}
  table,tr,td,a,span{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
</style>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="format-detection" content="telephone=no">
      <meta name="format-detection" content="address=no">
      <meta name="format-detection" content="email=no">
      <table id="sig" border-spacing="0" style="margin:0;padding:0;"
        cellspacing="0" cellpadding="0">
        <tbody>
          <tr>
            <td
              style="width:40px;margin:0;padding:0;vertical-align:top;"
              valign="top" width="40"> <a
                href="http://leadersandco.com" title="LeadersAndCompany"
                style="border:none;text-decoration:none;"> <img
                  moz-do-not-send="true"
src="http://leadersandco.com/img/logos/logo-custom-intelligence-grey.png"
                  alt="Leaders and Company"
                  style="border:none;width:40px;height:40px;display:block;"
                  height="40" width="40"> </a> </td>
            <td
              style="width:10px;min-width:10px;max-width:10px;margin:0;padding:0;"
              width="10"> </td>
            <td style="margin:0;padding:0;">
              <table id="sig2" border-spacing="0"
                style="padding:0;margin:0;font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;font-size:11px;mso-line-height-rule:exactly;line-height:11px;color:#b0b0b0;border-collapse:collapse;-webkit-text-size-adjust:none;"
                cellspacing="0" cellpadding="0">
                <tbody>
                  <tr style="margin:0;padding:0;">
                    <td style="margin:0;padding:0;font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;white-space:nowrap;"> <strong><a
                          href="http://jonathanleaders.com"
                          style="border:none;text-decoration:none;color:#049cdb;"><span
                            style="color:#049cdb">Jonathan Leaders</span></a></strong>
                      <span style="color:#e0e0e0">•</span> <a
                        href="http://www.jonnyleaders.com/programming-portfolio/"
style="border:none;text-decoration:none;color:#b0b0b0;"><span
                          style="color:#b0b0b0">Coder</span></a> <span
                        style="color:#e0e0e0">•</span> <a
                        href="tel:4246447048"
                        style="border:none;text-decoration:none;color:#b0b0b0;">(424)
                        644-7048</a>  </td>
                  </tr>
                  <tr
style="height:4px;max-height:4px;font-size:4px;mso-line-height-rule:exactly;line-height:4px;"
                    height="4">
                    <td
style="height:4px;max-height:4px;font-size:4px;mso-line-height-rule:exactly;line-height:4px;"
                      height="4"> </td>
                  </tr>
                  <tr style="margin:0;padding:0;">
                    <td style="margin:0;padding:0;font-family:'Helvetica
Neue',Helvetica,Arial,sans-serif;white-space:nowrap;"> <a
                        href="http://leadersandco.com"
                        style="border:none;text-decoration:none;color:#b0b0b0;"><span
                          style="color:#b0b0b0">Leaders & Company
                          LLC</span></a> <span style="color:#e0e0e0">•</span>
                      <a
                        href="https://www.google.com/maps/place/Los+Angeles,+CA/"
style="border:none;text-decoration:none;color:#b0b0b0;"><span
                          style="color:#b0b0b0">Los Angeles</span></a> </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
      <br>
        </div>
  </body>
</html>