[issue38443] unavailable --with-universal-archs= macOS confgure options fail cryptically

Ronald Oussoren report at bugs.python.org
Thu Oct 22 17:01:48 EDT 2020


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

A fairly simple change is to check if compiling a file with the specified set of "-arch" flags works, and bail  out with a nice error message if it doesn't.

Something like this works:

diff --git a/configure.ac b/configure.ac
index f0bc8c6258..e26cdc8607 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1976,6 +1976,14 @@ yes)
         EXPORT_MACOSX_DEPLOYMENT_TARGET=''
         AC_MSG_RESULT($MACOSX_DEPLOYMENT_TARGET)
 
+       AC_MSG_CHECKING(if specified build architectures work)
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+            [AC_MSG_RESULT(yes)],
+            [AC_MSG_RESULT(no)
+            AC_MSG_ERROR(check the '--with-universal-archs' option)
+        ])
+
+
         # end of Darwin* tests
         ;;
     esac


I'm not entirely happy with the phrasing, but at least you'll get a clearer message and one that indicate which configure argument can be used to fix it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38443>
_______________________________________


More information about the Python-bugs-list mailing list