H.Ghassami
H.Ghassami

Reputation: 1022

what does this error mean: interpreter /lib/ld-linux-armhf.so.3error reading (Invalid argument)

I use this guide enter link description heredocument to install cross compiler 4.9.3 and also qt4.8.6.I installed them and check the version that they correct. 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

then:

cd ~
mkdir helloqt
vi main.cpp

then I wrote it:

#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
        QApplication app (argc, argv);
        QPushButton button ("Hello world !");
        button.show();
        return app.exec();
}

and save it

cd ~/helloqt
/usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -project 
/usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake
make

when I run this program in ubuntu-qt core I see this eeror:

root@NanoPC-T2:/# tftp 192.168.101.4
tftp> get helloqt
Received 11660 bytes in 0.4 seconds
tftp> quit
root@NanoPC-T2:/# chmod +x helloqt
root@NanoPC-T2:/# .setqt4env
-bash: .setqt4env: command not found
root@NanoPC-T2:/# . setqt4env
ctp = 1
root@NanoPC-T2:/# ./helloqt -qws &
[1] 1909
root@NanoPC-T2:/# ./helloqt -qws &
[2] 1910
[1]   Segmentation fault      ./helloqt -qws
root@NanoPC-T2:/# ./helloqt -qws
[2]+  Segmentation fault      ./helloqt -qws
Segmentation fault
root@NanoPC-T2:/#  ./helloqt -qws
Segmentation fault
root@NanoPC-T2:/# [2]+  Segmentation fault      ./helloqt -qws
-bash: [2]+: command not found
root@NanoPC-T2:/# Segmentation fault
-bash: Segmentation: command not found
root@NanoPC-T2:/# file ./helloqt
./helloqt: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)

How can I solve this error?

Upvotes: 2

Views: 1505

Answers (1)

H.Ghassami
H.Ghassami

Reputation: 1022

It means your file binary is damage. I do these to correct the problem:

  1. my tslib configuration is not good and this code solve my first problem:

    sudo ac_cv_func_malloc_0_nonnull=yes ./configure CC=/opt/FriendlyARM/toolchain/4.9.3/bin/arm-none-linux-gnueabihf-gcc CXX=/opt/FriendlyARM/toolchain/4.9.3/bin/arm-none-linux-gnueabihf-g++ --host=arm-none-linux-gnueabihf target=arm-none-linux-gnueabihf --enable-static=yes --enable-shared=yes -prefix=/home/tslib

  2. you should copy the runable program to your device with SFTP(secure ftp), It does not change your file type.

Upvotes: 1

Related Questions