05-23-2012, 10:25 AM | #106 |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Yes I copied the /lib/libpthread.so to the tcc folder, renamed it as tcc.libpthread.so ; and I modified the tccmake script as you suggested with all the mounts and binds ...
|
05-23-2012, 10:29 AM | #107 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Yup - the diagnostic path was destroyed by my pathname typo.
The "file" command above was done on the /lib/libpthread.so file, not (as I later edited it) the /usr/lib/libpthread.so file. The "too small" /usr/lib/libpthread.so file is a loader script (which file properly identifies as ASCII TEXT). Quote:
|
|
05-23-2012, 10:30 AM | #108 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
How can replacing a file with an identical copy of itself "fix" (as you reported) anything? This is all so confusing for my poor little brain... |
|
05-23-2012, 10:31 AM | #109 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
For some strange reason, this only affects SOME versions of 5.1.0 firmware. How many versions of 5.1.0 are there, and how can we tell them apart? Last edited by geekmaster; 05-23-2012 at 10:37 AM. |
|
05-23-2012, 10:34 AM | #110 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
Ok the above method is the best way to do it thanks geekmaster Last edited by deep; 05-23-2012 at 10:38 AM. |
|
05-23-2012, 10:42 AM | #111 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Did you read them? You never documented what it was that you where replacing and/or over-riding. This isn't supposed to be a competition, a race for bragging rights or recognition, it should be a collaboration for the benefit of the less experienced. As such, I supplemented your posts with additional details. If you don't like something I write - PM me about it before going public with the complaint, you might just convince me to change my mind. |
|
05-23-2012, 10:46 AM | #112 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
EDIT: The copy you showed was old and "in-progress" (when I was still editing it the first time). I have to do lots of edits and "Saves" before I can see all my errors and fix them. I did not find anything to change now, because I already made it less harsh before you posted the old (unfinished) version you quoted. Is the post at that link still harsh? If so, what should I change? I am really much better with machines than with people. Sorry... EDIT 2: It looks like you were just posting the results of your research on the "short file" problem, which just COINCIDENTALLY turned out to be the same "library loader script" problem that I fixed for the math library. Your input is welcome here. I am glad to retract any harsh statements that I made. Sorry. (My intention was to try to "synchronize" our posts that seemed to be following two divergent "threads", but I did not word it in a tactful manner. Tact is not one of my strong points.) EDIT 3: Thank you for your input here knc1. It is helpful and welcome. Last edited by geekmaster; 05-23-2012 at 11:15 AM. |
|
05-23-2012, 11:54 AM | #113 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I added a tcc v1.6 package to the first post of this thread, which fixes problems with the pthread library for both v3.3 and v5.1.0 kindles. The v5.1.0 fix was reported working above.
I cannot test these changes, so please let me know if it fixes your problem with "-lpthread" (if your particular kindle firmware even had that problem). As you can see in the recent JoppyFur thread, some people (including myself) did not have problems using "-lpthread" with tccmake, but the v1.6 update for my tcc package should fix (or prevent) this problem for those who need it. Last edited by geekmaster; 05-23-2012 at 11:58 AM. |
05-23-2012, 12:01 PM | #114 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
arm-tcc search paths
I need a volunteer here, someone with a Kindle and a copy of the GM-v1.5 tcc installed.
For the source file (use lf line endings please): Code:
#include <stdio.h> int main() { printf("Hello World\n"); return 0; } Code:
tcc -vvv -run hello.c Please capture it all (if using a terminal via ssh, turn on the capture file) the result is much longer than a single screen. The output of this test will tell us the information needed to best match the compiler's default search paths to the Kindle Touch (hopefully, without changes to the file system or wrapper scripts). I.E: "hack" is a four letter word. |
05-23-2012, 12:03 PM | #115 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
Just wondering .... |
|
05-23-2012, 12:08 PM | #116 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
anyways, I had a short output Code:
[root@kindle codes]# tcc -vvv -run hello.c tcc version 0.9.25 -> hello.c nf /usr/local/include/stdio.h nf /usr/include/stdio.h nf /usr/local/lib/tcc/include/stdio.h hello.c:1: include file 'stdio.h' not found |
|
05-23-2012, 12:14 PM | #117 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
tccmake does the bind mounts. Calling tcc directly requires manually doing the bind mounts yourself.
tccmake uses a different parameter sequence than tcc because it calls tcc like this: tcc -I/mnt/us/tcc/include -o $1 $2 $3 $4 $5 $6 $7 $8 $9 $1.c So you can do what you wanted this way: tccmake hello -vvv -run Where did those "/usr/" paths come from in the error message? The headers are in /mnt/us/tcc/include. Last edited by geekmaster; 05-23-2012 at 12:24 PM. |
05-23-2012, 12:17 PM | #118 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Here is the output from compiling demo.c (included in my tcc package).
Code:
[root@kindle tcc]# tccmake demo -vvv -run tcc version 0.9.25 -> /usr/lib/crt1.o -> /usr/lib/crti.o -> demo.c -> /mnt/us/tcc/include/stdio.h -> /mnt/us/tcc/include/features.h -> /mnt/us/tcc/include/bits/predefs.h -> /mnt/us/tcc/include/sys/cdefs.h -> /mnt/us/tcc/include/bits/wordsize.h -> /mnt/us/tcc/include/gnu/stubs.h -> /mnt/us/tcc/include/stddef.h -> /mnt/us/tcc/include/bits/types.h -> /mnt/us/tcc/include/bits/wordsize.h -> /mnt/us/tcc/include/bits/typesizes.h -> /mnt/us/tcc/include/libio.h -> /mnt/us/tcc/include/_G_config.h -> /mnt/us/tcc/include/wchar.h -> /mnt/us/tcc/include/bits/wchar.h -> /mnt/us/tcc/include/gconv.h -> /mnt/us/tcc/include/wchar.h -> /mnt/us/tcc/include/stdarg.h -> /mnt/us/tcc/include/bits/stdio_lim.h -> /mnt/us/tcc/include/bits/sys_errlist.h -> /mnt/us/tcc/include/stdlib.h -> /mnt/us/tcc/include/sys/types.h -> /mnt/us/tcc/include/time.h -> /mnt/us/tcc/include/endian.h -> /mnt/us/tcc/include/bits/endian.h -> /mnt/us/tcc/include/sys/select.h -> /mnt/us/tcc/include/bits/select.h -> /mnt/us/tcc/include/bits/sigset.h -> /mnt/us/tcc/include/time.h -> /mnt/us/tcc/include/bits/time.h -> /mnt/us/tcc/include/sys/sysmacros.h -> /mnt/us/tcc/include/bits/pthreadtypes.h -> /mnt/us/tcc/include/alloca.h -> /mnt/us/tcc/include/string.h -> /mnt/us/tcc/include/unistd.h -> /mnt/us/tcc/include/bits/posix_opt.h -> /mnt/us/tcc/include/bits/confname.h -> /mnt/us/tcc/include/getopt.h -> /mnt/us/tcc/include/fcntl.h -> /mnt/us/tcc/include/bits/fcntl.h -> /mnt/us/tcc/include/time.h -> /mnt/us/tcc/include/bits/time.h -> /mnt/us/tcc/include/sys/mman.h -> /mnt/us/tcc/include/bits/mman.h -> /mnt/us/tcc/include/sys/ioctl.h -> /mnt/us/tcc/include/bits/ioctls.h -> /mnt/us/tcc/include/asm/ioctls.h -> /mnt/us/tcc/include/asm/ioctl.h -> /mnt/us/tcc/include/asm-generic/ioctl.h -> /mnt/us/tcc/include/bits/ioctl-types.h -> /mnt/us/tcc/include/sys/ttydefaults.h -> /mnt/us/tcc/include/linux/fb.h -> /mnt/us/tcc/include/linux/types.h -> /mnt/us/tcc/include/asm/types.h -> /mnt/us/tcc/include/linux/posix_types.h -> /mnt/us/tcc/include/linux/stddef.h -> /mnt/us/tcc/include/linux/compiler.h -> /mnt/us/tcc/include/asm/posix_types.h -> /mnt/us/tcc/include/linux/i2c.h nf /usr/local/lib/libc.so -> /usr/lib/libc.so -> /lib/libc.so.6 nf /usr/local/lib/ld-linux.so.3 nf /usr/lib/ld-linux.so.3 -> /lib/ld-linux.so.3 -> /lib/libgcc_s.so.1 -> /usr/lib/crtn.o <- demo [root@kindle tcc]# Last edited by geekmaster; 05-23-2012 at 12:22 PM. |
05-23-2012, 12:20 PM | #119 | ||
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Mostly that it was built with PREFIX=/usr/local (the default, if not changed at build time). The man(ual) sezs: Quote:
Code:
# modify as required to point directly to the directory holding stdio.h: tcc -vvv -I/mnt/us/tcc -run hello.c Code:
core2quad kindle510 $ tcc -vvv -run hello.c tcc version 0.9.25 -> hello.c nf /usr/local/include/i386-linux-gnu/stdio.h nf /usr/local/include/stdio.h nf /usr/include/i386-linux-gnu/stdio.h -> /usr/include/stdio.h nf /usr/local/include/i386-linux-gnu/features.h nf /usr/local/include/features.h nf /usr/include/i386-linux-gnu/features.h -> /usr/include/features.h nf /usr/local/include/i386-linux-gnu/bits/predefs.h nf /usr/local/include/bits/predefs.h -> /usr/include/i386-linux-gnu/bits/predefs.h nf /usr/local/include/i386-linux-gnu/sys/cdefs.h nf /usr/local/include/sys/cdefs.h -> /usr/include/i386-linux-gnu/sys/cdefs.h nf /usr/local/include/i386-linux-gnu/bits/wordsize.h nf /usr/local/include/bits/wordsize.h -> /usr/include/i386-linux-gnu/bits/wordsize.h nf /usr/local/include/i386-linux-gnu/gnu/stubs.h nf /usr/local/include/gnu/stubs.h -> /usr/include/i386-linux-gnu/gnu/stubs.h nf /usr/local/include/i386-linux-gnu/bits/wordsize.h nf /usr/local/include/bits/wordsize.h -> /usr/include/i386-linux-gnu/bits/wordsize.h nf /usr/local/include/i386-linux-gnu/gnu/stubs-32.h nf /usr/local/include/gnu/stubs-32.h -> /usr/include/i386-linux-gnu/gnu/stubs-32.h nf /usr/local/include/i386-linux-gnu/stddef.h nf /usr/local/include/stddef.h nf /usr/include/i386-linux-gnu/stddef.h nf /usr/include/stddef.h nf /usr/lib/tcc/include/i386-linux-gnu/stddef.h -> /usr/lib/tcc/include/stddef.h nf /usr/local/include/i386-linux-gnu/bits/types.h nf /usr/local/include/bits/types.h -> /usr/include/i386-linux-gnu/bits/types.h nf /usr/local/include/i386-linux-gnu/features.h nf /usr/local/include/features.h nf /usr/include/i386-linux-gnu/features.h nf /usr/local/include/i386-linux-gnu/bits/wordsize.h nf /usr/local/include/bits/wordsize.h -> /usr/include/i386-linux-gnu/bits/wordsize.h nf /usr/local/include/i386-linux-gnu/bits/typesizes.h nf /usr/local/include/bits/typesizes.h -> /usr/include/i386-linux-gnu/bits/typesizes.h nf /usr/local/include/i386-linux-gnu/libio.h nf /usr/local/include/libio.h nf /usr/include/i386-linux-gnu/libio.h -> /usr/include/libio.h nf /usr/local/include/i386-linux-gnu/_G_config.h nf /usr/local/include/_G_config.h nf /usr/include/i386-linux-gnu/_G_config.h -> /usr/include/_G_config.h nf /usr/local/include/i386-linux-gnu/bits/types.h nf /usr/local/include/bits/types.h nf /usr/local/include/i386-linux-gnu/stddef.h nf /usr/local/include/stddef.h nf /usr/include/i386-linux-gnu/stddef.h nf /usr/include/stddef.h nf /usr/lib/tcc/include/i386-linux-gnu/stddef.h nf /usr/local/include/i386-linux-gnu/wchar.h nf /usr/local/include/wchar.h nf /usr/include/i386-linux-gnu/wchar.h -> /usr/include/wchar.h nf /usr/local/include/i386-linux-gnu/stddef.h nf /usr/local/include/stddef.h nf /usr/include/i386-linux-gnu/stddef.h nf /usr/include/stddef.h nf /usr/lib/tcc/include/i386-linux-gnu/stddef.h nf /usr/local/include/i386-linux-gnu/stdarg.h nf /usr/local/include/stdarg.h nf /usr/include/i386-linux-gnu/stdarg.h nf /usr/include/stdarg.h nf /usr/lib/tcc/include/i386-linux-gnu/stdarg.h -> /usr/lib/tcc/include/stdarg.h nf /usr/local/include/i386-linux-gnu/stdarg.h nf /usr/local/include/stdarg.h nf /usr/include/i386-linux-gnu/stdarg.h nf /usr/include/stdarg.h nf /usr/lib/tcc/include/i386-linux-gnu/stdarg.h nf /usr/local/include/i386-linux-gnu/bits/stdio_lim.h nf /usr/local/include/bits/stdio_lim.h -> /usr/include/i386-linux-gnu/bits/stdio_lim.h nf /usr/local/include/i386-linux-gnu/bits/sys_errlist.h nf /usr/local/include/bits/sys_errlist.h -> /usr/include/i386-linux-gnu/bits/sys_errlist.h nf /usr/local/lib/i386-linux-gnu/libc.so nf /usr/local/lib/libc.so -> /usr/lib/i386-linux-gnu/libc.so -> /lib/i386-linux-gnu/libc.so.6 -> /usr/lib/i386-linux-gnu/libc_nonshared.a -> /usr/lib/tcc/libtcc1.a Hello World |
||
05-23-2012, 12:27 PM | #120 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
@knc1: Our posts keep getting out of sequence, which leads to me pointing out that I already answered your question in a previous post. I am not trying to compete with you. I am just trying to suggest that you read the answer that I provided above so that you can use my input in your research. No harm intended.
The information that you seek is in post #118 above. Last edited by geekmaster; 05-23-2012 at 12:30 PM. |
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 |