View Single Post
Old 04-06-2012, 05:08 PM   #9
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
You've made good progress. The missing libraries are also available within the firmware file. The libQtWebKit.so library itself depends on a few other libQt* libraries. So, you'll need to copy them all to the device in a way that browser.app will be able to use them. So here goes:

Create a directory for the library files on the device, say /mnt/ext1/system/lib. Then copy over the libQtWebKit.so.4.9.0 file to that directory. You should also copy over the libQt* files in /media/lib to the same directory (assuming you mounted the files as I showed earlier).

The files can't be used as shared libraries as is, because they are generally referred to by shorter names like libQtWebKit.so.4. This is to allow one to upgrade the library files without needing to rebuilt the programs that use them as well, as long as they refer to a library file with the same major version number (like '4' in this case). Rather than wasting space and making more copies with different names, shared links are used instead to give the same file multiple names. For example, ' ls -l /mnt/lib/libQt*' will show you the shorter names pointing to each full file. You can see that the links are small in size, and only the full file takes up the full space.

I don't know if you can create these links from a Windows command shell. It might be easier to allow your Ubuntu to access the reader via USB and create the links that way. If you go that route, then you should go into the new library directory and create the links with commands like this:

Code:
ln -s libQtWebKit.so.4.9.0 libQtWebKit.so.4
ln -s libQtWebKit.so.4.9.0 libQtWebKit.so
If that turns out to be too much bother, then you can just copy the files and say to hell with saving diskspace:

Code:
cp libQtWebKit.so.4.9.0 libQtWebKit.so.4
cp libQtWebKit.so.4.9.0 libQtWebKit.so
Finally, you have to let the program know where to look for the new shared libraries, because the new /mnt/ext1/system/lib directory is not in the default search path for such things. You can do this by adding the following line inside your shell script for starting browser.app:

Code:
export LD_LIBRARY_PATH=/mnt/ext1/system/lib:$LD_LIBRARY_PATH
Place the line before the one where you call the app, and the app will use LD_LIBRARY_PATH to find the library files in their new location.

That should solve your missing libraries problem. I tried all this on my 902, and got to the next error message:

Code:
Failed to load platform plugin "". Available platforms are:
so it looks like some kind of Qt plugins also need to be copied over. It's lunchtime for me, so I'll have to get back to this later, but maybe you can figure it out on your own in the meantime.

Last edited by rkomar; 04-06-2012 at 05:12 PM.
rkomar is offline   Reply With Quote