Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. problem in running Qt app on nanoPC-T2

problem in running Qt app on nanoPC-T2

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
14 Posts 2 Posters 4.5k Views
  • 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.
  • MhM93M Offline
    MhM93M Offline
    MhM93
    wrote on last edited by MhM93
    #5
    root@NanoPC-T2:/# ldd ./test2
        not a dynamic executable
    

    H.Ghassami

    jsulmJ 1 Reply Last reply
    0
    • MhM93M MhM93
      root@NanoPC-T2:/# ldd ./test2
          not a dynamic executable
      
      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #6

      @MhM93 What does

      file test2
      

      say?

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

      1 Reply Last reply
      1
      • MhM93M Offline
        MhM93M Offline
        MhM93
        wrote on last edited by MhM93
        #7

        [sorry for delay, last day I can not access my device to test. so sorry]
        file test2 is show this result.
        test2: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)

        It said 32 bit compiler, when I download the gcc I extract gccx64
        git clone https://github.com/friendlyarm/prebuilts.git
        sudo mkdir -p /opt/FriendlyARM/toolchain
        sudo tar xf prebuilts/gcc-x64/arm-cortexa9-linux-gnueabihf-4.9.3.tar.xz -C /opt/FriendlyARM/toolchain/

        this is my output for this command:

        fgit@ubuntu:~$ arm-linux-gcc -v
        Using built-in specs.
        COLLECT_GCC=arm-linux-gcc
        COLLECT_LTO_WRAPPER=/opt/FriendlyARM/toolchain/4.9.3/libexec/gcc/arm-cortexa9-linux-gnueabih![0_1494051336492_89307ef9e388679812dd0b5cd1e6dd49.jpg](/uploads/files/1494051338004-89307ef9e388679812dd0b5cd1e6dd49.jpg) f/4.9.3/lto-wrapper
        Target: arm-cortexa9-linux-gnueabihf
        Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long
        Thread model: posix
        gcc version 4.9.3 (ctng-1.21.0-229g-FA)
        

        but in qt :![image]0_1494051323615_unnamed.png )

        when I attach the compiler in the ABIs write : arm-linux-generic-elf-32

        H.Ghassami

        1 Reply Last reply
        0
        • MhM93M Offline
          MhM93M Offline
          MhM93
          wrote on last edited by
          #8

          could any one help me?
          I am confused

          H.Ghassami

          jsulmJ 1 Reply Last reply
          0
          • MhM93M MhM93

            could any one help me?
            I am confused

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #9

            @MhM93 "It said 32 bit compiler, when I download the gcc I extract gccx64" - the compiler itself is a x86_64 (64bit) binary - this does not mean that it generates 64bit binaries. You are building for ARM 32bit, so it generates ARM 32bit binaries.

            You should do this (as I suggested before) on your target device:

            ldd ./test2
            

            It will should you which libraries are used by your executable.

            "./test2: error while loading shared libraries: ./test2: unsupported version 9813 of Verneed record" - says that one of the libraries on your target has the wrong version number.

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

            1 Reply Last reply
            0
            • MhM93M Offline
              MhM93M Offline
              MhM93
              wrote on last edited by
              #10

              Hi and thanx for reply, I do that if you see above post:

              root@NanoPC-T2:/# ldd ./test2
                      not a dynamic executable
              
              root@NanoPC-T2:/# strace ./test2
              execve("./test2", ["./test2"], [/* 20 vars */]) = 0
              brk(NULL)                               = 0x24000
              uname({sysname="Linux", nodename="NanoPC-T2", ...}) = 0
              access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
              mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6faf000
              access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
              writev(2, [{"./test2", 7}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"./test2", 7}, {": ", 2}, {"unsupported version 9813 of Vern"..., 43}, {"", 0}, {"", 0}, {"\n", 1}], 10./test2: error while loading shared libraries: ./test2: unsupported version 9813 of Verneed record
              
              ) = 100
              exit_group(127)                         = ?
              +++ exited with 127 +++
              root@NanoPC-T2:/# file ./test2
              
              ./test2: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)
              root@NanoPC-T2:/#
              

              how to fix thislibrary version?

              H.Ghassami

              jsulmJ 1 Reply Last reply
              0
              • MhM93M MhM93

                Hi and thanx for reply, I do that if you see above post:

                root@NanoPC-T2:/# ldd ./test2
                        not a dynamic executable
                
                root@NanoPC-T2:/# strace ./test2
                execve("./test2", ["./test2"], [/* 20 vars */]) = 0
                brk(NULL)                               = 0x24000
                uname({sysname="Linux", nodename="NanoPC-T2", ...}) = 0
                access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
                mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6faf000
                access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
                writev(2, [{"./test2", 7}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"./test2", 7}, {": ", 2}, {"unsupported version 9813 of Vern"..., 43}, {"", 0}, {"", 0}, {"\n", 1}], 10./test2: error while loading shared libraries: ./test2: unsupported version 9813 of Verneed record
                
                ) = 100
                exit_group(127)                         = ?
                +++ exited with 127 +++
                root@NanoPC-T2:/# file ./test2
                
                ./test2: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)
                root@NanoPC-T2:/#
                

                how to fix thislibrary version?

                jsulmJ Online
                jsulmJ Online
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #11

                @MhM93 said in problem in running Qt app on nanoPC-T2:

                Verneed record

                Something is wrong with your executable. Can you show the whole build log (compiler output)?

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

                1 Reply Last reply
                0
                • MhM93M Offline
                  MhM93M Offline
                  MhM93
                  wrote on last edited by
                  #12

                  this is my file:
                  https://ufile.io/l2wkq
                  I first wrote it in qt, then compile it

                  H.Ghassami

                  jsulmJ 1 Reply Last reply
                  0
                  • MhM93M MhM93

                    this is my file:
                    https://ufile.io/l2wkq
                    I first wrote it in qt, then compile it

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #13

                    @MhM93 I'm not going to build this (I would need to install the same build tools first), so please post the build log...

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

                    MhM93M 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @MhM93 I'm not going to build this (I would need to install the same build tools first), so please post the build log...

                      MhM93M Offline
                      MhM93M Offline
                      MhM93
                      wrote on last edited by MhM93
                      #14

                      @jsulm :these links are my build tools
                      http://www.mediafire.com/file/g0afghia7rkqx05/arm-cortexa9-linux-gnueabihf-4.9.3-20160512.tar.xz
                      http://www.mediafire.com/file/d54dbygdadergl1/target-qte-4.8.6-to-hostpc.tgz
                      and this is my make log:

                      fgit@ubuntu:~/prjX64/test/test2$ make
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/uic mainwindow.ui -o ui_mainwindow.h
                      arm-linux-g++ -c -pipe -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/mkspecs/qws/linux-armv7-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include -I. -I. -I. -I/tmp/FriendlyARM/nanopi2/libs/usr/include -o main.o main.cpp
                      arm-linux-g++ -c -pipe -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/mkspecs/qws/linux-armv7-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include -I. -I. -I. -I/tmp/FriendlyARM/nanopi2/libs/usr/include -o mainwindow.o mainwindow.cpp
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/mkspecs/qws/linux-armv7-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include -I. -I. -I. -I/tmp/FriendlyARM/nanopi2/libs/usr/include mainwindow.h -o moc_mainwindow.cpp
                      arm-linux-g++ -c -pipe -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/mkspecs/qws/linux-armv7-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include -I. -I. -I. -I/tmp/FriendlyARM/nanopi2/libs/usr/include -o moc_mainwindow.o moc_mainwindow.cpp
                      arm-linux-g++ -Wl,-rpath-link,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o test2 main.o mainwindow.o moc_mainwindow.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
                      fgit@ubuntu:~/prjX64/test/test2$ /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -v
                      QMake version 2.01a
                      Using Qt version 4.8.6 in /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib
                      fgit@ubuntu:~/prjX64/test/test5$ /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -v
                      QMake version 2.01a
                      Using Qt version 4.8.6 in /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib
                      

                      when I decide to install another new empty ubuntu16.4 on vmware and install just these tool chains and do the document I have this error for make command.:

                      root@ubuntu:/# /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -v
                      QMake version 2.01a
                      Using Qt version 4.8.6 in /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib
                      
                      fgit@ubuntu:~/helloqt$ make
                      arm-linux-g++ -Wl,-rpath-link,/tmp/FriendlyARM/nanopi2/libs/usr/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o helloqt main.o    -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -L/tmp/FriendlyARM/nanopi2/libs/usr/lib -lQtNetwork -lQtCore -lpthread 
                      /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: warning: libts-1.0.so.0, needed by /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
                      /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld.bfd: warning: libz.so.1, needed by /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateInit_'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateInit2_'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `compress'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `uncompress'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflate'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `compress2'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateEnd'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `crc32'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflate'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateInit2_'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateInit_'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_read_raw'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateEnd'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_open'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_fd'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_config'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `inflateReset'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `deflateReset'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_close'
                      /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to `ts_read'
                      collect2: error: ld returned 1 exit status
                      Makefile:103: recipe for target 'helloqt' failed
                      make: *** [helloqt] Error 1
                      fgit@ubuntu:~/helloqt$
                      

                      but in the last Ubuntu(that Ubuntu I compiled test2), I had install Qt-everywhere-4.8.6 then I Installed these tool chain on Ubuntu and compile my project successfully and when I copied to device I saw the errors"test2: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading"

                      H.Ghassami

                      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