Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2012 16:14:11 +0000
From:      Hakisho Nukama <nukama@googlemail.com>
To:        python@FreeBSD.org
Cc:        uwe@hermann-uwe.de
Subject:   lang/python32 with CFLAG -fPIC for libpython3.2mu.a
Message-ID:  <CA%2Bzcas3VBR5yP_Rq9MBypf7o6k6VWxZVuYqCTeTRbYkonKpk2A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bzcas3VBR5yP_Rq9MBypf7o6k6VWxZVuYqCTeTRbYkonKpk2A>