Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Unsolved problem in running Qt app on nanoPC-T2

    Mobile and Embedded
    2
    14
    3926
    Loading More Posts
    • 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.
    • jsulm
      jsulm Lifetime Qt Champion @MhM93 last edited by

      @MhM93 Well, it tells you what is wrong: one of the shared libraries your application needs has a wrong version.
      Do

      ldd test2
      

      to see which libraries are needed. You probably need to deploy your app properly to your target, means: copy needed libraries as well. For more information see: http://doc.qt.io/qt-5/linux-deployment.html

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

      1 Reply Last reply Reply Quote 1
      • MhM93
        MhM93 last edited by MhM93

        root@NanoPC-T2:/# ldd ./test2
            not a dynamic executable
        

        H.Ghassami

        jsulm 1 Reply Last reply Reply Quote 0
        • jsulm
          jsulm Lifetime Qt Champion @MhM93 last edited by

          @MhM93 What does

          file test2
          

          say?

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

          1 Reply Last reply Reply Quote 1
          • MhM93
            MhM93 last edited by MhM93

            [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 Reply Quote 0
            • MhM93
              MhM93 last edited by

              could any one help me?
              I am confused

              H.Ghassami

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @MhM93 last edited by

                @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 Reply Quote 0
                • MhM93
                  MhM93 last edited by

                  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

                  jsulm 1 Reply Last reply Reply Quote 0
                  • jsulm
                    jsulm Lifetime Qt Champion @MhM93 last edited by

                    @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 Reply Quote 0
                    • MhM93
                      MhM93 last edited by

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

                      H.Ghassami

                      jsulm 1 Reply Last reply Reply Quote 0
                      • jsulm
                        jsulm Lifetime Qt Champion @MhM93 last edited by

                        @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

                        MhM93 1 Reply Last reply Reply Quote 0
                        • MhM93
                          MhM93 @jsulm last edited by MhM93

                          @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 Reply Quote 0
                          • First post
                            Last post