From 0a02c288aa258e18d19eff0be984f214d556b159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Grzeli=C5=84ski?= Date: Fri, 27 Mar 2020 15:23:58 +0100 Subject: [PATCH] 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 --- build_files/build_environment/install_deps.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index bd6da85de44..69d607b0c8a 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -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" } # ----------------------------------------------------------------------------