I compiled a C++ program on my Ubuntu computer using arm-linux-gnueabi-g++ and copied it over to my device that has an iMX6 (a Gateworks GW5100 board with a yocto build). Unfortunately, I'm getting a "no such file or directory" error when I try to execute the program. I've verified the permissions on the file are correct and that the file copied successfully. I just can't execute it.
Is there any reason arm-linux-gnueabi-g++ is the wrong cross compiler to use for the iMX6? Is there another one I should use instead?
Here is the output of running "file" on the executable:
sw: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=34622f94d6f088b50e31bcd08ecd14f57947fee5, not stripped
Thank you.
I managed to figure this out and get it to work. It was one of two things, but I'm not sure which one it is.
My program required libusb, which I had previously cross-compiled using arm-linux-gnueabihf-gcc (note the hard float suffix). But I compiled my code using arm-linux-gnueabi-g++ (not hard float). After that, I had the problem I described above. When I went back and recompiled everything with the hf compilers, it worked.
So either 1) both libusb and my code needed to be compiled with the same float-type or 2) the iMX6 requires hard float regardless of anything else. Either way my program works on the iMX6 board now.
I specifically registered an account to reply to you, and your solution works
As libusb required by your code requires hardware floating point library you need to have this library on the filesystem even if your code itself uses software floating point.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------