Compiling ctypes statically?
Roberto Bouza <[email protected]> Thu, 3 Apr 2014 11:15:36 -0700
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CABHXVKNbHVy5OSR9TWJbbq==aYLjST4fJCfr2Pi9iQ0PLr5epg@mail.gmail.com> |
Hello, I have a python binary compiled statically, when I try to do the same with ctypes (outside of python compilation using the tar.gz) I get error because is trying to build the .so instead of a .a Sorry I'm a bit lost with this, but anyways here is the compilation flags: $> LDFLAGS="-Wl,-no-export-dynamic -static-libgcc -static -ldl -L/usr/local/lib -L/usr/local/lib64 -lev" CPPFLAGS="-static -fPIC -I/usr/local/include" /usr/local/python-static/bin/python setup.py build Here is the output: /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtbeginT.o: relocation R_X86_64_32 against `__DTOR_END__' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtbeginT.o: could not read symbols: Bad value collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Any help will be appreciated. Thanks. -- Roberto Bouza Fraga. www: http://www.robertobouza.com t: http://twitter.com/bouzafr - @bouzafr e: [email protected] ------------------------------------------------------------------------------ _______________________________________________ ctypes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ctypes-users