When I try to build my own version of Python using:
./configure --enable-shared --prefix=/app/vendor/python-dev && make && make install
I see some errors during installation:
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
The problem starts when the linker tries to use /usr/local/lib/libpython2.7.a
and not the newly compiled library.
How can I prevent the linker (configure/make) from using the python libraries installed on the system?