Opened 4 years ago

Closed 3 years ago

#61920 closed defect (fixed)

Python37 failed to Build on M1 Apple Silicon

Reported by: rsmacleod (Rob MacLeod) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: arm64 Cc: radarhere (Andrew Murray)
Port: python37

Description

I am trying to build xorg-server (because Quartz X11 is apparently not compatible with M1/Apple Silicon. But I could not get past the python build:

--->  Staging python37 into destroot
Error: Failed to destroot python37: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python37/python37/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port python37 failed

and from the log file:

:info:destroot /usr/bin/clang -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -arch arm64 -DPYTHONFRAMEWORK='"Python"' -o pythonw \
:info:destroot          ./Tools/pythonw.c -I.. -I./../Include \
:info:destroot          ../Python.framework/Versions/3.7/Python
:info:destroot ./Tools/pythonw.c:125:9: error: "Unknown CPU"
:info:destroot #       error "Unknown CPU"
:info:destroot         ^
:info:destroot ./Tools/pythonw.c:223:9: warning: comparison of function 'posix_spawn' not equal to a null pointer is always true [-Wtautological-pointer-compare]

Attachments (1)

python37.log (347.4 KB) - added by rsmacleod (Rob MacLeod) 4 years ago.

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by rsmacleod (Rob MacLeod)

Attachment: python37.log added

comment:1 Changed 4 years ago by kencu (Ken)

python38+ should work, as it is there for arm64 <http://packages.macports.org/python38/python38-3.8.7_0.darwin_20.arm64.tbz2>

python38 is supposed to be our MacPorts default python at present.

Can you see what is calling for python37?

comment:2 Changed 4 years ago by rsmacleod (Rob MacLeod)

Thanks Ken,

I am installing xorg-server and this is why the python37 request. I will try to install python38 and see if xorg is happy with that. I have read that xorg-server works with Apple silicon so was surprised when it failed to make.

I am working on a full install of texlive now, so will that run to completion and then try to see about xorg-server again...

comment:3 Changed 4 years ago by rsmacleod (Rob MacLeod)

Still failing as the dependencies seem to be python37 specific:

 py37-alabaster
 py37-babel
 py37-certifi
 py37-chardet
 py37-docutils
 py37-idna
 py37-imagesize
 py37-ipaddress
 py37-jinja2
 py37-markupsafe
 py37-packaging
 py37-parsing
 py37-pygments
 py37-requests
 py37-roman
 py37-setuptools
 py37-snowballstemmer
 py37-sphinx
 py37-sphinxcontrib-applehelp
 py37-sphinxcontrib-devhelp
 py37-sphinxcontrib-htmlhelp
 py37-sphinxcontrib-jsmath
 py37-sphinxcontrib-qthelp
 py37-sphinxcontrib-serializinghtml
 py37-sphinxcontrib-websupport
 py37-tz
 py37-urllib3
 py38-beaker
 py38-mako
 py38-markdown
 py38-markupsafe
 py38-setuptools
 pygments_select
 python37

comment:4 Changed 4 years ago by kencu (Ken)

in port rdeps xorg-server I see:

    xorg-libxcb
      python38

but nothing wants python37.

comment:5 Changed 4 years ago by rsmacleod (Rob MacLeod)

OK, I did a port clean xorg-server first and then a clean install and the python dependencies are covered now...looking good so far...

comment:6 Changed 4 years ago by jmroot (Joshua Root)

Keywords: arm64 added; big sur M1 apple silicon removed
Owner: set to jmroot
Port: python37 added
Status: newaccepted

Yeah, only python 3.9 properly supports Apple Silicon at present. Upstream is going to backport the fixes to 3.8 but hasn't done so yet. When they do, I may backport them further to the other non-EOL branches.

Last edited 4 years ago by jmroot (Joshua Root) (previous) (diff)

comment:7 in reply to:  1 Changed 4 years ago by jmroot (Joshua Root)

Replying to kencu:

python38+ should work, as it is there for arm64

3.8 will build, but at minimum will have serious issues with ctypes on arm64.

comment:8 in reply to:  1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kencu:

python38 is supposed to be our MacPorts default python at present.

python39 is supposed to be the default now, per [fa147a0a5b020635eb792a94330a0cc5641cc7b3/macports-ports].

comment:9 Changed 4 years ago by kencu (Ken)

Hey, that was probably the day after I changed my last port from python39 to python38 as that was said to be the default :>

Seriously, nobody knows when these defaults are changing -- I don't follow changes to that PortGroup.

comment:10 Changed 4 years ago by radarhere (Andrew Murray)

Cc: radarhere added

comment:11 Changed 3 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: acceptedclosed

In ef99b6ee12a0f9a97bc7d667edcb522842a0e160/macports-ports (master):

python37: backport macOS 11 and arm64 fixes

Closes: #61920

Note: See TracTickets for help on using tickets.