From nobody Wed Sep  8 22:14:46 2021
X-Original-To: python@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 192D417AE8C6
	for <python@mlmmj.nyi.freebsd.org>; Wed,  8 Sep 2021 22:14:47 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4H4bzC07y7z53QY
	for <python@FreeBSD.org>; Wed,  8 Sep 2021 22:14:47 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9EF75CDF
	for <python@FreeBSD.org>; Wed,  8 Sep 2021 22:14:46 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 188MEkv9024046
	for <python@FreeBSD.org>; Wed, 8 Sep 2021 22:14:46 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 188MEkTK024044
	for python@FreeBSD.org; Wed, 8 Sep 2021 22:14:46 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: python@FreeBSD.org
Subject: [Bug 258377] lang/python36 lang/python37 lang/python38 lang/python39
 lang/python310: disable detection of multiarch for clang 13
Date: Wed, 08 Sep 2021 22:14:46 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Ports & Packages
X-Bugzilla-Component: Individual Port(s)
X-Bugzilla-Version: Latest
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Many People
X-Bugzilla-Who: dim@FreeBSD.org
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: python@FreeBSD.org
X-Bugzilla-Flags: maintainer-feedback?
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
 op_sys bug_status bug_severity priority component assigned_to reporter
 flagtypes.name attachments.created
Message-ID: <bug-258377-21822@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-python
List-Help: <mailto:python+help@freebsd.org>
List-Post: <mailto:python@freebsd.org>
List-Subscribe: <mailto:python+subscribe@freebsd.org>
List-Unsubscribe: <mailto:python+unsubscribe@freebsd.org>
Sender: owner-freebsd-python@freebsd.org
X-BeenThere: freebsd-python@freebsd.org
MIME-Version: 1.0
X-ThisMailContainsUnwantedMimeParts: N

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258377

            Bug ID: 258377
           Summary: lang/python36 lang/python37 lang/python38
                    lang/python39 lang/python310: disable detection of
                    multiarch for clang 13
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: python@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: python@FreeBSD.org
             Flags: maintainer-feedback?(python@FreeBSD.org)

Created attachment 227773
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227773&action=
=3Dedit
Stub out multiarch detection in lang/python3X ports for clang 13

During an exp-run for llvm 13 (see bug 258209), it turned out that
lang/python3([6-9]|10) do not build with clang 13.0.0 [1][2][3][4][5]:

LD_LIBRARY_PATH=3D/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14 CC=3D=
'cc'
LDSHARED=3D'cc -shared  -lpthread -L/usr/local/lib  -fstack-protector-stron=
g   '
OPT=3D'-DNDEBUG'  _TCLTK_INCLUDES=3D'' _TCLTK_LIBS=3D''  ./python -E ./setu=
p.py -q
build
Failed to import the site module
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/site.py", l=
ine
553, in <module>
    main()
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/site.py", l=
ine
539, in main
    known_paths =3D addusersitepackages(known_paths)
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/site.py", l=
ine
282, in addusersitepackages
    user_site =3D getusersitepackages()
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/site.py", l=
ine
258, in getusersitepackages
    user_base =3D getuserbase() # this will also set USER_BASE
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/site.py", l=
ine
248, in getuserbase
    USER_BASE =3D get_config_var('userbase')
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/sysconfig.p=
y",
line 601, in get_config_var
    return get_config_vars().get(name)
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/sysconfig.p=
y",
line 550, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/wrkdirs/usr/ports/lang/python36/work/Python-3.6.14/Lib/sysconfig.p=
y",
line 421, in _init_posix
    _temp =3D __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named
'_sysconfigdata_m_freebsd14_x86_64-unknown-freebsd14'
*** Error code 1

The reason this breaks with clang >=3D 13, is that it now started supportin=
g the
-print-multiarch option, but in its output it adds a major.minor version
number, for example x86_64-unknown-freebsd14.0. The dot confuses Python, as=
 it
appends the multiarch name to the sysconfig module name, and then can't load
the resulting _sysconfigdata__freebsd14_x86_64-unknown-freebsd14.0.py file:

    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, I would like to propose to just stub it out du=
ring
post-patch, as per the attached diff.

[1]
http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20=
h27m09s/logs/errors/python36-3.6.14.log
[2]
http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20=
h27m09s/logs/errors/python37-3.7.11.log
[3]
http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20=
h27m09s/logs/errors/python38-3.8.11.log
[4]
http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20=
h27m09s/logs/errors/python39-3.9.7.log
[5]
http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20=
h27m09s/logs/errors/python310-3.10.0.r1.log

--=20
You are receiving this mail because:
You are the assignee for the bug.=