Opened 7 years ago

Closed 7 years ago

#55962 closed defect (fixed)

rust @1.24.0: universal variant does not build universal

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: rust

Description

$ port -v installed rust
The following ports are currently installed:
  rust @1.24.0_0+universal (active) platform='darwin 16' archs='i386 x86_64' date='2018-03-04T23:56:41-0600'
$ lipo -info /opt/local/bin/rustc
Non-fat file: /opt/local/bin/rustc is architecture: x86_64

Attachments (1)

Portfile.diff (9.3 KB) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:2 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attached is a proposed solution for making rust build universal binaries.
Included is also a fix for #55956.

Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attachment: Portfile.diff added

comment:3 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Keywords: haspatch added

comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks! That's a lot more complicated than I thought it would be; sorry about that. It looks like that does work, though it's hard to tell, given how weird it is.

comment:5 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Oh—the revision of the main port will need to be increased, since this changes what gets installed in some situations (specifically, when the universal variant was chosen). (The revision of the subport probably shouldn't be increased because I don't think its contents would change.)

It does work at least as far as:

$ rustc --version
rustc 1.24.1
$ arch -i386 rustc --version
rustc 1.24.1

Before your changes, it was:

$ rustc --version
rustc 1.24.1
$ arch -i386 rustc --version
arch: posix_spawnp: rustc: Bad CPU type in executable

comment:6 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

In 02bf4b5730ae7fa7d5641089facec22b4a8b3610/macports-ports:

rust: allow universal build; UsingTheRightCompiler

Fixes #55962
Fixes #55956

maintainer timeout

Note: See TracTickets for help on using tickets.