在开发板上测试hello程序出错及解答过程

上一篇 / 下一篇  2009-01-08 16:46:44 / 个人分类:Linux(含QT)

./hello
error:
/hello: error while loading shared libraries: libqte.so.2: cannot open shared o
bject file: No such file or directory
try to run sister hello here
# /tmp/hello
error:
Cannot find font definition file /home/qte/qt-embedded-free-3.3.4/lib/fonts/font
dir - is Qt installed correctly?
but there is truly no direcotory named /home/qte/.... on arm now, strange!
then i
#mount mp3 on /peter
then
i export LD_LIBRARY_PATH=/path/to/my/lib
then
#./hello
still same error:lib not found.
then i
usr/qt/lib # mv libqte.so.2* /peter/mhel/ql/
error:
mv: cannot create symlink `/peter/mhel/ql/libqte.so.2': Operation not permitted
mv: cannot create symlink `/peter/mhel/ql/libqte.so.2.3': Operation not permitte
d
mv: unable to preserve ownership of `/peter/mhel/ql/libqte.so.2.3.1': Operation
not permitted
so finally the sis lib itself is on mp3, but the two symbol links
are still there on arm
the lib's name become capitalized when i open it again in windows.
that means i can not copy it back to arm directly now!!!
that is bad, since linux is case sensitive.
ok anyway,now reboot
the sis-hello runs as before, so i know the /usr/qt/lib is not in use.
it is the /lib/libqte that matters.
so now
*************************
/ # ./hello
./hello: error while loading shared libraries: libqte.so.2: cannot open shared o
bject file: No such file or directory
#cd lib
#ln -s libqte.so.3 libqte.so.2
#cd /
# ./hello
./hello: error while loading shared libraries: libstdc++.so.5: cannot open share
d object file: No such file or directory
 # cd  lib/
/lib # ln -s libstdc++.so.6 libstdc++.so.5
#cd /
 # ./hello
./hello: /lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by ./hel
lo)
later, i find libstdc++.so.5 is in /usr/local/arm/3.3.2/lib
people on net say libstdc++.so.5 and .6 are incompatiable, that's bad.
**
lib # ln -s libstdc\+\+-3-libc6.1-2-2.10.0.so  libstdc++.so.5
peter: i make a symbol linux to a symbol link before, and it does not work,
this time i think i am right,
because  error message is different, and part of it is what shows up when i
try to run sis_hello
/hello: /lib/libstdc++.so.5: no version information available (required by /hell
o)
Cannot find font definition file /home/qte/qt-embedded-free-3.3.4/lib/fonts/font
dir - is Qt installed correctly?
**reboot arm
# ./hello
./hello: /lib/libstdc++.so.5: no version information available (required by ./he
llo)
QSocket::writeBlock: Socket is not open
QSocket::writeBlock: Socket is not open
QSocket::writeBlock: Socket is not open
No Qt/Embedded server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.
peter: from all above, i believe libqte.so.3 and .2 is compatiable. but the libstdc++6
refuse to corperate.
********
when i copy the right libstdc++
from /usr/local/arm/3.3.2/arm-linux/lib
and make the needed symbol link to it
then
#./hello
the "no version information available" error disappers
but the "Qsocket error" remains, reboot, nothing shows up on the screen.
now may be the fake lqte.so is responsible!
*******************
now i will use a fake libstdC++, and a right lqte, wait and see
/lib # ln -s libqte~1.7 libqte.so.2
/lib # cd ..
/ # ./hello
./hello: /lib/libstdc++.so.5: no version information available (required by ./he
llo)
./hello: relocation error: /lib/libqte.so.2: undefined symbol: __cxa_pure_virtua
l
peter: it is obvious that the lqte is right now. something wrong is with libstdc++.
and one interesting phenomenon can be seen that even the empty screen do not shows up.
i think i can understand, it is because qte needs the libc++, now that my hello invokes
the fake c++ lib, so the qte fails to run.
*********************************
since there is not enough space on arm,
i need to move libqte.so.3 or libstdc++.so.6 out of arm.
once that are moved onto mp3, the name will be changed(caoitalized),
can i move it back?
now i
#mv /lib/libqte.so.3.3.4 /peter
peter/ is mp3
then, reboot, no blue screen can be seen.
now i will change the name of libqte back,

and copy it back
it is done. you just need to be very careful about the name.
copy the lib to mp3 will not ruin it. that's good.
*******************
so finally when there is
/lib/libstdc++.so.5(plus its symbol link)
/lib/libqte.so.2(symbol link is also needed)
my hello runs on arm perfectly.

 


TAG:

 

评分:0

我来说两句

Open Toolbar