From 6d9a6f12b330912e3ee6f200cca621893aa00fc3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 7 Jul 2020 10:06:14 +0200 Subject: Make deps: Fix compilation error of Python on macOS The configuration was confused about gettext installed via Homebrew and isysroot passed to Python's compilation but not to test programs. After this change `import gettext` still works, but it is unclear how to test it further, Differential Revision: https://developer.blender.org/D8231 --- build_files/build_environment/cmake/python.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'build_files/build_environment') diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake index 2d64feb9858..681b20577d6 100644 --- a/build_files/build_environment/cmake/python.cmake +++ b/build_files/build_environment/cmake/python.cmake @@ -48,7 +48,12 @@ if(WIN32) else() if(APPLE) - # disable functions that can be in 10.13 sdk but aren't available on 10.9 target + # Disable functions that can be in 10.13 sdk but aren't available on 10.9 target. + # + # Disable libintl (gettext library) as it might come from Homebrew, which makes + # it so test program compiles, but the Python does not. This is because for Python + # we use isysroot, which seems to forbid using libintl.h. + # The gettext functionality seems to come from CoreFoundation, so should be all fine. set(PYTHON_FUNC_CONFIGS export ac_cv_func_futimens=no && export ac_cv_func_utimensat=no && @@ -60,7 +65,10 @@ else() export ac_cv_func_getentropy=no && export ac_cv_func_mkostemp=no && export ac_cv_func_mkostemps=no && - export ac_cv_func_timingsafe_bcmp=no) + export ac_cv_func_timingsafe_bcmp=no && + export ac_cv_header_libintl_h=no && + export ac_cv_lib_intl_textdomain=no + ) set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS}) set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe) else() -- cgit v1.2.3