Opened 3 years ago

Closed 8 months ago

#64535 closed enhancement (wontfix)

terraform-1.1: add universal variant

Reported by: jpeeler (Jeff Peeler) Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: herbygillot (Herby Gillot)
Port: terraform-1.1

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Terraform was recently updated to install arm builds - https://github.com/macports/macports-ports/pull/13712. Since there may be some issues with running the arm build since it requires that all providers also be arm binaries, this is a request to be able to choose which architecture is installed.

Related bug: #64222

Change History (4)

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

Cc: herbygillot added
Description: modified (diff)
Owner: set to emcrisostomo
Status: newassigned
Summary: request to add x86 variant to terraformterraform-1.1: request to add x86 variant to terraform

Replying to jpeeler:

this is a request to be able to choose which architecture is installed.

Adding an x86 variant would be unusual. I know of no ports that offer this.

Instead, a universal variant should be added to the port. If you install the port with that variant, then the software will be available to you in both x86_64 and arm64 flavors and you can choose which one you want to run each time you run it (by using e.g. arch -x86_64 terraform1.1.

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 3 years ago by herbygillot (Herby Gillot)

Is there a way to choose which arch you want to install while issuing the port install command?

comment:3 Changed 3 years ago by jpeeler (Jeff Peeler)

Great question, probably wouldn't have made this ticket if I knew how to choose which arch to install (assuming it's possible).

Also, I've worked around my issue with using the arm flavor, so I no longer personally need anything to be done here.

Last edited 3 years ago by jpeeler (Jeff Peeler) (previous) (diff)

comment:4 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: wontfix
Status: assignedclosed
Summary: terraform-1.1: request to add x86 variant to terraformterraform-1.1: add universal variant

To choose which arch to install (globally, for all ports, before you've installed any ports), set build_arch in macports.conf. It is unusual to change this value and by doing so you may encounter an unusually high number of build problems since this is not routinely tested by contributors, although we would want to hear about any such problems so they can be fixed since build_arch is a supported option.

To choose the arch for a single port, if you are sure the dependencies are also available for that arch and nothing depends on the port you're about to install, you can specify build_arch on the command line, as in sudo port install terraform-1.1 build_arch=x86_64. This is not recommended. Users are not expected to set internal portfile options on the command line and MacPorts base is coded under the assumption that users do not choose on a port-by-port basis what architecture to use.

The supported solution is to install the port with the universal variant. This will install it for multiple architectures; on macOS 11 and later, those architectures are x86_64 and arm64. You can then pick which architecture you want to run by using the arch command, as in arch -x86_64 terraform-1.1. This port does not have a universal variant, so this ticket could be changed into a request to add a universal variant.

Note: See TracTickets for help on using tickets.