Power & Source of Big Ideas

what is Exit 127 on my Qt app on nanoPc-T1?

Moderators: chensy, FATechsupport

I use this guide document to install cross compiler 4.9.3 and also qt4.8.6. this said:"

Install Qt-Embedded on Host PC

Visit the product page of one of the following products and download the target-ate-4.8.6-to-hostpc.tgz file:

NanoPi2, NanoPi M2, NanoPi T2: Download

Enter the root directory and uncompress the file:

cd / tar xvzf ~/target-ate-4.8.6-to-hostpc.tgz

After it is done verify it by using the following command:

/usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -v

If you install it successfully you will get the following information: QMake version 2.01a Using Qt version 4.8.6 in /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib Install Cross Compiler on Host PC (arm-linux-gcc 4.9.3)

Download and uncompress the compiler:

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/

Add the compiler's directory to "PATH" and append the following lines in "~/.bashrc":

export PATH=/opt/FriendlyARM/toolchain/4.9.3/bin:$PATH export GCC_COLORS=auto

Run "~/.bashrc" to make your setting effective. Attention: there is a space after ".":

. ~/.bashrc

This compiler is a 64-bit one therefore it cannot be run on a 32-bit Linux machine. After the compiler is installed you can verify it by running the following commands:

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-gnueabihf/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 ... Thread model: posix gcc version 4.9.3 (ctng-1.21.0-229g-FA) "*

after all, I click on tools>options>build and run>tools chain add the 4.9.3 arm-linux-gcc and add gdb when I copy the program to my device these errors display:

Code: Select all

root@NanoPC-T2:~# . setqt4env
ctp = 1
root@NanoPC-T2:~# test2 -qws &
[1] 1007
-bash: test2: command not found
root@NanoPC-T2:~# test2 -qws&
[2] 1008
[1]   Exit 127                test2 -qws
-bash: test2: command not found
root@NanoPC-T2:~# test2 -qws
-bash: test2: command not found

where is the problem?
When you copied the file to the device did you make it executable with "chmod +x filename" ?
v8dave wrote:
When you copied the file to the device did you make it executable with "chmod +x filename" ?

yes. when I execute it :

Code: Select all

root@NanoPC-T2:/# ./test2 -qws
./test2: error while loading shared libraries: ./test2: unsupported version 9813 of Verneed record

and when I wrote:

Code: Select all

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)

when I add gdb and arm-linux-gcc I saw the ABI is show me 32 bit. why?

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 5 guests