[Bug 258377] lang/python36 lang/python37 lang/python38 lang/python39 lang/python310: disable detection of multiarch for clang 13

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 08 Sep 2021 22:16:04 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258377

Dimitry Andric <dim_at_FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #227773|0                           |1
           is patch|                            |

--- Comment #1 from Dimitry Andric <dim_at_FreeBSD.org> ---
Comment on attachment 227773
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=227773
Stub out multiarch detection in lang/python3X ports for clang 13

>commit f7c6323844a874743c0d8a0400a41fbc7af197db
>Author: Dimitry Andric <dim_at_FreeBSD.org>
>Date:   Wed Sep 8 23:59:36 2021 +0200
>
>    lang/python3([6-9]|10): disable detection of multiarch
>    
>    It breaks with clang >= 13, which adds a major.minor version number in
>    -print-multiarch output, and the dot confuses Python:
>    
>    ModuleNotFoundError: No module named '_sysconfigdata__freebsd14_x86_64-unknown-freebsd14'
>    
>    Since we do not support multiarch, and the configure script has no way
>    to disable the multiarch check, stub it out during post-patch.
>
>diff --git a/lang/python310/Makefile b/lang/python310/Makefile
>index 3dbf8d5d004e..64aba656d340 100644
>--- a/lang/python310/Makefile
>+++ b/lang/python310/Makefile
>_at__at_ -124,6 +124,10 _at__at_ post-patch:
> # which introduces hidden dependency and breaks build
> 	_at_${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
> 	_at_${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
>+# disable detection of multiarch as it breaks with clang >= 13, which adds a
>+# major.minor version number in -print-multiarch output, confusing Python
>+	_at_${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
>+		${WRKSRC}/configure.ac
> # Apply DISABLED_EXTENSIONS
> 	_at_${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
> .  for _module in ${DISABLED_EXTENSIONS}
>diff --git a/lang/python36/Makefile b/lang/python36/Makefile
>index 636f8d198350..b52d72bc3e06 100644
>--- a/lang/python36/Makefile
>+++ b/lang/python36/Makefile
>_at__at_ -121,6 +121,12 _at__at_ DISABLED_EXTENSIONS+=	nis
> PLIST_SUB+=	NO_NIS=""
> .endif
> 
>+post-patch:
>+# disable detection of multiarch as it breaks with clang >= 13, which adds a
>+# major.minor version number in -print-multiarch output, confusing Python
>+	_at_${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
>+		${WRKSRC}/configure.ac
>+
> post-install:
> .if ! ${PORT_OPTIONS:MDEBUG}
> 	${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so						# Upstream Issue: https://bugs.python.org/issue17975
>diff --git a/lang/python37/Makefile b/lang/python37/Makefile
>index 8909af0dd7ab..4db00e66e9d2 100644
>--- a/lang/python37/Makefile
>+++ b/lang/python37/Makefile
>_at__at_ -111,6 +111,10 _at__at_ post-patch:
> # which introduces hidden dependency and breaks build
> 	_at_${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
> 	_at_${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
>+# disable detection of multiarch as it breaks with clang >= 13, which adds a
>+# major.minor version number in -print-multiarch output, confusing Python
>+	_at_${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
>+		${WRKSRC}/configure.ac
> # Apply DISABLED_EXTENSIONS
> 	_at_${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
> .  for _module in ${DISABLED_EXTENSIONS}
>diff --git a/lang/python38/Makefile b/lang/python38/Makefile
>index 68359a8579a8..f3dcec0757fa 100644
>--- a/lang/python38/Makefile
>+++ b/lang/python38/Makefile
>_at__at_ -115,6 +115,10 _at__at_ post-patch:
> # which introduces hidden dependency and breaks build
> 	_at_${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
> 	_at_${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
>+# disable detection of multiarch as it breaks with clang >= 13, which adds a
>+# major.minor version number in -print-multiarch output, confusing Python
>+	_at_${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
>+		${WRKSRC}/configure.ac
> # Apply DISABLED_EXTENSIONS
> 	_at_${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
> .  for _module in ${DISABLED_EXTENSIONS}
>diff --git a/lang/python39/Makefile b/lang/python39/Makefile
>index 4a0d31ba17f2..2d052cf3741d 100644
>--- a/lang/python39/Makefile
>+++ b/lang/python39/Makefile
>_at__at_ -116,6 +116,10 _at__at_ post-patch:
> # which introduces hidden dependency and breaks build
> 	_at_${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
> 	_at_${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
>+# disable detection of multiarch as it breaks with clang >= 13, which adds a
>+# major.minor version number in -print-multiarch output, confusing Python
>+	_at_${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
>+		${WRKSRC}/configure.ac
> # Apply DISABLED_EXTENSIONS
> 	_at_${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
> .  for _module in ${DISABLED_EXTENSIONS}

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Wed Sep 08 2021 - 22:16:04 UTC

Original text of this message