05-16-2012, 01:03 PM | #61 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Please show the output of this command: cat /mnt/us/tcc/install Thanks. Last edited by geekmaster; 05-16-2012 at 02:23 PM. |
|
05-16-2012, 11:49 PM | #62 |
Connoisseur
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
|
#cat /mnt/us/tcc/install
#!/bin/sh cd /usr/lib mntroot rw >/dev/null ln -s /mnt/us/tcc/crt1.o ln -s /mnt/us/tcc/crti.o ln -s /mnt/us/tcc/crtn.o cd /usr/bin >/dev/null ln -s /mnt/us/tcc/tcc ln -s /mnt/us/tcc/tccmake [[ -e libm.so ]]||ln -s /lib/libm.so.6 libm.so mntroot ro >/dev/null echo "*** tcc installed ***" echo Uninstall with /mnt/us/tcc/uninstall echo Compile demo.c with "tccmake demo" |
Advert | |
|
05-17-2012, 12:41 AM | #63 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
This line "cd /usr/bin >/dev/null" says "change directory to /usr/bin and discard output".
This line "[[ -e libm.so ]]||ln -s /lib/libm.so.6 libm.so" says (while in /usr/bin) "if libm.so does not exists, create a link called libm.so that points to /lib/libm.so.6" However, earlier you showed "mnt/us/tcc #ls -al /usr/lib/libm*" (after running install) with output that did NOT contain libm.so. This should not be possible without some kind of error message. Try executing the statements from a command prompt instead of inside the script. Specifically, "cd /usr/lib", then "ln -s /lib/libm.so.6 libm.so" If that fails to create the symlink (it works on my K3 with 3.3), you could try "ln -s /lib/libm-2.5.so libm.so" instead (because libm.so.6 is just a symlink itself). I do not know why your 3.3 is acting differently from my 3.3, but I have seen cases were there were problems creating a symlink to a symlink. So, in your case symlink directly to the library instead of the other symlink as shown above. Last edited by geekmaster; 05-17-2012 at 12:43 AM. |
05-17-2012, 01:37 AM | #64 | |
Connoisseur
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
|
Quote:
Yes,it works!Great! PHP Code:
Thank you !master. |
|
05-17-2012, 02:08 AM | #65 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
You are welcome.
I suppose I need to make the script a little smarter. Instead of checking "exists" (-e), it could look for a "file" (-f) of various common versions of libm.*, and link directly to that. I do not know why the K3 had to be different. My older install script worked fine on DX,DXG,K4,K5. But K3 was missing the math lib symlink (and may have more missing lib links too). Last edited by geekmaster; 05-17-2012 at 03:02 AM. |
Advert | |
|
05-17-2012, 09:32 AM | #66 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Almost as if lab126 was only concerned about making their own software work and to H... with anyone else's. For instance, the contents of /etc/ld.so.conf does not correspond to the library installation locations - unless they have some "invented here" program diddling with the run-time loader. Unfortunately, my K3 is "out of service" for a photo shoot, so I can't actually check its behavior. |
|
05-17-2012, 09:37 AM | #67 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
05-17-2012, 09:39 AM | #68 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
By the way, I noticed that even when I do a major edit to an existing post, it does NOT add my new signature line. Apparently, only the site mods can add my signature to my old posts.
|
05-17-2012, 09:47 AM | #69 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Two quick notes;
The thread topic is about tcc - so here we are interested in the compiler's search paths. Question: does tcc support a --static option? My mention of the runtime loader (which also uses the library files mentioned) is a related issue, but in that case the application would generate an error message when run, not while it was being compiled. Hmm... There is a (rarely used) way to poke the runtime loader so that it reports what it is doing, but I have forgotten the details, I will need a bit of RTFM to re-learn that trick. |
05-17-2012, 10:15 AM | #70 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
tcc options only use a single "-" (even "-help")":
Code:
# tcc -help
tcc version 0.9.25 - Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard
usage: tcc [-v] [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym]
[-Wwarn] [-g] [-b] [-bt N] [-Ldir] [-llib] [-shared] [-soname name]
[-static] [infile1 infile2...] [-run infile args...]
General options:
-v display current version, increase verbosity
-c compile only - generate an object file
-o outfile set output filename
-Bdir set tcc internal library path
-bench output compilation statistics
-run run compiled source
-fflag set or reset (with 'no-' prefix) 'flag' (see man page)
-Wwarning set or reset (with 'no-' prefix) 'warning' (see man page)
-w disable all warnings
Preprocessor options:
-E preprocess only
-Idir add include path 'dir'
-include f #include file 'f' before everything else
-Dsym[=val] define 'sym' with value 'val'
-Usym undefine 'sym'
-M generate include list. Implies -E
-dM generate macros list. Implies -E
-MT file use 'file' as target for -M.
Linker options:
-Ldir add library path 'dir'
-llib link with dynamic or static library 'lib'
-shared generate a shared library
-soname set name for shared library to be used at runtime
-static static linking
-rdynamic export all global symbols to dynamic linker
-r generate (relocatable) object file
Debugger options:
-g generate runtime debug info
-bt N show N callers in stack traces
Ignored options (for gcc compatibility):
-std=X
-MD name
-MP
-isystem dir
|
05-17-2012, 11:22 AM | #71 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Thanks. My own Kindle is "out of service" so I could not check that for myself.
|
05-23-2012, 03:50 AM | #72 |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Im not sure if I deleted this file, but if run
Code:
tccmake cfile -lpthread it shows tcc: file '/usr/lib/libpthread_nonshared.a' not found |
05-23-2012, 06:33 AM | #73 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
That is: the /usr/lib/libpthread library is a link to a non-existent file. What Kindle model? (the Kindle Touch in your info box?) What Firmware version? |
|
05-23-2012, 06:41 AM | #74 |
Enthusiast
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
|
05-23-2012, 07:39 AM | #75 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Please post the results of this command: Code:
ls -l /lib/libpthread* /usr/lib/libpthread* |
|
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 |