lang/python32 with CFLAG -fPIC for libpython3.2mu.a

Hakisho Nukama nukama at googlemail.com
Fri May 4 16:14:18 UTC 2012


Hello,

I tried to compile libsigrokdecode against libpython32 with this port:
https://redports.org/browser/Nukama/devel/libsigrokdecode

But doing so results in following error:

/usr/bin/ld: /usr/local/lib/python3.2/config-3.2mu/libpython3.2mu.a(abstract.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/usr/local/lib/python3.2/config-3.2mu/libpython3.2mu.a: could not read
symbols: Bad value

Compiling against python31 actually works.
Setting CFLAGS= -fPIC in python32/Makefile gets rid of this error.

But globally setting PIC is discouraged according to this how-to:
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3

What's the best way to link against libpython3.2mu.a?

Best Regards,
Hakisho Nukama


More information about the freebsd-python mailing list