[Bf-blender-cvs] [0a02c288aa2] master: install_deps: Enable PIC in Python static library.
Mateusz GrzeliÅski
noreply at git.blender.org
Fri Mar 27 15:47:50 CET 2020
Commit: 0a02c288aa258e18d19eff0be984f214d556b159
Author: Mateusz Grzeliński
Date: Fri Mar 27 15:23:58 2020 +0100
Branches: master
https://developer.blender.org/rB0a02c288aa258e18d19eff0be984f214d556b159
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
===================================================================
M build_files/build_environment/install_deps.sh
===================================================================
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"
}
# ----------------------------------------------------------------------------
More information about the Bf-blender-cvs
mailing list