Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo_fetch PG, rust, cargo: Add support for using legacysupport PG #10740

Merged
merged 1 commit into from Apr 26, 2021

Conversation

cjones051073
Copy link
Member

@cjones051073 cjones051073 commented Apr 20, 2021

https://trac.macports.org/ticket/62656

Support older systems requiring legacy support

- Patch bootstrapping binaries to use legacysupport dylib for missing libSystem calls
- Wrap underlying compiler commands used by rust/cargo to enforce use of legacy support flags

Fixes things perfectly for macOS10.9. rust, cargo install fine and was able to build a number of cargo/rust based ports.

Work on older systems is WIP, as currently failing for other unknown reasons.

@kencu FYI

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS x.y
Xcode x.y

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@macportsbot
Copy link

Notifying maintainers:
@herbygillot for port cargo, rust.
@g5pw for port rust.

@macportsbot macportsbot added by: member Created by a member with commit rights maintainer: open Affects an openmaintainer port labels Apr 20, 2021
@cjones051073 cjones051073 force-pushed the fix-rust-old-systems branch 3 times, most recently from 2f72494 to 67fc517 Compare April 20, 2021 20:01
@herbygillot
Copy link
Member

I've gotta be honest, I'm still pretty wary of doing any legacysupport modifications to anything Rust-related.

lang/rust/Portfile Outdated Show resolved Hide resolved
@cjones051073
Copy link
Member Author

cjones051073 commented Apr 20, 2021

I've gotta be honest, I'm still pretty wary of doing any legacysupport modifications to anything Rust-related.

I understand, there was problems last time. I know why there was problems last time this was tried, and this time I avoid them. For one, last time the use of legacysupport was not limited to 10.9 or older, so it was also used on 10.10 and 10.11. This time it is currently limited to 10.9 and older, so will only affect platforms rust currently does not build on anyway.

I am 99.9% sure on 10.10 and newer the changes here have no affect what so ever.

The other reason it shouldn’t be a problem this time is i use the static link option, which avoids the issue with the internal llvm build, and also wrap the commands to make completely sure the right flags are used.

@cjones051073 cjones051073 force-pushed the fix-rust-old-systems branch 11 times, most recently from a09bfd9 to 68e2795 Compare April 23, 2021 21:10
@cjones051073 cjones051073 marked this pull request as draft April 23, 2021 22:09
@cjones051073 cjones051073 force-pushed the fix-rust-old-systems branch 7 times, most recently from 62ce1a5 to fe99b72 Compare April 25, 2021 12:54
@cjones051073 cjones051073 force-pushed the fix-rust-old-systems branch 4 times, most recently from 6d7ae55 to b0d566a Compare April 26, 2021 07:54
…n older systems

    - Patch bootstrapping binaries to use legacysupport dylib for missing libSystem calls
    - Wrap underlying compiler commands used by rust/cargo to enforce use of legacy support flags

Closes: https://trac.macports.org/ticket/62656
@cjones051073
Copy link
Member Author

Tested now extensively on a number of systems. Fixes build of rust itself on 10.9, and also on 10.{10-11} a number of port builds that currently fail due to missing features in libSystem, like clock_gettime.

@cjones051073 cjones051073 marked this pull request as ready for review April 26, 2021 08:09
@cjones051073 cjones051073 merged commit f918bf6 into macports:master Apr 26, 2021
@cjones051073 cjones051073 deleted the fix-rust-old-systems branch May 1, 2021 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by: member Created by a member with commit rights maintainer: open Affects an openmaintainer port
4 participants