[Bf-blender-cvs] [6d9a6f12b33] master: Make deps: Fix compilation error of Python on macOS

Sergey Sharybin noreply at git.blender.org
Tue Jul 7 11:17:53 CEST 2020


Commit: 6d9a6f12b330912e3ee6f200cca621893aa00fc3
Author: Sergey Sharybin
Date:   Tue Jul 7 10:06:14 2020 +0200
Branches: master
https://developer.blender.org/rB6d9a6f12b330912e3ee6f200cca621893aa00fc3

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

===================================================================

M	build_files/build_environment/cmake/python.cmake

===================================================================

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()



More information about the Bf-blender-cvs mailing list