Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#61999 closed enhancement (invalid)

How to cross compile Apple Silicon target under Intel Apple computer ?

Reported by: cgilles (HumanDynamo) Owned by:
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc:
Port:

Description

Happy new year to Macports team.

Just a basic question, but important: can we cross-compile with Macports a Silicon target with Macports packages using an Intel based Apple computer ? Typically, i read on the web that Xcode can support this kind of task.

As i know i can set arm64 as target binary in Macports config file, but the files generated still Intel binaries.

Advantage: no need to buy a specific M1 computer to build a Silicon target.

Thanks in advance

Gilles Caulier

Change History (2)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Milestone: MacPorts Future
Resolution: invalid
Status: newclosed
Type: requestenhancement

The issue tracker is not for technical support; it's for bug reports and feature requests. Please ask questions about how to use MacPorts on the macports-users mailing list.

You can either create a dedicated MacPorts installation that will be for arm64, and in that MacPorts installation edit macports.conf and set build_arch to arm64, or you can install ports with the +universal variant which will build ports that support both arm64 and x86_64.

Of course, this only works for ports that can be compiled for arm64. Since Apple Silicon is still new, there are still many ports that cannot be compiled for Apple Silicon. These will either fail to build for arm64, or they will build for x86_64 instead, depending on how the port is set up. If you find ports that don't build for arm64, file bugs and/or pull requests.

comment:2 Changed 3 years ago by cgilles (HumanDynamo)

Thanks for your support.

As main digiKam developer, i already bundle whole application for macOS Intel, which work great (at least 6 hours to compile). We plan to support M1 target soon. So i will try your tip and report if one dependencies do not support yet arm64 target with Macports.

Best regards

Gilles Caulier

Note: See TracTickets for help on using tickets.