Thread: iLiad How to replace /usr/lib?
View Single Post
Old 04-10-2009, 09:55 AM   #7
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
Another question:
I campared the size of original libs and my ported shared object and found that original libs are much more small. I don't know the reason. Did iRex rip some unneeded code to make it smaller? Or did irex stripped the shared objects?
I presume that irex stripped the shared libraries.

And about how to proceed to find your current problem, the first thing to watch is that you have all the needed libraries for every app.

You can use scratchbox' ldd script in the iliad for that, just copy it over. It can help you with your library woes.

Try this (after copying the ldd script to the CF's /usr/bin):

1. In the CF leave irex' /usr/lib as-is, an put your recompiled libraries in /usr/mylib

2. Start the iliad and open an ssh session to it

3. setup LD_LIBRARY_PATH to your library dir and test that all programs find all the required libraries (if a library is not found it says just that; so you can grep directly for it):
Code:
# export LD_LIBRARY_PATH=/usr/mylib
# ldd /usr/bin/contentLister
# ldd /usr/bin/contentLister | grep ound
You can batch-test all binaries with something like this:

Code:
# for i in /usr/bin/* ; do echo [$i] ; ldd "$i" | grep ound ; done
That is only to test for missing ones. if you know the ones you want to delete, you can redirect the list to a file and grep for them (one after another) later:

Code:
# for i in /usr/bin/* ; do echo [$i] >> /tmp/lddlist.txt ; ldd "$i">> /tmp/lddlist.txt; done
# for i in `cat /tmp/list_of_libs_i_ll_delete.txt` ; do grep $i /tmp/lddlist.txt ; done
P.S.: for more information about ldd, see this post: https://www.mobileread.com/forums/sho...2&postcount=19

Last edited by Antartica; 04-10-2009 at 10:02 AM.
Antartica is offline   Reply With Quote