how to install tcc library without root privileges

29 views
Skip to first unread message

Vinzent Steinberg

unread,
Sep 12, 2008, 12:55:18 PM9/12/08
to sympy
I tried the things Kirill - thank you! - suggested. I used

$ ./configure --extra-cflags="-fPIC" --prefix=`pwd`/tcc-root

This worked for tcc, but not for libtcc, there seems to be a bug:

$ python compilef.py
tcc: file '/usr/local/lib/tcc/libtcc1.a' not found
Running tests...
Traceback (most recent call last):
File "compilef.py", line 555, in <module>
test_clambdify()
File "compilef.py", line 410, in test_clambdify
cf1 = clambdify((x, y), f1)
File "compilef.py", line 260, in clambdify
return _compile(code, len(args))
File "compilef.py", line 228, in _compile
__run(libtcc.tcc_relocate(tccstate)) # fails if link error
File "compilef.py", line 205, in __run
raise Exception('could not run libtcc command')
Exception: could not run libtcc command

libtcc seems not to be configured for the correct path.

Vinzent

Kirill Smelkov

unread,
Sep 17, 2008, 3:24:54 PM9/17/08
to sy...@googlegroups.com
On Fri, Sep 12, 2008 at 09:55:18AM -0700, Vinzent Steinberg wrote:
>
> I tried the things Kirill - thank you! - suggested. I used

Thanks :) !

I run tcc 7bebf1f59a983255e6c029995583f360f30f1a04 from here:

http://repo.or.cz/w/tinycc.git

and everything seems to be just fine:

kirr@roro3:~/src/phys/sympy/sympy/utilities$ ln -s $HOME/src/tools/tinycc/libtcc.so
kirr@roro3:~/src/phys/sympy/sympy/utilities$ ll *.so
lrwxrwxrwx 1 kirr kirr 37 Сен 17 23:20 libtcc.so -> /home/kirr/src/tools/tinycc/libtcc.so

kirr@roro3:~/src/phys/sympy/sympy/utilities$ python compilef.py
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
Running tests... OK

Running benchmark...
big function:
compile time (including sympy overhead): 0.079200 s
for x = (0, 1, 2, ..., 999)/1000
20 times in 3 runs
compiled: 0.0873 0.0869 0.0871
Python lambda: 0.1971 0.1981 0.1989

simple function:
compile time (including sympy overhead): 0.009763 s
for x = (0, 1, 2, ..., 999)/1000
20 times in 3 runs
compiled: 0.0411 0.0417 0.0410
Python lambda: 0.0317 0.0318 0.0319

frange with f(x) =
exp(sin(exp(-x**2)) + sqrt(pi)*cos(x**5/(x**3-x**2+pi*x)))
for x=1, ..., 100000
in 3 runs including full compile time
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
<string>:17: warning: assignment makes integer from pointer without a cast
<string>:17: warning: comparison between pointer and integer
frange: 0.1045 0.0763 0.0743
numpy: 0.1032 0.1021 0.1030


----

Vinzent, could you please try latest tinycc from git?

--
Всего хорошего, Кирилл.

Reply all
Reply to author
Forward
0 new messages