View Single Post
Old 03-15-2012, 06:18 PM   #29
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by hawhill View Post
I have serious doubts that this would be sufficient. The DirectFB library will probably dl() other libraries, here those residing in /usr/lib/directfb-1.2-0/. So those would be needed, too. Maybe there are some resource bits in /usr/share, too.

Also, I would suggest to be very careful when it comes to add things to the root file system. Later Updates tend to make assumptions about available storage and may fail badly when things really go wrong.

To make things worse, DirectFB might itself pull in other dependencies (font handling comes to my mind) and chances are that at some point there will be binary incompatibilities.
Personally, I like to static-link stuff so all its dependencies are included. Although it makes a much larger executable, on the kindles we (usually) only perform one major task at a time, and there is plenty of room on /mnt/us/. When I really need to load a library for cross-licensing (LGPL called from closed-source code), I link it with a library path /mnt/us/lib. I did that for SDL 1.2 (LGPL), and it worked fine, with no need to define LD_LIBRARY_PATH before running my SDL apps.

A static linked app does not depend on incompatible library versions on older kindles, so it can work on new and old kindle models alike. I have tested some of my code on firmware 2.5.8 though 5.0.4, and it works fine with no complaints.

Of course, you need to build your apps to look for other resources in a /mnt/us subdirectory too...

Last edited by geekmaster; 03-15-2012 at 06:20 PM.
geekmaster is offline   Reply With Quote