05-23-2012, 09:40 AM | #91 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Hmmm...
tccmake test -lpthread Works on my 5.1.0 kindle. Perhaps this is is a "firmware flavor of the month" problem. Now we just need to know which "flavor" of 5.1.0 that the OP has on his kindle. There are multiple know 5.1.0 firmware versions, all different but using the same firmware version numbers. Because they have different defects, we need a reliable way to identify them so we know when and how to apply our repairs. |
05-23-2012, 09:40 AM | #92 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Now that you have a backup copy of it (be sure to keep it in case we break something). . . . Do: Code:
cd /usr/lib/ mv libpthread.so libpthread.so.bak ln -s /lib/libpthread.so libpthread.so cd - Then we will just over-ride the library search path order in the compile command. Hmm... Maybe that is what I should have described to begin with. Last edited by knc1; 05-23-2012 at 09:59 AM. |
|
Advert | |
|
05-23-2012, 09:41 AM | #93 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
In earlier posts, you can see that another user had a problem with fw 3.3 using nested symlinks, even though they worked fine on my fw3.3. So perhaps there are multiple versions of 3.3 out there too... |
|
05-23-2012, 09:43 AM | #94 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
That should be pretty specific. |
|
05-23-2012, 09:49 AM | #95 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
It works kcn1 |
|
Advert | |
|
05-23-2012, 09:54 AM | #96 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
05-23-2012, 09:56 AM | #97 |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
I did modify the pthread to libpthread in your post forgot to mention that !
|
05-23-2012, 09:58 AM | #98 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I loop mounted another 5.1.0 image somebody sent me, and it appears that this is a library loader script problem just like for libc.
Try replacing your tccmake script contents with this: Code:
#!/bin/sh [[ -f /usr/lib/libc.so ]]&& mount -o bind /mnt/us/tcc/tcc.libc.so /usr/lib/libc.so [[ -f /usr/lib/libpthread.so ]]&& mount -o bind /mnt/us/tcc/tcc.libpthread.so /usr/lib/libpthread.so tcc -I/mnt/us/tcc/include -o $1 $2 $3 $4 $5 $6 $7 $8 $9 $1.c [[ -f /usr/lib/libc.so ]]&& umount /usr/lib/libc.so [[ -f /usr/lib/libpthread.so ]]&& umount /usr/lib/libpthread.so EDIT: Bind mounts like I show above are MUCH safer than making changes to root that could break an OTA update (possibly bricking the kindle). Please UNDO the changes you made and try my script. It is the same problem as libc, so the fix shown above WILL work. Although the changes you made are fine for testing (if you allow for undoing them like knc1 suggested with the backup copy of the old file). Please undo your changes and do it the right way as I showed, to prevent bricking your kindle. Thanks. Also, I want confirmation that the CORRECT (bind mount) fix that I provided works as expected. Last edited by geekmaster; 05-23-2012 at 10:05 AM. |
05-23-2012, 09:58 AM | #99 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
If you would please edit your post, where you quoted my typo - the world will be a better place for the KT. Last edited by knc1; 05-23-2012 at 10:00 AM. |
|
05-23-2012, 10:02 AM | #100 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
Hmm the above method of completely replacing the libpthread.so file actually solved the problem Thanks geekmaster ... Your method works without modifying the actual library files |
|
05-23-2012, 10:05 AM | #101 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
So now we know two ways to fix it, well, three - we could have just used -L option to tcc.
I will look into that "too small" file and see if I can figure out what lab126 was smoking. |
05-23-2012, 10:11 AM | #102 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
It is a text file (even though it has a ".so" file extension). You can cat (or vi) the original and my replacement to see how I changed it (and the libc loader script). We may need to do this for other libraries too as they get reported. Perhaps I need a "smart" install script that parses the libraries and creates replacement library loader scripts, and adds their bind mounts to the tccmake script. P.S. You can thank NiLuJe for teaching me the "bind mount" trick. Last edited by geekmaster; 05-23-2012 at 10:18 AM. |
|
05-23-2012, 10:15 AM | #103 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
The problem is that tcc can only parse simple library loader scripts, and firmware 5.1.0 added extra crap to them that breaks when tcc tries to link to them.
So 5.1.0 is not only "anti-hacker", but it is also "anti-tcc" (but only enough to slow us down a little)... |
05-23-2012, 10:19 AM | #104 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
The version of /lib/libpthread.so actually worked for me ... so I copied it over to the tcc folder as required by your modified script... |
|
05-23-2012, 10:22 AM | #105 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
GROUP ( /lib/libpthread.so.0 ) Are you saying that the original loader script works if copied to the tcc folder? That does not make sense to me because the original contains the file reference shown in the tcc error message. It would be nice to know how many different versions of 5.1.0 firmware are out in the wild. How can amazon even support this mess? EDIT: It looks like JoppyFur and others did not have this problem. Only SOME versions of the 5.1.0 firmware have this problem. Last edited by geekmaster; 05-23-2012 at 10:27 AM. |
|
Tags |
tcc, tinycc |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
geekmaster simple touchscreen script support hack | geekmaster | Kindle Developer's Corner | 12 | 04-21-2021 11:38 PM |
Very simple guide to reading newspapers on the kindle, please? :) | Pismire | Amazon Kindle | 7 | 06-01-2012 11:26 PM |
Free (Kindle/Nook/ChristianBook) The Invitation: A Simple Guide to the Bible | arcadata | Deals and Resources (No Self-Promotion or Affiliate Links) | 4 | 08-22-2011 01:05 PM |
Simple guide to choosing a Creative Commons license for your work | Bob Russell | News | 0 | 12-26-2006 11:10 AM |