-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unavailable --with-universal-archs= macOS confgure options fail cryptically #82624
Comments
./configure's --with-universal-archs= supports a number of different CPU architecture combinations. However most of them are no longer supported on current macOS systems. If you choose an option with archs not available in the build tool chain in use, the configure script fails in various cryptic ways, usually with multiple configure test failures like: checking dlfcn.h presence... yes ./configure should be more user-friendly here. At a minimum, it should report near the beginning exactly which archs are going to be tested; it already reports the --with-universal-archs value. Even better it should explicitly test for support of each arch in the build tool chain in use and stop if any of the requested archs are not available. |
Also note that, on current macOS systems, specifying just --enable-universalsdk to ./configure results in an implicit --with-universal-archs of intel (which implies both x86_64 and i386). checking for --enable-universalsdk... / With macOS 10.15 Catalina and Xcode 11, i364 arch is no longer supported and that results in another cryptic ./configure failure: checking size of size_t... configure: error: in |
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. |
I've added a PR with a variation of my earlier patch. This version will bail out when specifying "--enable-universalsdk" with a version of Xcode that does not support i386 (the previous patch did not). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: