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

ld64: default to +ld64_xcode on Xcode9+ #2247

Merged
merged 1 commit into from
Jul 25, 2018
Merged

ld64: default to +ld64_xcode on Xcode9+ #2247

merged 1 commit into from
Jul 25, 2018

Conversation

kencu
Copy link
Contributor

@kencu kencu commented Jul 20, 2018

ld64 does not understand tapi in the open-source
versions at present.

I believe that XCode 9+ generates the tapi lookups -- open to fine-tuning of the details on this.

closes: https://trac.macports.org/ticket/56843
closes: https://trac.macports.org/ticket/53784
closes: https://trac.macports.org/ticket/56398
closes: https://trac.macports.org/ticket/56277
see: https://trac.macports.org/ticket/56647
see: https://trac.macports.org/ticket/54510
see: https://trac.macports.org/ticket/54506
see: https://trac.macports.org/ticket/53151

@macportsbot
Copy link

Notifying maintainers:
@jeremyhu for port ld64.

@macportsbot macportsbot added by: member Created by a member with commit rights maintainer: requires approval labels Jul 20, 2018
@macportsbot
Copy link

Travis Build #2977 Errored.

Lint results
--->  Verifying Portfile for ld64
--->  0 errors and 0 warnings found.

Port ld64 success on xcode9.4. Log
Port ld64-97 fail on xcode9.4. Log
Port ld64-127 success on xcode9.4. Log
Port ld64-136 fail on xcode9.4. Log
Port ld64-236 success on xcode9.4. Log
Port ld64 success on xcode8.3. Log
Port ld64-97 fail on xcode8.3. Log
Port ld64-127 success on xcode8.3. Log
Port ld64-136 fail on xcode8.3. Log
Port ld64-236 success on xcode8.3. Log
Port ld64-latest success on xcode8.3. Log
Port ld64-xcode success on xcode8.3. Log
Port ld64 success on xcode7.3. Log
Port ld64-97 fail on xcode7.3. Log
Port ld64-127 success on xcode7.3. Log
Port ld64-136 fail on xcode7.3. Log
Port ld64-236 success on xcode7.3. Log
Port ld64-latest success on xcode7.3. Log
Port ld64-xcode success on xcode7.3. Log

@cjones051073
Copy link
Member

So this has hit the maintainer timeout.

Given it fixes a number of issues, and I can attest to it in as far as I have been using the variant in another context and not seen any issues so far, I would suggest we go ahead and merge. ?

@mf2k
Copy link
Contributor

mf2k commented Jul 25, 2018

I concur, let's push this. Any objections?

@kencu
Copy link
Contributor Author

kencu commented Jul 25, 2018

pushing it won't break anything, I think. We may find the xcode test needs a bit more tweaking, but we can sort that out as we go. Jeremy is clearly super-busy these days. I don't think he'd mind a small change like this...

@pmetzger
Copy link
Member

Given the consensus, I will do the merge.

@pmetzger pmetzger merged commit 5698d94 into macports:master Jul 25, 2018
@ryandesign
Copy link
Contributor

Note that increasing the revision of ld64 was pointless and just forced everyone who already had ld64 installed to rebuild it. The port always ensures that one of its variants is set, and rebuilding it would not cause this new variant to become selected; MacPorts preserves variant selections on upgrades.

Note that this port has subports, and it's generally not a good idea to specify the revision globally in such ports. Most of the subports already set their own revision, but ld64-xcode did not, so setting the global revision increased the revision of the ld64-xcode subport unnecessarily, though nothing about it has changed, causing another unnecessary rebuild.

Of course you can't decrease the revision now that it's been committed, but moving the revision 1 line to both the subport ld64-xcode block and the if {${subport} eq ${name}} block would increase clarity.

@kencu
Copy link
Contributor Author

kencu commented Jul 26, 2018

most people would have had it installed with no variant set, I thought.

bumping the rev was meant to force to xcode variant to install on the specified systems....

did it not work that way? If not, how should we fix it to do so?

@cjones051073
Copy link
Member

cjones051073 commented Jul 26, 2018

I thought the same which is why I also rev'bumped cctools when I committed a similar patch.

@ryandesign I just did a test and if previously the user had no variants selected, which is the case at least on macOS10.13, then the rev bump seems to have had the intended affect.

What I tried was to replace the update here. So I first force uninstalled the ld64 port, and then hacked the Portfile to revert the changes here. I then installed it as per defaults

 > sudo port install ld64
--->  Computing dependencies for ld64
--->  Fetching archive for ld64
--->  Attempting to fetch ld64-3_0.darwin_17.x86_64.tbz2 from https://packages.macports.org/ld64
--->  Attempting to fetch ld64-3_0.darwin_17.x86_64.tbz2.rmd160 from https://packages.macports.org/ld64
--->  Installing ld64 @3_0
--->  Activating ld64 @3_0
--->  Cleaning ld64
--->  Updating database of binaries
--->  Updating database of C++ stdlib usage
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

Note no variants were previously default selected here.

I then updated the port file, adding back the changes here, and ran a normal update.

 > sudo port upgrade outdated
--->  Computing dependencies for ld64
--->  Fetching archive for ld64
--->  Attempting to fetch ld64-3_1+ld64_xcode.darwin_17.x86_64.tbz2 from https://packages.macports.org/ld64
--->  Attempting to fetch ld64-3_1+ld64_xcode.darwin_17.x86_64.tbz2.rmd160 from https://packages.macports.org/ld64
--->  Installing ld64 @3_1+ld64_xcode
--->  Cleaning ld64
--->  Computing dependencies for ld64
--->  Deactivating ld64 @3_0
--->  Cleaning ld64
--->  Activating ld64 @3_1+ld64_xcode
--->  Cleaning ld64
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

 > sudo port installed ld64
The following ports are currently installed:
  ld64 @3_0
  ld64 @3_1+ld64_xcode (active)

So now I have it installed and active with the Xcode variant selected.

@ryandesign
Copy link
Contributor

most people would have had it installed with no variant set, I thought.

bumping the rev was meant to force to xcode variant to install on the specified systems....

Oh. My apologies, you're right. I thought a variant was always selected for ld64, but it looks like for "latest" that wasn't the case, so increasing the revision does indeed help here. Still, the revision increase for the ld64-xcode subport was unnecessary, and the revision lines should be move to each subport that they affect.

I thought the same which is why I also rev'bumped cctools when I committed a similar patch.

For cctools, it is as I said: a variant was already always selected, therefore revbumping there wasn't helpful. MacPorts base doesn't offer a supported way of forcing a variant to be deselected during an upgrade, which is what would be required in order for cctools to automatically give upgrading users the xcode variant there. Such a feat was recently attempted for another port in bed79e2. The solution employed there is not working on the buildbot (see ticket 56778) but that may be due to an mpbb bug so it might be ok to use a similar method on cctools.

@cjones051073
Copy link
Member

Yes, of course, for cctools it didn't do what I wanted. Lucky for that port the issues with Xcode 9 are currently much more limited than they where for ld64 (the update was in fact mostly to future proof the port for the next OS). So I am not sure its worth the effect to try what you suggest above.

@kencu kencu deleted the ld64up branch August 30, 2018 20:54
halostatue added a commit to halostatue/macports-ports that referenced this pull request Sep 12, 2023
#### Description

```markdown
- Bump actions/checkout from 3 to 4 by @dependabot in macports#2247
- Add JRuby 9.3.11.0 by @headius in macports#2248
```

###### Tested on

macOS 13.5.2 22G91 arm64
Xcode 14.3.1 14E300c

###### Verification

Have you

- [x] followed our [Commit Message Guidelines](https://trac.macports.org/wiki/CommitMessages)?
- [x] squashed and [minimized your commits](https://guide.macports.org/#project.github)?
- [x] checked that there aren't other open [pull requests](https://github.com/macports/macports-ports/pulls) for the same change?
- [x] checked your Portfile with `port lint --nitpick`?
- [x] tried a full install with `sudo port -vs install`?
- [x] tested basic functionality of all binary files?
reneeotten pushed a commit that referenced this pull request Sep 12, 2023
#### Description

```markdown
- Bump actions/checkout from 3 to 4 by @dependabot in #2247
- Add JRuby 9.3.11.0 by @headius in #2248
```

###### Tested on

macOS 13.5.2 22G91 arm64
Xcode 14.3.1 14E300c

###### Verification

Have you

- [x] followed our [Commit Message Guidelines](https://trac.macports.org/wiki/CommitMessages)?
- [x] squashed and [minimized your commits](https://guide.macports.org/#project.github)?
- [x] checked that there aren't other open [pull requests](https://github.com/macports/macports-ports/pulls) for the same change?
- [x] checked your Portfile with `port lint --nitpick`?
- [x] tried a full install with `sudo port -vs install`?
- [x] tested basic functionality of all binary files?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 participants