View Single Post
Old 05-23-2012, 08:44 AM   #78
deep
Enthusiast
deep began at the beginning.
 
Posts: 29
Karma: 10
Join Date: May 2012
Device: Kindle Touch
Quote:
Originally Posted by knc1 View Post
According to the text of the command you posted, it should not have been referenced (to then have been reported as missing). That is for doing a static linked executable, and TCC (should) be defaulting to dynamic linked executables.

Note the size of /usr/lib/libpthread.so
That is too small to be the dynamic thread library. It may be an example of part of the general problem.

I am not sure what the built-in library search order is in TCC - so we will just shotgun it (or take a WAFG).
If it searchs /lib first, this will fix the problem you see:
Code:
cd /lib
ln -s libpthread-2.12.1.so libpthread.so
cd -
Note: The above presumes you are running as "root" and that /lib is in a filesystem mounted read/write.
If either of those conditions are not true, you will get an error message, post the error from the command and we can continue from there.

If no error message, retry your posted compile command.

If it searchs /usr/lib first (which I think it should, but who knows) -
The we will have to examine what that too small file with the correct name is all about.
Hmm ... I didnt notice that !
However, still no luck

Here's what happened ...


Code:
[root@kindle /lib]# mntroot rw
system: I mntroot:def:Making root filesystem writeable
[root@kindle root]# cd /lib
[root@kindle /lib]# ln -s libpthread-2.12.1.so libpthread.so
[root@kindle /lib]# cd /mnt/us/codes
[root@kindle codes]# tccmake cfile -lpthread
tcc: file '/usr/lib/libpthread_nonshared.a' not found


And here's the output of the lib search once again
Code:
[root@kindle codes]# ls -l /lib/libpthread* /usr/lib/libpthread*
-rw-r--r--    1 root     root        105233 Nov  4  2011 /lib/libpthread-2.12.1.so
lrwxrwxrwx    1 root     root            20 May 23 18:07 /lib/libpthread.so -> libpthread-2.12.1.so
lrwxrwxrwx    1 root     root            20 Nov  4  2011 /lib/libpthread.so.0 -> libpthread-2.12.1.so
-rw-r--r--    1 root     root           221 Sep 11  2010 /usr/lib/libpthread.so
A new symlink has been added...
deep is offline   Reply With Quote