Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. protobuf/lib: pread failed: is a directory, cross-compilation, deploy client application to Android phone
Forum Updated to NodeBB v4.3 + New Features

protobuf/lib: pread failed: is a directory, cross-compilation, deploy client application to Android phone

Scheduled Pinned Locked Moved Solved Installation and Deployment
22 Posts 3 Posters 8.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    a_so
    wrote on last edited by a_so
    #3

    Hi jsulm!

    I have removed the blanks, but now -ldns_sd and -lprotobuf are not found. This is my compile output.

    /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
    /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
    /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so while searching for protobuf
    /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lprotobuf
    
    jsulmJ 2 Replies Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #4

      It looks like your libraries at /media/qt5-qwt6/ are not compatible with the targetted platform. Is it possible you're trying to mix x86 and x64 builds?

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      1
      • A a_so

        Hi jsulm!

        I have removed the blanks, but now -ldns_sd and -lprotobuf are not found. This is my compile output.

        /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
        /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
        /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so while searching for protobuf
        /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lprotobuf
        
        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #5

        @a_so What is the exact name of the protobuf library?
        Is it really located in /media/qt5-qwt6/android_sdk/protobuf_android/lib ?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • A a_so

          Hi jsulm!

          I have removed the blanks, but now -ldns_sd and -lprotobuf are not found. This is my compile output.

          /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
          /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
          /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so while searching for protobuf
          /media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lprotobuf
          
          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #6

          @a_so To add to @JohanSolo : you can find out for which architecture the lib was build calling:

          file /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            a_so
            wrote on last edited by
            #7

            @jsulm used library is libprotobuf.so.8.0.0 which indeed is under the specified directory.
            I built it for arm-linux-androideabi on my Centos virtual machine following this script

            link text

            My phone uses Android Marshmallow
            Chipset Qualcomm MSM8992 Snapdragon 808
            CPU Hexa-core (4x1.4 GHz Cortex-A53 & 2x1.8 GHz Cortex-A57)

            I am quite new to Qt and this is my first project I try to build for Android.

            jsulmJ 1 Reply Last reply
            0
            • A a_so

              @jsulm used library is libprotobuf.so.8.0.0 which indeed is under the specified directory.
              I built it for arm-linux-androideabi on my Centos virtual machine following this script

              link text

              My phone uses Android Marshmallow
              Chipset Qualcomm MSM8992 Snapdragon 808
              CPU Hexa-core (4x1.4 GHz Cortex-A53 & 2x1.8 GHz Cortex-A57)

              I am quite new to Qt and this is my first project I try to build for Android.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @a_so Can you please execute

              file /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so
              

              and post its output here?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                a_so
                wrote on last edited by
                #9

                output is:

                /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so: symbolic link to `libprotobuf.so.8.0.0'
                
                jsulmJ 1 Reply Last reply
                0
                • A a_so

                  output is:

                  /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so: symbolic link to `libprotobuf.so.8.0.0'
                  
                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @a_so OK, then do:

                  file /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so.8.0.0
                  

                  and post the output here...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    a_so
                    wrote on last edited by a_so
                    #11
                    /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so.8.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ebd5a270582d8e3188c77f4027be7df7058f5f1d, not stripped
                    
                    

                    for qwt I get the following output:

                    /media/qt5-qwt6/qwt_android/qwt-6.1.3/lib/libqwt.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                    
                    
                    jsulmJ 1 Reply Last reply
                    0
                    • A a_so
                      /media/qt5-qwt6/android_sdk/protobuf_android/lib/libprotobuf.so.8.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ebd5a270582d8e3188c77f4027be7df7058f5f1d, not stripped
                      
                      

                      for qwt I get the following output:

                      /media/qt5-qwt6/qwt_android/qwt-6.1.3/lib/libqwt.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                      
                      
                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @a_so As you can see it is x86_64 binary, not ARM...

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      A 1 Reply Last reply
                      1
                      • jsulmJ jsulm

                        @a_so As you can see it is x86_64 binary, not ARM...

                        A Offline
                        A Offline
                        a_so
                        wrote on last edited by
                        #13

                        @jsulm yes, I see. My cross compilation for arm did not work obviously. I will try to compile it again.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          a_so
                          wrote on last edited by
                          #14

                          I have managed to cross compile protobuf 2.5.0 for arm-linux-androideabi with this script:

                          #!/bin/bash
                          export NDK=/media/qt5-qwt6/ndk10/android-ndk-r10e
                          export SYSROOT=$NDK/platforms/android-21/arch-arm
                          
                          export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
                          
                          export PATH=$PATH:$TOOLCHAIN/bin
                          
                          export CC="$TOOLCHAIN/bin/arm-linux-androideabi-gcc --sysroot $SYSROOT"
                          export CXX="$TOOLCHAIN/bin/arm-linux-androideabi-g++ --sysroot $SYSROOT"
                          export CXXSTL=$NDK/sources/cxx-stl/gnu-libstdc++/4.9
                          
                          function build_one
                          {
                          mkdir build
                          
                          ./configure --prefix=$(pwd)/build \
                          --host=arm-linux-androideabi \
                          --with-sysroot=$SYSROOT \
                          --enable-static \
                          --disable-shared \
                          --enable-cross-compile \
                          --with-protoc=protoc \
                          CFLAGS="-march=armv7-a" \
                          CXXFLAGS="-march=armv7-a -I$CXXSTL/include -I$CXXSTL/libs/armeabi-v7a/include -L$CXXSTL/libs/armeabi-v7a/ -lgnustl_static"
                          
                          make clean
                          make
                          make install
                          }
                          
                          # pwd is current directory
                          CPU=arm
                          PREFIX=$(pwd)/android/$CPU
                          ADDI_CFLAGS="-marm"
                          build_one
                          
                          # Inspect the library architecture specific information
                          # arm-linux-androideabi-readelf -A build/lib/libprotobuf-lite.a
                          

                          find for protoc delivers:

                          /home/staff/Desktop/protobuf/protobuf-2.5.0/build/bin/protoc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                          

                          next step, I linked to the libraries in my Qt project in .pri file:

                          #Protobuf support (arm compiled)
                          LIBS += -L/home/staff/Desktop/protobuf/protobuf-2.5.0/build/lib -lprotobuf
                          INCLUDEPATH += /home/staff/Desktop/protobuf/protobuf-2.5.0/build/include
                          
                          #qwt support (armv7)
                          LIBS += -L/media/qt5-qwt6/lib -lqwt
                          INCLUDEPATH += /media/qt5-qwt6/include
                          
                          #Bonjour/Avahi support
                          LIBS += -L/usr/lib64/libdns_sd.so.1.0.0
                          
                          #Protobuf support (arm compiled)
                          LIBS += -L/home/staff/Desktop/protobuf/protobuf-2.5.0/build/lib -lprotobuf
                          INCLUDEPATH += /home/staff/Desktop/protobuf/protobuf-2.5.0/build/include
                          
                          

                          When I try to run the project on my phone, protobuf is found but I get the following errors:

                          /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
                          /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /media/qt5-qwt6/lib/libqwt.so while searching for qwt
                          /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lqwt
                          /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
                          ../sozius-client/so_bonjourservicebrowser.cpp:57: error: undefined reference to 'DNSServiceRefDeallocate'
                          ../sozius-client/so_bonjourservicebrowser.cpp:92: error: undefined reference to 'DNSServiceBrowse'
                          ../sozius-client/so_bonjourservicebrowser.cpp:103: error: undefined reference to 'DNSServiceRefSockFD'
                          ../sozius-client/so_bonjourservicebrowser.cpp:138: error: undefined reference to 'DNSServiceProcessResult'
                          ../sozius-client/so_bonjourserviceresolver.cpp:79: error: undefined reference to 'DNSServiceRefDeallocate'
                          ../sozius-client/so_bonjourserviceresolver.cpp:121: error: undefined reference to 'DNSServiceResolve'
                          ../sozius-client/so_bonjourserviceresolver.cpp:132: error: undefined reference to 'DNSServiceRefSockFD'
                          ../sozius-client/so_bonjourserviceresolver.cpp:169: error: undefined reference to 'DNSServiceProcessResult'
                          ../sozius-client/so_bonjourservicereconfirmer.cpp:46: error: undefined reference to 'DNSServiceQueryRecord'
                          ../sozius-client/so_bonjourservicereconfirmer.cpp:57: error: undefined reference to 'DNSServiceRefSockFD'
                          ../sozius-client/so_bonjourservicereconfirmer.cpp:104: error: undefined reference to 'DNSServiceProcessResult'
                          ../sozius-client/so_bonjourservicereconfirmer.cpp:122: error: undefined reference to 'DNSServiceConstructFullName'
                          ../sozius-client/so_bonjourservicereconfirmer.cpp:140: error: undefined reference to 'DNSServiceRefDeallocate'
                          ../sozius-client/so_bonjourservicereconfirmer.cpp:161: error: undefined reference to 'DNSServiceReconfirmRecord'
                          ../sozius-client/so_bonjourservicequeryrecord.cpp:84: error: undefined reference to 'DNSServiceQueryRecord'
                          ../sozius-client/so_bonjourservicequeryrecord.cpp:99: error: undefined reference to 'DNSServiceRefSockFD'
                          ../sozius-client/so_bonjourservicequeryrecord.cpp:133: error: undefined reference to 'DNSServiceProcessResult'
                          ../sozius-client/so_bonjourservicequeryrecord.cpp:145: error: undefined reference to 'DNSServiceRefDeallocate'
                          ../sozius-client/so_bonjourservice.cpp:43: error: undefined reference to 'TXTRecordGetCount'
                          ../sozius-client/so_bonjourservice.cpp:47: error: undefined reference to 'TXTRecordGetItemAtIndex'
                          ../sozius-client/so_bonjourservice.cpp:229: error: undefined reference to 'DNSServiceConstructFullName'
                          ../sozius-client/so_infograph_p.cpp:61: error: undefined reference to 'QwtPlot::setAxisTitle(int, QString const&)'
                          ../sozius-client/so_infograph_p.cpp:99: error: undefined reference to 'QwtPlot::setFooter(QString const&)'
                          ../sozius-client/so_infograph_p.cpp:135: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                          ../sozius-client/so_infograph_p.cpp:152: error: undefined reference to 'QwtPlot::setAxisAutoScale(int, bool)'
                          ../sozius-client/so_infograph_p.cpp:157: error: undefined reference to 'QwtPlot::setAxisAutoScale(int, bool)'
                          ../sozius-client/so_infograph_p.cpp:158: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                          ../sozius-client/so_infograph_p.cpp:177: error: undefined reference to 'QwtPlot::setFooter(QString const&)'
                          ../sozius-client/so_infograph_p.cpp:178: error: undefined reference to 'QwtPlot::setCanvasBackground(QBrush const&)'
                          ../sozius-client/so_infograph_p.cpp:179: error: undefined reference to 'QwtPlot::setAxisTitle(int, QString const&)'
                          ../sozius-client/so_infograph_p.cpp:182: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                          ../sozius-client/so_infograph_p.cpp:183: error: undefined reference to 'QwtPlot::setAxisAutoScale(int, bool)'
                          ../sozius-client/so_infograph_p.cpp:186: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                          ../sozius-client/so_infograph_p.cpp:201: error: undefined reference to 'QwtPlotCurve::QwtPlotCurve(QString const&)'
                          ../sozius-client/so_infograph_p.cpp:203: error: undefined reference to 'QwtPlotCurve::setPen(QColor const&, double, Qt::PenStyle)'
                          ../sozius-client/so_infograph_p.cpp:204: error: undefined reference to 'QwtPlotItem::setRenderHint(QwtPlotItem::RenderHint, bool)'
                          ../sozius-client/so_infograph_p.cpp:248: error: undefined reference to 'QwtPlotCurve::setSamples(QVector<QPointF> const&)'
                          ../sozius-client/so_infograph_p.cpp:249: error: undefined reference to 'QwtPlotItem::attach(QwtPlot*)'
                          ../sozius-client/so_qwtplot.cpp:3: error: undefined reference to 'QwtPlot::QwtPlot(QWidget*)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::metaObject() const'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::qt_metacast(char const*)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::qt_metacall(QMetaObject::Call, int, void**)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::event(QEvent*)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::eventFilter(QObject*, QEvent*)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::resizeEvent(QResizeEvent*)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::canvasMap(int) const'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::updateLayout()'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::drawCanvas(QPainter*)'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::getCanvasMarginsHint(QwtScaleMap const*, QRectF const&, double&, double&, double&, double&) const'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::drawItems(QPainter*, QRectF const&, QwtScaleMap const*) const'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::itemToInfo(QwtPlotItem*) const'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::infoToItem(QVariant const&) const'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::replot()'
                          ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:typeinfo for so_QwtPlot: error: undefined reference to 'typeinfo for QwtPlot'
                          ../sozius-client/so_qwtplot.h:9: error: undefined reference to 'QwtPlot::~QwtPlot()'
                          /home/staff/Desktop/protobuf/protobuf-2.5.0/build/lib/libprotobuf.a(strutil.o):strutil.cc:function google::protobuf::safe_strtof(char const*, float*): error: undefined reference to 'strtof'
                          collect2: error: ld returned 1 exit status
                          make: *** [../build/Linux/debug/libsozius-client.so] Error 1
                          12:13:04: The process "/usr/bin/make" exited with code 2.
                          Error while building/deploying project sozius-client (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
                          When executing step "Make"
                          12:13:04: Elapsed time: 02:52.
                          
                          

                          My questions are:

                          1. what architecture/configuration does qwt need? I have several of them on my machine
                          /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so.6.1.2: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=131bd147d36585511f96ccd14ba1ccdd88c327cc, stripped
                          
                          
                          /media/qt5-qwt6/lib/libqwt.so.6.1.2: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=131bd147d36585511f96ccd14ba1ccdd88c327cc, stripped
                          
                          
                          /media/qt5-qwt6/qwt_android/qwt-6.1.3/lib/libqwt.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                          
                          1. why is -ldns_sd not found? The dynamic libraries are definitely installed. Is it because they are not static libraries like the ones for protobuf?
                          /usr/lib64/libdns_sd.so
                          /usr/lib64/libdns_sd.so.1
                          /usr/lib64/libdns_sd.so.1.0.0
                          

                          Thank you for your patience with me

                          jsulmJ 1 Reply Last reply
                          0
                          • A a_so

                            I have managed to cross compile protobuf 2.5.0 for arm-linux-androideabi with this script:

                            #!/bin/bash
                            export NDK=/media/qt5-qwt6/ndk10/android-ndk-r10e
                            export SYSROOT=$NDK/platforms/android-21/arch-arm
                            
                            export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
                            
                            export PATH=$PATH:$TOOLCHAIN/bin
                            
                            export CC="$TOOLCHAIN/bin/arm-linux-androideabi-gcc --sysroot $SYSROOT"
                            export CXX="$TOOLCHAIN/bin/arm-linux-androideabi-g++ --sysroot $SYSROOT"
                            export CXXSTL=$NDK/sources/cxx-stl/gnu-libstdc++/4.9
                            
                            function build_one
                            {
                            mkdir build
                            
                            ./configure --prefix=$(pwd)/build \
                            --host=arm-linux-androideabi \
                            --with-sysroot=$SYSROOT \
                            --enable-static \
                            --disable-shared \
                            --enable-cross-compile \
                            --with-protoc=protoc \
                            CFLAGS="-march=armv7-a" \
                            CXXFLAGS="-march=armv7-a -I$CXXSTL/include -I$CXXSTL/libs/armeabi-v7a/include -L$CXXSTL/libs/armeabi-v7a/ -lgnustl_static"
                            
                            make clean
                            make
                            make install
                            }
                            
                            # pwd is current directory
                            CPU=arm
                            PREFIX=$(pwd)/android/$CPU
                            ADDI_CFLAGS="-marm"
                            build_one
                            
                            # Inspect the library architecture specific information
                            # arm-linux-androideabi-readelf -A build/lib/libprotobuf-lite.a
                            

                            find for protoc delivers:

                            /home/staff/Desktop/protobuf/protobuf-2.5.0/build/bin/protoc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                            

                            next step, I linked to the libraries in my Qt project in .pri file:

                            #Protobuf support (arm compiled)
                            LIBS += -L/home/staff/Desktop/protobuf/protobuf-2.5.0/build/lib -lprotobuf
                            INCLUDEPATH += /home/staff/Desktop/protobuf/protobuf-2.5.0/build/include
                            
                            #qwt support (armv7)
                            LIBS += -L/media/qt5-qwt6/lib -lqwt
                            INCLUDEPATH += /media/qt5-qwt6/include
                            
                            #Bonjour/Avahi support
                            LIBS += -L/usr/lib64/libdns_sd.so.1.0.0
                            
                            #Protobuf support (arm compiled)
                            LIBS += -L/home/staff/Desktop/protobuf/protobuf-2.5.0/build/lib -lprotobuf
                            INCLUDEPATH += /home/staff/Desktop/protobuf/protobuf-2.5.0/build/include
                            
                            

                            When I try to run the project on my phone, protobuf is found but I get the following errors:

                            /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
                            /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /media/qt5-qwt6/lib/libqwt.so while searching for qwt
                            /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lqwt
                            /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
                            ../sozius-client/so_bonjourservicebrowser.cpp:57: error: undefined reference to 'DNSServiceRefDeallocate'
                            ../sozius-client/so_bonjourservicebrowser.cpp:92: error: undefined reference to 'DNSServiceBrowse'
                            ../sozius-client/so_bonjourservicebrowser.cpp:103: error: undefined reference to 'DNSServiceRefSockFD'
                            ../sozius-client/so_bonjourservicebrowser.cpp:138: error: undefined reference to 'DNSServiceProcessResult'
                            ../sozius-client/so_bonjourserviceresolver.cpp:79: error: undefined reference to 'DNSServiceRefDeallocate'
                            ../sozius-client/so_bonjourserviceresolver.cpp:121: error: undefined reference to 'DNSServiceResolve'
                            ../sozius-client/so_bonjourserviceresolver.cpp:132: error: undefined reference to 'DNSServiceRefSockFD'
                            ../sozius-client/so_bonjourserviceresolver.cpp:169: error: undefined reference to 'DNSServiceProcessResult'
                            ../sozius-client/so_bonjourservicereconfirmer.cpp:46: error: undefined reference to 'DNSServiceQueryRecord'
                            ../sozius-client/so_bonjourservicereconfirmer.cpp:57: error: undefined reference to 'DNSServiceRefSockFD'
                            ../sozius-client/so_bonjourservicereconfirmer.cpp:104: error: undefined reference to 'DNSServiceProcessResult'
                            ../sozius-client/so_bonjourservicereconfirmer.cpp:122: error: undefined reference to 'DNSServiceConstructFullName'
                            ../sozius-client/so_bonjourservicereconfirmer.cpp:140: error: undefined reference to 'DNSServiceRefDeallocate'
                            ../sozius-client/so_bonjourservicereconfirmer.cpp:161: error: undefined reference to 'DNSServiceReconfirmRecord'
                            ../sozius-client/so_bonjourservicequeryrecord.cpp:84: error: undefined reference to 'DNSServiceQueryRecord'
                            ../sozius-client/so_bonjourservicequeryrecord.cpp:99: error: undefined reference to 'DNSServiceRefSockFD'
                            ../sozius-client/so_bonjourservicequeryrecord.cpp:133: error: undefined reference to 'DNSServiceProcessResult'
                            ../sozius-client/so_bonjourservicequeryrecord.cpp:145: error: undefined reference to 'DNSServiceRefDeallocate'
                            ../sozius-client/so_bonjourservice.cpp:43: error: undefined reference to 'TXTRecordGetCount'
                            ../sozius-client/so_bonjourservice.cpp:47: error: undefined reference to 'TXTRecordGetItemAtIndex'
                            ../sozius-client/so_bonjourservice.cpp:229: error: undefined reference to 'DNSServiceConstructFullName'
                            ../sozius-client/so_infograph_p.cpp:61: error: undefined reference to 'QwtPlot::setAxisTitle(int, QString const&)'
                            ../sozius-client/so_infograph_p.cpp:99: error: undefined reference to 'QwtPlot::setFooter(QString const&)'
                            ../sozius-client/so_infograph_p.cpp:135: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                            ../sozius-client/so_infograph_p.cpp:152: error: undefined reference to 'QwtPlot::setAxisAutoScale(int, bool)'
                            ../sozius-client/so_infograph_p.cpp:157: error: undefined reference to 'QwtPlot::setAxisAutoScale(int, bool)'
                            ../sozius-client/so_infograph_p.cpp:158: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                            ../sozius-client/so_infograph_p.cpp:177: error: undefined reference to 'QwtPlot::setFooter(QString const&)'
                            ../sozius-client/so_infograph_p.cpp:178: error: undefined reference to 'QwtPlot::setCanvasBackground(QBrush const&)'
                            ../sozius-client/so_infograph_p.cpp:179: error: undefined reference to 'QwtPlot::setAxisTitle(int, QString const&)'
                            ../sozius-client/so_infograph_p.cpp:182: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                            ../sozius-client/so_infograph_p.cpp:183: error: undefined reference to 'QwtPlot::setAxisAutoScale(int, bool)'
                            ../sozius-client/so_infograph_p.cpp:186: error: undefined reference to 'QwtPlot::setAxisScale(int, double, double, double)'
                            ../sozius-client/so_infograph_p.cpp:201: error: undefined reference to 'QwtPlotCurve::QwtPlotCurve(QString const&)'
                            ../sozius-client/so_infograph_p.cpp:203: error: undefined reference to 'QwtPlotCurve::setPen(QColor const&, double, Qt::PenStyle)'
                            ../sozius-client/so_infograph_p.cpp:204: error: undefined reference to 'QwtPlotItem::setRenderHint(QwtPlotItem::RenderHint, bool)'
                            ../sozius-client/so_infograph_p.cpp:248: error: undefined reference to 'QwtPlotCurve::setSamples(QVector<QPointF> const&)'
                            ../sozius-client/so_infograph_p.cpp:249: error: undefined reference to 'QwtPlotItem::attach(QwtPlot*)'
                            ../sozius-client/so_qwtplot.cpp:3: error: undefined reference to 'QwtPlot::QwtPlot(QWidget*)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::metaObject() const'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::qt_metacast(char const*)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::qt_metacall(QMetaObject::Call, int, void**)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::event(QEvent*)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::eventFilter(QObject*, QEvent*)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::resizeEvent(QResizeEvent*)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::canvasMap(int) const'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::updateLayout()'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::drawCanvas(QPainter*)'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::getCanvasMarginsHint(QwtScaleMap const*, QRectF const&, double&, double&, double&, double&) const'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::drawItems(QPainter*, QRectF const&, QwtScaleMap const*) const'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::itemToInfo(QwtPlotItem*) const'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::infoToItem(QVariant const&) const'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:vtable for so_QwtPlot: error: undefined reference to 'QwtPlot::replot()'
                            ../build/Linux/debug/.obj/so_qwtplot.o:so_qwtplot.cpp:typeinfo for so_QwtPlot: error: undefined reference to 'typeinfo for QwtPlot'
                            ../sozius-client/so_qwtplot.h:9: error: undefined reference to 'QwtPlot::~QwtPlot()'
                            /home/staff/Desktop/protobuf/protobuf-2.5.0/build/lib/libprotobuf.a(strutil.o):strutil.cc:function google::protobuf::safe_strtof(char const*, float*): error: undefined reference to 'strtof'
                            collect2: error: ld returned 1 exit status
                            make: *** [../build/Linux/debug/libsozius-client.so] Error 1
                            12:13:04: The process "/usr/bin/make" exited with code 2.
                            Error while building/deploying project sozius-client (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
                            When executing step "Make"
                            12:13:04: Elapsed time: 02:52.
                            
                            

                            My questions are:

                            1. what architecture/configuration does qwt need? I have several of them on my machine
                            /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so.6.1.2: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=131bd147d36585511f96ccd14ba1ccdd88c327cc, stripped
                            
                            
                            /media/qt5-qwt6/lib/libqwt.so.6.1.2: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=131bd147d36585511f96ccd14ba1ccdd88c327cc, stripped
                            
                            
                            /media/qt5-qwt6/qwt_android/qwt-6.1.3/lib/libqwt.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                            
                            1. why is -ldns_sd not found? The dynamic libraries are definitely installed. Is it because they are not static libraries like the ones for protobuf?
                            /usr/lib64/libdns_sd.so
                            /usr/lib64/libdns_sd.so.1
                            /usr/lib64/libdns_sd.so.1.0.0
                            

                            Thank you for your patience with me

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by jsulm
                            #15

                            @a_so You need ARM build of libqwt (same as protobuf) as you're going to use it on an ARM processor, right?
                            Fix your pro file:

                            LIBS += -L/media/qt5-qwt6/qwt_android/qwt-6.1.3/lib -lqwt
                            INCLUDEPATH += /media/qt5-qwt6/qwt_android/qwt-6.1.3/include
                            

                            Are those directories on your host machine?

                            /usr/lib64/libdns_sd.so
                            /usr/lib64/libdns_sd.so.1
                            /usr/lib64/libdns_sd.so.1.0.0
                            

                            If so, then please keep in mind that you cannot use them on your target (again: your target is ARM). You need libdns_sd.so in your sysroot. Is it there?

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              a_so
                              wrote on last edited by a_so
                              #16

                              I edited the .pro file as you suggested, but I get the warning

                              :-1: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
                              

                              The warning appears, yet I do not see any associated errors with qwt. I guess, this warning is implemented somewhere in the project and appears. But of course I used the paths you suggested. I should not worry too much about this warning, right?

                              The directories are on my host machine on which I run my qt. What do you mean by sysroot?

                              jsulmJ 1 Reply Last reply
                              0
                              • A a_so

                                I edited the .pro file as you suggested, but I get the warning

                                :-1: warning: skipping incompatible /home/staff/Qt5.8.0/5.8/android_armv7/lib/libqwt.so while searching for qwt
                                

                                The warning appears, yet I do not see any associated errors with qwt. I guess, this warning is implemented somewhere in the project and appears. But of course I used the paths you suggested. I should not worry too much about this warning, right?

                                The directories are on my host machine on which I run my qt. What do you mean by sysroot?

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #17

                                @a_so Do you build for Android when this warning occurs?

                                Your sysroot seems to be --with-sysroot=/media/qt5-qwt6/android_sdk/Sdk/ndk-bundle/sysroot

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  a_so
                                  wrote on last edited by a_so
                                  #18

                                  Yes. I found the problem for this. I copied the library files in there once and as the content in this path is loaded when I try to build the project, this warning gets displayed. My errors now are all linked to libdns from avahi.

                                  /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
                                  ../sozius-client/so_bonjourservicebrowser.cpp:57: error: undefined reference to 'DNSServiceRefDeallocate'
                                  ../sozius-client/so_bonjourservicebrowser.cpp:92: error: undefined reference to 'DNSServiceBrowse'
                                  ../sozius-client/so_bonjourservicebrowser.cpp:103: error: undefined reference to 'DNSServiceRefSockFD'
                                  ../sozius-client/so_bonjourservicebrowser.cpp:138: error: undefined reference to 'DNSServiceProcessResult'
                                  ../sozius-client/so_bonjourserviceresolver.cpp:79: error: undefined reference to 'DNSServiceRefDeallocate'
                                  ../sozius-client/so_bonjourserviceresolver.cpp:121: error: undefined reference to 'DNSServiceResolve'
                                  ../sozius-client/so_bonjourserviceresolver.cpp:132: error: undefined reference to 'DNSServiceRefSockFD'
                                  ../sozius-client/so_bonjourserviceresolver.cpp:169: error: undefined reference to 'DNSServiceProcessResult'
                                  ../sozius-client/so_bonjourservicereconfirmer.cpp:46: error: undefined reference to 'DNSServiceQueryRecord'
                                  ../sozius-client/so_bonjourservicereconfirmer.cpp:57: error: undefined reference to 'DNSServiceRefSockFD'
                                  ../sozius-client/so_bonjourservicereconfirmer.cpp:104: error: undefined reference to 'DNSServiceProcessResult'
                                  ../sozius-client/so_bonjourservicereconfirmer.cpp:122: error: undefined reference to 'DNSServiceConstructFullName'
                                  ../sozius-client/so_bonjourservicereconfirmer.cpp:140: error: undefined reference to 'DNSServiceRefDeallocate'
                                  ../sozius-client/so_bonjourservicereconfirmer.cpp:161: error: undefined reference to 'DNSServiceReconfirmRecord'
                                  ../sozius-client/so_bonjourservicequeryrecord.cpp:84: error: undefined reference to 'DNSServiceQueryRecord'
                                  ../sozius-client/so_bonjourservicequeryrecord.cpp:99: error: undefined reference to 'DNSServiceRefSockFD'
                                  ../sozius-client/so_bonjourservicequeryrecord.cpp:133: error: undefined reference to 'DNSServiceProcessResult'
                                  ../sozius-client/so_bonjourservicequeryrecord.cpp:145: error: undefined reference to 'DNSServiceRefDeallocate'
                                  ../sozius-client/so_bonjourservice.cpp:43: error: undefined reference to 'TXTRecordGetCount'
                                  ../sozius-client/so_bonjourservice.cpp:47: error: undefined reference to 'TXTRecordGetItemAtIndex'
                                  ../sozius-client/so_bonjourservice.cpp:229: error: undefined reference to 'DNSServiceConstructFullName'
                                  collect2: error: ld returned 1 exit status
                                  make: *** [../build/Linux/debug/libsozius-client.so] Error 1
                                  10:40:03: The process "/usr/bin/make" exited with code 2.
                                  Error while building/deploying project sozius-client (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
                                  When executing step "Make"
                                  10:40:03: Elapsed time: 00:01.
                                  

                                  My sysroot for ndk is

                                  export NDK=/media/qt5-qwt6/ndk10/android-ndk-r10e
                                  export SYSROOT=$NDK/platforms/android-21/arch-arm
                                  
                                  jsulmJ 1 Reply Last reply
                                  0
                                  • A a_so

                                    Yes. I found the problem for this. I copied the library files in there once and as the content in this path is loaded when I try to build the project, this warning gets displayed. My errors now are all linked to libdns from avahi.

                                    /media/qt5-qwt6/ndk10/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldns_sd
                                    ../sozius-client/so_bonjourservicebrowser.cpp:57: error: undefined reference to 'DNSServiceRefDeallocate'
                                    ../sozius-client/so_bonjourservicebrowser.cpp:92: error: undefined reference to 'DNSServiceBrowse'
                                    ../sozius-client/so_bonjourservicebrowser.cpp:103: error: undefined reference to 'DNSServiceRefSockFD'
                                    ../sozius-client/so_bonjourservicebrowser.cpp:138: error: undefined reference to 'DNSServiceProcessResult'
                                    ../sozius-client/so_bonjourserviceresolver.cpp:79: error: undefined reference to 'DNSServiceRefDeallocate'
                                    ../sozius-client/so_bonjourserviceresolver.cpp:121: error: undefined reference to 'DNSServiceResolve'
                                    ../sozius-client/so_bonjourserviceresolver.cpp:132: error: undefined reference to 'DNSServiceRefSockFD'
                                    ../sozius-client/so_bonjourserviceresolver.cpp:169: error: undefined reference to 'DNSServiceProcessResult'
                                    ../sozius-client/so_bonjourservicereconfirmer.cpp:46: error: undefined reference to 'DNSServiceQueryRecord'
                                    ../sozius-client/so_bonjourservicereconfirmer.cpp:57: error: undefined reference to 'DNSServiceRefSockFD'
                                    ../sozius-client/so_bonjourservicereconfirmer.cpp:104: error: undefined reference to 'DNSServiceProcessResult'
                                    ../sozius-client/so_bonjourservicereconfirmer.cpp:122: error: undefined reference to 'DNSServiceConstructFullName'
                                    ../sozius-client/so_bonjourservicereconfirmer.cpp:140: error: undefined reference to 'DNSServiceRefDeallocate'
                                    ../sozius-client/so_bonjourservicereconfirmer.cpp:161: error: undefined reference to 'DNSServiceReconfirmRecord'
                                    ../sozius-client/so_bonjourservicequeryrecord.cpp:84: error: undefined reference to 'DNSServiceQueryRecord'
                                    ../sozius-client/so_bonjourservicequeryrecord.cpp:99: error: undefined reference to 'DNSServiceRefSockFD'
                                    ../sozius-client/so_bonjourservicequeryrecord.cpp:133: error: undefined reference to 'DNSServiceProcessResult'
                                    ../sozius-client/so_bonjourservicequeryrecord.cpp:145: error: undefined reference to 'DNSServiceRefDeallocate'
                                    ../sozius-client/so_bonjourservice.cpp:43: error: undefined reference to 'TXTRecordGetCount'
                                    ../sozius-client/so_bonjourservice.cpp:47: error: undefined reference to 'TXTRecordGetItemAtIndex'
                                    ../sozius-client/so_bonjourservice.cpp:229: error: undefined reference to 'DNSServiceConstructFullName'
                                    collect2: error: ld returned 1 exit status
                                    make: *** [../build/Linux/debug/libsozius-client.so] Error 1
                                    10:40:03: The process "/usr/bin/make" exited with code 2.
                                    Error while building/deploying project sozius-client (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
                                    When executing step "Make"
                                    10:40:03: Elapsed time: 00:01.
                                    

                                    My sysroot for ndk is

                                    export NDK=/media/qt5-qwt6/ndk10/android-ndk-r10e
                                    export SYSROOT=$NDK/platforms/android-21/arch-arm
                                    
                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #19

                                    @a_so Where is libdns_sd.so ?

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      a_so
                                      wrote on last edited by a_so
                                      #20

                                      it is in:

                                      /usr/lib64
                                      

                                      But this is a x86_64 version for my linux host system. I want to build my shared library libdns_sd.so for arm architecture, but was not successful as a file is missing according to the link:

                                      http://gaiger-programming.blogspot.co.at/2015/12/utilize-avahi-libraries-in-android-for.html

                                      I have already contacted avahi but have not received a reply yet.

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • A a_so

                                        it is in:

                                        /usr/lib64
                                        

                                        But this is a x86_64 version for my linux host system. I want to build my shared library libdns_sd.so for arm architecture, but was not successful as a file is missing according to the link:

                                        http://gaiger-programming.blogspot.co.at/2015/12/utilize-avahi-libraries-in-android-for.html

                                        I have already contacted avahi but have not received a reply yet.

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #21

                                        @a_so Do you mean 0002-Add-uninstalled.pc.in-files.patch ?
                                        I just downloaded it clicking on it on that web site.

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          a_so
                                          wrote on last edited by
                                          #22

                                          Yes. Your are right. It works. When I tried to download it some days ago I got directed to a shutdown avahi page. So I will try to generate the library files for arm. Hopefully it works. Thank you for your help!

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved