Kaydet (Commit) 9e16ad5d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

--enable-python=system no longer works on macOS

e.g.:

> [CXX] pyuno/source/module/pyuno_callable.cxx
> In file included from pyuno/source/module/pyuno_callable.cxx:19:
> In file included from pyuno/source/module/pyuno_impl.hxx:27:
> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85:
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:534:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
>     register PyObject *obj,     /* Object */
>     ^~~~~~~~~

(and some $enable_python=system/$_os=Darwin-specific code can thus be removed,
too)

Change-Id: Ic7901732c01bef9335c63dd6f0949453f5824226
Reviewed-on: https://gerrit.libreoffice.org/64732
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst d7b46ef1
...@@ -8263,6 +8263,9 @@ fully-internal) ...@@ -8263,6 +8263,9 @@ fully-internal)
;; ;;
system) system)
AC_MSG_RESULT([system]) AC_MSG_RESULT([system])
if test "$_os" = Darwin; then
AC_MSG_ERROR([--enable-python=system doesn't work on macOS: /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h is known to contain uses of "register", which is removed from C++17])
fi
;; ;;
*) *)
AC_MSG_ERROR([Incorrect --enable-python option]) AC_MSG_ERROR([Incorrect --enable-python option])
...@@ -8274,17 +8277,6 @@ if test $enable_python != no; then ...@@ -8274,17 +8277,6 @@ if test $enable_python != no; then
fi fi
if test $enable_python = system; then if test $enable_python = system; then
if test -z "$PYTHON_CFLAGS" -a $_os = Darwin; then
python_version=2.7
PYTHON=python$python_version
if test -d "$FRAMEWORKSHOME/Python.framework/Versions/${python_version}/include/python${python_version}"; then
PYTHON_CFLAGS="-I$FRAMEWORKSHOME/Python.framework/Versions/${python_version}/include/python${python_version}"
PYTHON_LIBS="-framework Python"
else
PYTHON_CFLAGS="`$PYTHON-config --includes`"
PYTHON_LIBS="`$PYTHON-config --libs`"
fi
fi
if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
# Fallback: Accept these in the environment, or as set above # Fallback: Accept these in the environment, or as set above
# for MacOSX. # for MacOSX.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment