shared libraries file too short
When I want to start the programm on my device I get this error:
error while loading shared libraries: /opt/qt-cross-hf/lib/libQtSerialPort.so.1: file too short
The files in the /opt/qt-cross-hf/lib/ are the same as in my crosscompiler and at the same path.
Any ideas how to fix this ?
Hi and welcome to devnet,
Check the file with ldd to see if it points to a valid library
My Device does not know ldd.
On my PC ldd says "Das Programm ist nicht dynamisch gelinkt" The programm isn't linked dynamic.
ldd is a script that will load and do some processing on your libraries, so you can't call it on a library that's built for a different architecture.
Then if you don't have it on your target (you can copy ldd on your target) you can use the file command to see what type of file is libQtSerialPort.so.1
It seems I don't have file too. How can I copy ldd ?
What OS are you running on your target ?
Then what does ls -la return ?
The same way you copy your other files on your target
The OS is:
PRETTY_NAME="PTXdist / PHYTEC-phyBOARD-MAIA-AM335x"
ldd returns this:
./AirMonTool: error while loading shared libraries: /opt/qt-cross-hf/lib/libQtSerialPort.so.1: file too short
root@phyBOARD-MAIA-AM335x:~ ldd AirMonTool
$ not a dynamic executable
and ls returns:
root@phyBOARD-MAIA-AM335x:/opt/qt-cross-hf/lib ls -la
drwxr-xr-x 2 root root 640 Jan 1 1970 .
drwxrwxrwx 3 root root 224 Jan 1 1970 ..
-rw-r--r-- 1 root root 452 Jan 1 1970 libQtSerialPort.prl
-rw-r--r-- 1 root root 24 Jan 1 1970 libQtSerialPort.so
-rw-r--r-- 1 root root 24 Jan 1 1970 libQtSerialPort.so.1
-rw-r--r-- 1 root root 24 Jan 1 1970 libQtSerialPort.so.1.0
Looks like your files are corrupted. and that you have 3 copies of libQtSerialPort rather than one and two symbolic links