View Single Post
Old 05-17-2012, 01:37 AM   #64
xueyou2
Connoisseur
xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.
 
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
Quote:
Originally Posted by geekmaster View Post
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.

Yes,it works!Great!

PHP Code:
cd /usr/lib
ln 
-/lib/libm.so.6 libm.so

 

/mnt/us/tcctccmake hello -lm
/mnt/us/tcc$ ./hello

x
=144.000000sqrt(x)=12.000000 

Thank you !master.
xueyou2 is offline   Reply With Quote