05-23-2012, 12:34 PM | #121 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
PS: I did not get a PM before you posted that I had done something wrong. |
|
05-23-2012, 12:42 PM | #122 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
The RESULTS posted in #118 ARE what you asked for. It does not matter that they were created with a wrapper script. So either run the script, or do the bind mounts yourself before typing the command. The script is easier. That is why I wrote it. Your post did not take the CONTENTS of my previous post into account (even after you quoted my link to it), so I agree that ONE of us must be "speed reading", as you say. I did not accuse you of doing anything wrong, despite your P.S. claiming that I did. If you READ what I wrote, you will see that I am trying to synchronize our parallel "threads of thought", where your posts request information that I already provided. Last edited by geekmaster; 05-23-2012 at 03:54 PM. |
|
Advert | |
|
05-23-2012, 05:16 PM | #123 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
@knc1: Here is the output that you requested, except this time I HAND-TYPED the command instead of doing it in a script:
Code:
[root@kindle tcc]# tcc -vvv -run demo.c tcc version 0.9.25 -> demo.c nf /usr/local/include/stdio.h nf /usr/include/stdio.h nf /usr/local/lib/tcc/include/stdio.h demo.c:11: include file 'stdio.h' not found [root@kindle tcc]# tcc -Iinclude -vvv -run demo.c tcc version 0.9.25 -> demo.c -> include/stdio.h -> include/features.h -> include/bits/predefs.h -> include/sys/cdefs.h -> include/bits/wordsize.h -> include/gnu/stubs.h -> include/stddef.h -> include/bits/types.h -> include/bits/wordsize.h -> include/bits/typesizes.h -> include/libio.h -> include/_G_config.h -> include/wchar.h -> include/bits/wchar.h -> include/gconv.h -> include/wchar.h -> include/stdarg.h -> include/bits/stdio_lim.h -> include/bits/sys_errlist.h -> include/stdlib.h -> include/sys/types.h -> include/time.h -> include/endian.h -> include/bits/endian.h -> include/sys/select.h -> include/bits/select.h -> include/bits/sigset.h -> include/time.h -> include/bits/time.h -> include/sys/sysmacros.h -> include/bits/pthreadtypes.h -> include/alloca.h -> include/string.h -> include/unistd.h -> include/bits/posix_opt.h -> include/bits/confname.h -> include/getopt.h -> include/fcntl.h -> include/bits/fcntl.h -> include/time.h -> include/bits/time.h -> include/sys/mman.h -> include/bits/mman.h -> include/sys/ioctl.h -> include/bits/ioctls.h -> include/asm/ioctls.h -> include/asm/ioctl.h -> include/asm-generic/ioctl.h -> include/bits/ioctl-types.h -> include/sys/ttydefaults.h -> include/linux/fb.h -> include/linux/types.h -> include/asm/types.h -> include/linux/posix_types.h -> include/linux/stddef.h -> include/linux/compiler.h -> include/asm/posix_types.h -> include/linux/i2c.h nf /usr/local/lib/libc.so -> /usr/lib/libc.so -> /lib/libc.so.6 nf /usr/lib/libc_nonshared.a tcc: file '/usr/lib/libc_nonshared.a' not found -> /lib/libgcc_s.so.1 [root@kindle tcc]# As you can see, you also need to provide the path to the include directory. The tccmake script does this command: tcc -I/mnt/us/tcc/include -o $1 $2 $3 $4 $5 $6 $7 $8 $9 $1.c If you look at the rest of the tccmake script, you will see that it calls tcc with your parameters AND does the other things needed for a successful compile (including the bind mounts). EDIT: As you can see, when searching for missing libraries it first looks in /usr/local/lib and then in /usr/lib. The reason I bind mount to /usr/lib is because that is where OTHER (correct) library symlinks can be found on the kindle, AND because some recent firmware deletes the /usr/local directory. Last edited by geekmaster; 05-23-2012 at 06:15 PM. |
05-23-2012, 06:16 PM | #124 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Just try rebuilding it for installation on the Kindle.
./configure --prefix=/mnt/us/tcc --sysroot=/mnt/us should do the trick. Then, in /mnt/us/tcc/{include,lib} just symlink to wherever lab126 put the files. That __should__ (according to the tcc docs) fix both the library and the include search paths. @lab126: My apologies, the use of loader scripts for *.so files was a brain fart of the gnu/gcc project. We will have to let you slide on that one. |
05-23-2012, 06:24 PM | #125 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I tried building the new tinycc sources from the git repository, but I had some technical difficulties with that so I built my tcc package with lrizzo's tcc build instead, along with header files from multiple sources, and extra scripts, to make it easy to install and use. No matter how you build it, there will be complications caused by broken symlnks and such in various kindle firmware versions, which I have been "fixing" in the install and tccmake scripts. EDIT: Symlinks take very little space and only two known symlinks are missing from /usr/lib in firmware version 3.3, which is why I RESTORE symlinks in /usr/lib only if they are missing. Moving symlinks elsewhere would create inconsistencies with other firmware versions. Regarding your suggestion to create symlinks in the /mnt/us/tcc folder -- on vfat? I am also curious why the "-run" parameter does not work in lrizzo's build of tcc. Last edited by geekmaster; 05-23-2012 at 06:55 PM. |
|
Advert | |
|
05-23-2012, 10:41 PM | #126 |
Connoisseur
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
|
|
05-24-2012, 12:34 AM | #127 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
05-24-2012, 12:36 AM | #128 |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
I like the new < 5MB package ...
|
05-25-2012, 04:48 AM | #129 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
You change the file system setup so that to the machine it is OTG exported to, it looks like (and is) VFAT; While it looks like (and is) an inode file system to the Kindle. Also, the same system can be mounted by both machines at the same time without conflicts. I will put writing up that "HowTo" on my to-do list but don't anyone wait for me to get it finished, no ETA possible, too busy with other things. @GM: You go ahead and do the that write-up yourself if you want to, it will be sometime before I can get around to it. |
|
05-25-2012, 07:36 AM | #130 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
EDIT: If you are suggesting that the /mnt/us partition be formatted in a non-vfat (inode) format, the startup scripts would fail to mount it because they force the type to vfat. They automatically reformat the USB drive and repopulate it from /opt if they cannot mount it. Your solution may work until you reboot, but then it would get reformatted as vfat. Of course, you can alter the startup scripts and config files, but that could cause OTA updates to fail. There may be additional complications to deal with as well. It would be a lot safer and easier to create these symlinks in /tmp as needed, instead of changing the usb drive format to support symlinks. And your suggestion to export an "inode-formatted" usb drive as a fake vfat drive would not work when exporting the drive from the diags menu or from serial port recovery mode. Making deep changes to the main and diags linux kernels and boot partitions to support an "inode" usb drive in recovery modes could also break OTA updates. Last edited by geekmaster; 05-25-2012 at 10:37 AM. |
|
05-25-2012, 12:43 PM | #131 |
Enthusiast
Posts: 32
Karma: 46558
Join Date: Feb 2012
Device: Kindle4NT
|
|
05-25-2012, 12:53 PM | #132 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
05-25-2012, 01:24 PM | #133 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
05-25-2012, 01:39 PM | #134 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
My "position on this matter" was in no way meant to offend you. I would love to learn a simple solution that would make if useful and reliable, if I missed something. Just because something WAS outside my experience does not mean that is IS NOW or that it will forever be outside my experience. And my continuing quest for knowledge does not equate my previous lack of experience with "virtual vfat on inode partitions so you can put symlinks on a vfat drive" with my POSTITION ON THIS MATTER, as you said. Does your "stop right there" comment mean that you want me to STOP LEARNING about it, or to stop POSTING about what I have learned so far (in my own thread)? You stimulated my curiosity on this matter, so why are you trying to suppress me now? I would love to find a simple solution to implement your suggestion without the potential problems I have found with it. Last edited by geekmaster; 05-25-2012 at 01:58 PM. |
|
05-25-2012, 01:53 PM | #135 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
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 |