On Wed, Jul 09, 2008 at 09:04:08PM +0400, Kirill Smelkov wrote:
> 
> Hi Ondrej, All,
> 
> On Wed, Jul 09, 2008 at 03:47:59PM +0200, Ondrej Certik wrote:
> > 
> > Hi,
> > 
> > thanks to Vinzent Steinberg we can now use tcc to automatically
> > convert a mathematical formula in SymPy (sympy.org) to C, compile it
> > and run it, so it's very fast. Here is the module:
> > 
> > http://hg.sympy.org/sympy/file/8af2d333319c/sympy/utilities/compilef.py
> > 
> > however, we would like to be able to create libtcc.so without root
> > privileges. Is there a way to do it? I.e. currently we know this works
> > (see the above file):
> > 
> > $ ./configure
> > $ make
> > $ sudo make install
> > $ gcc -shared -Wl,-soname,libtcc.so -o libtcc.so libtcc.o
> > $ cp libtcc.so dir/to/compilef.py   # or change libtccpath in compilef.py
> > 
> > But we haven't yet figure out how to get rid of the "sudo" part.
> 
> You can buld libtcc.so without making install:
> 
> $ ./configure
> $ make
> $ gcc -shared -Wl,-soname,libtcc.so -o libtcc.so libtcc.o
> 
> But this way done libtcc.so may cause problems because libtcc.o was
> not compiled in PIC mode.
> 
> (a hack to overcome this is to $ ./configure --extra-cflags="-fPIC")
> 
> What is needed is maybe to properly patch tcc Makefile to also produce
> shared libtcc.so or libtcc.dll
> 
> ----
> 
> As to "install without root access" for example we could you just
> configure tcc to live in appropriate prefix:
> 
> $ ./configure --prefix=`pwd`/tcc-root
> $ make
> $ make install
> 
> $ ./tcc-root/bin/tcc -v
> tcc version 0.9.24
> 
> 
> Btw:
> 
> http://landau.phys.spbu.ru/~kirr/cgi-bin/hg.cgi/tinycc-hg/

Also, we could apply a patch for DESTDIR support for tcc:

http://lists.gnu.org/archive/html/tinycc-devel/2008-05/msg00008.html

and use

$ make install DESTDIR=...


Btw2:

http://www.landley.net/code/tinycc/
http://www.landley.net/hg/tinycc

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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to