[MacPorts] #63488: meson @0.59.1_1: not sorting out the proper build arch again on systems with 32 bit kernels
MacPorts
noreply at macports.org
Wed Sep 15 01:10:46 UTC 2021
#63488: meson @0.59.1_1: not sorting out the proper build arch again on systems
with 32 bit kernels
--------------------------+--------------------
Reporter: RobK88 | Owner: kencu
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: fixed | Keywords: lion
Port: dav1d meson |
--------------------------+--------------------
Comment (by kencu):
my python skills are very weak, but I guess you mean something like this:
{{{
def detect_osx_arch() -> str:
"""
per #6187, handle early Mac 64-bit Intel CPU with 64-bit OSX using a
**32-bit kernel**
testing this requires old MacOS and hardware, not easily available for
cloud CI,
so users needing this functionality may kindly need to help with
debugging info.
"""
try:
ret = subprocess.run(['sysctl', '-n', 'hw.cpu64bit_capable'],
universal_newlines=True,
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout
trial = 'x86_64' if ret.strip() == '1' else 'x86'
except subprocess.SubprocessError:
# very old MacOS version with implicit 32-bit CPU due to calling
if-elif stack
trial = 'x86'
return trial
}}}
so that would specifically catch the subprocess error, but if there is a
more generic error (like it won't run at all because the {{{import
subprocess}}} is missing) I would guess it will stil bomb out with some
other more obvious error.
If that is right, I can certainly make that change. We don't have to
revbump -- it can get picked up next update.
--
Ticket URL: <https://trac.macports.org/ticket/63488#comment:23>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list