install_deps: Enable PIC in Python static library.

Update for D3078, I think it should be fixed

Benefits:
- after installing python 3.7 with `./build_files/build_environment/install_deps.sh`, user will be able to run `make bpy` without linking error:
  - https://blender.stackexchange.com/questions/102933/a-working-guidance-for-building-blender-as-bpy-python-module
  - https://stackoverflow.com/questions/36779834/compiling-blender-bpy-recompile-with-fpic

To prevent errors like `/opt/lib/python-3.7.4/bin/python3.7: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory`, add python .so lib to ldconfig

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7177
This commit is contained in:
Mateusz Grzeliński 2020-03-27 15:23:58 +01:00 committed by Bastien Montagne
parent 2632ba6703
commit 0a02c288aa
1 changed files with 3 additions and 1 deletions

View File

@ -1289,7 +1289,7 @@ compile_Python() {
./configure --prefix=$_inst --libdir=$_inst/lib --enable-ipv6 \
--enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
--with-computed-gotos --with-pymalloc
--with-computed-gotos --with-pymalloc --enable-shared
make -j$THREADS && make install
make clean
@ -1310,6 +1310,8 @@ compile_Python() {
INFO "Own Python-$PYTHON_VERSION is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib, use the --force-python option."
fi
run_ldconfig "python-$PYTHON_VERSION_MIN"
}
# ----------------------------------------------------------------------------