09-03-2013, 07:00 AM | #16 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Although we may have to use both a /lib and a /usr/lib to keep the dynamic library loader happy. (Combining the two 'trusted' library trees was not a well thought out idea when I wrote it.) |
|
09-03-2013, 08:57 AM | #17 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Well.... The whole problem with FAT is the SO names no longer ACTUALLY point to their long SO counterparts, they are in fact a copy of the long-named so versions since FAT does not support links. Neatly and effectively breaking the SO name fail-over system.
This makes the task of providing ALL libs in one place impractical. however many libs get used again and again - and the modules required for the 3 different flavours of kernel we have don't change so those things will make it into KUAL-system. so - in a nutshell - those libs required to provide the support for the systems binaries provided by kual-system will indeed go into /mnt/us/extensions/system/lib/armv7l /mnt/us/extensions/system/lib/armv6l and /mnt/us/extensions/system/lib and the relevant LD_LIBRARY_PATHs are added to the main. if people choose to then put bits of their libs in there then they would indeed be instantly resolved, but this is not a long term, or stand-alone, solution for the problem of library duplication and a /mnt/us/extensions/my_app/lib/ folder would be required in most cases to ensure libs are available - other than those libs that end up being staple libs for the kual-system itself. Hope that is clear if not that helpful. |
09-03-2013, 09:18 AM | #18 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
There may be solutions to the lack of link support on fat32 - -
But I don't have a working and tested solution (yet) - So the situation is like twobob describes above. Which is not all bad - Since 'specialized' libraries used only by one add-in for now have to be in that add-in's collection of files. That is because we don't have anything resembling *nix package management to tell us when a library file is no longer needed on the system (or is needed and missing). This situation is not being 'over looked' - Just that things are, for now at least, as twobob explained above. I.E: A Windows file system on which we follow the Windows installation plan. Last edited by knc1; 09-03-2013 at 09:24 AM. |
09-06-2013, 01:27 AM | #19 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
@brian. hmm yeah this less aggressive than the later filegrabber
I'll see about grabbing it off at some point. Just burned a pile of time going through failed overlay solutions for the fronter... sigh. Bed. |
09-06-2013, 01:32 AM | #20 | |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
Quote:
seriously, when you get time is fine. thank you again! I do like the smilies! |
|
10-13-2013, 03:16 PM | #21 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
based on Niljues suggestion to try to improve this via ldd...
I have come up with: THING="/mnt/us/debian/usr/games/gtkboard" (for example) then... ldd $THING | tail +2 | awk '{a[NR%4]=$1}NR>1{print a[(NR-1)%4]}' (this skips the /usr/lib/libenvload.so and /lib/ld-linux.so.3 results as well as only printing the library names we are interested in. I'll look to weld that into the exporter to give better all-round results. EDIT: so in-context this would be: #OLD THING #FILES=$(readelf -d ${@} |awk -F\[ ' /Shared library/ {print $2}' | cut -d"]" -f1) #NEW THING FILES=$(ldd ${@} | tail +2 | awk '{a[NR%4]=$1}NR>1{print a[(NR-1)%4]}') I will look to ALSO: still find NON-native equivalents of kindle supported libs (may take longer... but will save some time in the longrun on known trouble makers like libgthread-2.0.so.0 etc..) that'll probably make it into the next update. Last edited by twobob; 10-13-2013 at 03:25 PM. |
10-13-2013, 04:42 PM | #22 |
BLAM!
Posts: 13,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@twobob:
You're welcome to look at the pax-utils tools from the Gentoo hardened guys (https://wiki.gentoo.org/wiki/Project.../PaX_Utilities / http://dev.gentoo.org/~vapier/dist/), notably the lddtree script (that prints the full dependency tree of a binary/lib, following the deps of each lib), and the symtree script that points out weak/unresolved symbols. |
10-13-2013, 05:01 PM | #23 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Thanks!
I have been working on this thing since I last updated... [root@kindle root]# filegrabber /mnt/us/debian/usr/games/gtp-rhino Code:
------------------------------------------------ BUILD LIST OF DEPENDENT LIBS AND THEIR LOCATIONS ------------------------------------------------ FINDING CANDIDATE FOR: libpthread.so.0 LOCATED AT: /mnt/us/debian/lib/arm-linux-gnueabi/libpthread.so.0 FINDING CANDIDATE FOR: libgnomeui-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libgnomeui-2.so.0 FINDING CANDIDATE FOR: libSM.so.6 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libSM.so.6 FINDING CANDIDATE FOR: libICE.so.6 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libICE.so.6 FINDING CANDIDATE FOR: libbonoboui-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libbonoboui-2.so.0 FINDING CANDIDATE FOR: libgnomevfs-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libgnomevfs-2.so.0 FINDING CANDIDATE FOR: libgnomecanvas-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libgnomecanvas-2.so.0 FINDING CANDIDATE FOR: libgnome-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libgnome-2.so.0 FINDING CANDIDATE FOR: libpopt.so.0 LOCATED AT: /mnt/us/debian/lib/arm-linux-gnueabi/libpopt.so.0 FINDING CANDIDATE FOR: libbonobo-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libbonobo-2.so.0 FINDING CANDIDATE FOR: libbonobo-activation.so.4 LOCATED AT: /mnt/us/debian/usr/lib/libbonobo-activation.so.4 FINDING CANDIDATE FOR: libORBit-2.so.0 LOCATED AT: /mnt/us/debian/usr/lib/libORBit-2.so.0 FINDING CANDIDATE FOR: libart_lgpl_2.so.2 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libart_lgpl_2.so.2 FINDING CANDIDATE FOR: libgtk-x11-2.0.so.0 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libgtk-x11-2.0.so.0 FINDING CANDIDATE FOR: libgdk-x11-2.0.so.0 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libgdk-x11-2.0.so.0 FINDING CANDIDATE FOR: libatk-1.0.so.0 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libatk-1.0.so.0 FINDING CANDIDATE FOR: libgio-2.0.so.0 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libgio-2.0.so.0 it's not 100% complete yet but I slightly misunderstood the usage of ldd - however I have now linked it WITH readelf... hopefully my new system (partial output above...) will be the full article... I will FOR SURE check out the link. Thanks mate. |
10-13-2013, 08:06 PM | #24 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
hmmm... this looks a bit better as an output.
This version of the script DOES make an assumption.. debian is mounted as/at /mnt/us/debian if it isn't then you have to amend that variable.. but it runs a bazzilion times faster than the previous version... (which still isn't fast but... yeah) and should try to find all sub-dependencies. No doubt as I learn more I will realise there are improvements that could be made... OUTPUT: [root@kindle bin]# filegrabber /mnt/us/debian/usr/games/pente Code:
------------------------------------------------ BUILD LIST OF DEPENDENT LIBS AND THEIR LOCATIONS ------------------------------------------------ FINDING CANDIDATE FOR: libX11.so.6 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libX11.so.6 copied /mnt/us/debian/usr/lib/arm-linux-gnueabi/libX11.so.6 to /mnt/us/export/pente/lib/libX11.so.6 FINDING CANDIDATE FOR: libncurses.so.5 LOCATED AT: /mnt/us/debian/lib/arm-linux-gnueabi/libncurses.so.5 copied /mnt/us/debian/lib/arm-linux-gnueabi/libncurses.so.5 to /mnt/us/export/pente/lib/libncurses.so.5 FINDING CANDIDATE FOR: libnsl.so.1 LOCATED AT: /mnt/us/debian/lib/arm-linux-gnueabi/libnsl.so.1 copied /mnt/us/debian/lib/arm-linux-gnueabi/libnsl.so.1 to /mnt/us/export/pente/lib/libnsl.so.1 FINDING CANDIDATE FOR: libxcb.so.1 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libxcb.so.1 copied /mnt/us/debian/usr/lib/arm-linux-gnueabi/libxcb.so.1 to /mnt/us/export/pente/lib/libxcb.so.1 FINDING CANDIDATE FOR: libXau.so.6 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libXau.so.6 copied /mnt/us/debian/usr/lib/arm-linux-gnueabi/libXau.so.6 to /mnt/us/export/pente/lib/libXau.so.6 FINDING CANDIDATE FOR: libXdmcp.so.6 LOCATED AT: /mnt/us/debian/usr/lib/arm-linux-gnueabi/libXdmcp.so.6 copied /mnt/us/debian/usr/lib/arm-linux-gnueabi/libXdmcp.so.6 to /mnt/us/export/pente/lib/libXdmcp.so.6 filelist = libtinfo.so.5 copying /mnt/us/debian/usr/games/pente to /mnt/us/export/pente/bin/pente Searching 774 user libs, 84 libs, 13 extended dirs libtinfo.so.5 non native result /mnt/us/debian/lib/arm-linux-gnueabi/libtinfo.so.5 Export complete at /mnt/us/export/pente ensure you run pente like: cd /mnt/us/export/pente/bin; LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH ./pente I'll up it to the top post. |
10-13-2013, 09:58 PM | #25 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
my version based on what you had before: still needs lots of work but not too bad for just getting what I needed. This had the kindle-lib directory stuff backwards a bit, but I can always delete what I don't need.
|
10-13-2013, 10:00 PM | #26 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
nice...
The version I am working on (hopefully) will iterate over the sub-dependencies... (If I ever work it out!) like your use of cmp may subsume that Thanks for that much obliged. Last edited by twobob; 10-13-2013 at 10:13 PM. |
10-13-2013, 10:14 PM | #27 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I was thinking maybe have it export directly to /mnt/us/extensions/blah and maybe set up a simple config and json file for KUAL to be edited, most of the stuff done already. So I don't have to cat and copy/paste the first time command line
|
10-13-2013, 10:47 PM | #28 | ||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Yeah. I'm just giving your script the once over again.
Looks pretty complete actually... I'm gonna run it against something brutal and see how it fares. may just tweak it a bit, for example: Quote:
Quote:
better than mine. |
||
10-13-2013, 10:57 PM | #29 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I just steal all the awk stuff off the net cause I still hate regular expressions...
Also a good time to use it is if I do compile the program and can't figure what libs it actually needs. Man you have helped me SO MUCH! This is really fun now! |
Tags |
bash, export, k5 tools, kindle, kindle tools, tools |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |
"White Spaces Are Required"...PLEASE HELP! | UntreedReads | ePub | 12 | 07-22-2010 03:47 PM |
Checking in public library books and "Borrowed" status | Lucybelle | Sony Reader | 2 | 03-24-2010 01:42 AM |