Issue #40 resolved

Path duplication when building

Anonymous created an issue

Hi there,

I'm using CFFI from trunk and I have noticed a bug in the latests commits that duplicates the path when compiling:

... building '_cffix5a76c247x7a0b955c' extension creating /home/alvaro/Development/evy/evy/uv/pycache/home creating /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro creating /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development creating /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development/evy creating /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development/evy/evy creating /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development/evy/evy/uv creating /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development/evy/evy/uv/pycache gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -fPIC -I/home/alvaro/Development/evy/evy/uv/../../libuv/include -I/usr/include/python2.7 -c /home/alvaro/Development/evy/evy/uv/pycache/_cffix5a76c247x7a0b955c.c -o /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development/evy/evy/uv/pycache/_cffix5a76c247x7a0b955c.o gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fPIC /home/alvaro/Development/evy/evy/uv/pycache/home/alvaro/Development/evy/evy/uv/pycache/_cffix5a76c247x7a0b955c.o -L/home/alvaro/Development/evy/evy/uv/../../libuv -luv -o /home/alvaro/Development/evy/evy/uv/pycache/_cffi__x5a76c247x7a0b955c.so -lrt using libuv version: libuv-0.09 ...

Comments (2)

  1. Armin Rigo

    That's a side-effect of what can be called a bug of distutils: we call it in order to compile the file "/some/dir/pycache/_cffi_xxx.c". But we also ask it to put the .o files in the "pycache" directory (we have to do this in case there are other .c files). Result: it writes "pycache/some/dir/pycache/_cffi_xxx.o"...

    Worked around it by passing, when possible, a relative name to "pycache/_cffi_xxx.c". At least now it writes "pycache/pycache/_cffi_xxx.o", which is already better.

  2. Log in to comment