Opened 3 years ago
Last modified 3 years ago
#63532 assigned defect
py-tensorflow @2.6.0 on M1: Architecture confusion for dependencies
Reported by: | p-bro | Owned by: | emcrisostomo (Enrico Maria Crisostomo) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | cjones051073 (Chris Jones), missa-prime (Mohamed Issa) | |
Port: | py-tensorflow |
Description
When attempting to install the py-tensorflow port on MacOS 11.6 on M1, port install py-tensorflow
command bails out with the following error:
Error: Cannot install py39-tensorflow for the arch 'x86_64' because Error: its dependency bazel-3.7 does not build for the required arch by default Error: and does not have a universal variant. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port py-tensorflow failed
A full log is attached. For some reason ports is confused about the architecture it's running on: At no point I requested the x86_64 architecture. All my configuration files are the default.
Directly requesting the py39 version with the command port install py39-tensorflow
does not have this issue and proceeds to install dependencies in the correct architectures.
I encountered the bug on py-tensorflow, but there may be something more fundamental going on here, and the bug may actually be with base.
Attachments (1)
Change History (4)
Changed 3 years ago by p-bro
comment:1 Changed 3 years ago by jmroot (Joshua Root)
Replying to p-bro:
For some reason ports is confused about the architecture it's running on: At no point I requested the x86_64 architecture.
From the Portfile:
# Not yet ready for arm supported_archs x86_64
That should only be set in the subports, since py-tensorflow itself is noarch. But that's unlikely to be the whole problem.
It looks like bazel-3.7 can build for arm64 or x86_64, but not both (no universal variant). That makes it tricky to use as a dependency of x86_64-only ports on an arm64 system.
comment:2 Changed 3 years ago by jmroot (Joshua Root)
Cc: | missa-prime added |
---|
comment:3 Changed 3 years ago by jmroot (Joshua Root)
If bazel's architecture doesn't matter to its dependents, they can use depends_skip_archcheck
to indicate that (and that could be done in the portgroup). I don't know if that's the case.
output of sudo port -d install py-tensorflow +native