[MacPorts] #66591: rust @1.66.0: trouble building universal arm64/x86_64

MacPorts noreply at macports.org
Sat Dec 31 20:46:43 UTC 2022


#66591: rust @1.66.0: trouble building universal arm64/x86_64
---------------------+---------------------------------
  Reporter:  kencu   |      Owner:  MarcusCalhoun-Lopez
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:  rust    |
---------------------+---------------------------------

Comment (by kencu):

 This approach doesn't work to build universal ports using rust so far.

 With either version of the muniversal PortGroup, you just wind up with
 both of the built architectures being the host architecture.

 According to this: https://rust-lang.github.io/rustup/cross-
 compilation.html what is needed instead is to get the one install host
 version of rust to install the toolchain needed to support the arch you
 are cross-compiling to, and then tell it to build for that alternative
 toolchain using something like this:

 {{{
 cargo build --target=x86_64-apple-darwin22.2.0
 cargo build --target=arm64-apple-darwin22.2.0
 }}}

 and then lips those together with the muniversal PG.

 SO -- step one is to get a cross-compiling version of rust/cargo
 working...

-- 
Ticket URL: <https://trac.macports.org/ticket/66591#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list