From 9fe53bd4a1ac0eaa63fcf1ebd151fe4db0411b49 Mon Sep 17 00:00:00 2001 From: Ankit Meel Date: Tue, 23 Feb 2021 08:34:33 +0530 Subject: [PATCH] Build Environment/macOS/Python: link against zlib statically rBc70eb30240f8b5d5a8f2ac509f0eb585936142b5 added patch to use static zlib on Linux. But also added flags to use the zlib in LIBDIR for Python on macOS. That causes some shared libraries (binascii for one) to link against libz.1.dylib which will not be there on users' systems. Reuse the said patch for macOS also to avoid rpath issues. Fix T85648. Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D10479 --- build_files/build_environment/cmake/python.cmake | 4 ++-- .../patches/{python_linux.diff => python_unix.diff} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename build_files/build_environment/patches/{python_linux.diff => python_unix.diff} (100%) diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake index 5731a0e0ae8..fa1498dda82 100644 --- a/build_files/build_environment/cmake/python.cmake +++ b/build_files/build_environment/cmake/python.cmake @@ -77,9 +77,9 @@ else() else() set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV}) set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python) - set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff) endif() - + # Link against zlib statically (Unix). Avoid rpath issues (macOS). + set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_unix.diff) set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl") set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include") set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib") diff --git a/build_files/build_environment/patches/python_linux.diff b/build_files/build_environment/patches/python_unix.diff similarity index 100% rename from build_files/build_environment/patches/python_linux.diff rename to build_files/build_environment/patches/python_unix.diff