Skip to content

Conversation

@vashworth
Copy link
Contributor

@vashworth vashworth commented Aug 17, 2023

Starting in Xcode 15, when building macOS, DT_TOOLCHAIN_DIR cannot be used to evaluate LD_RUNPATH_SEARCH_PATHS or LIBRARY_SEARCH_PATHS. xcodebuild error message recommend using TOOLCHAIN_DIR instead.

Since Xcode 15 isn't in CI, I tested it in a one-off led test:

Fixes #132755.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop labels Aug 17, 2023
@vashworth vashworth marked this pull request as ready for review August 17, 2023 22:40

@override
String? migrateLine(String line) {
if (line.startsWith('LD_RUNPATH_SEARCH_PATHS') || line.startsWith('LIBRARY_SEARCH_PATHS')) {
Copy link
Contributor

@christopherfujino christopherfujino Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this always be at the start of the line, or might there be leading whitespace? (IDK what format this file is in)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a Cocoapods-generated file, so it shouldn't have leading whitespace. I added a change to trim it out before comparison anyways, just in case/future-proofing

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question about whether the pattern matching should allow leading whitespace, otherwise LGTM

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 18, 2023
@auto-submit auto-submit bot merged commit b52297d into flutter:master Aug 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 18, 2023
vashworth added a commit to vashworth/flutter that referenced this pull request Aug 21, 2023
vashworth added a commit to vashworth/flutter that referenced this pull request Aug 21, 2023
@lukaszciastko
Copy link

lukaszciastko commented Sep 20, 2023

I tried this fix, but I am still getting this error using latest Flutter beta and Xcode 15 in an existing project.

@vashworth
Copy link
Contributor Author

I tried this fix, but I am still getting this error using latest Flutter beta and Xcode 15 in an existing project.

@lukaszciastko Could you please file a issue describing your error and include reproducible steps?

@lukaszciastko
Copy link

I tried this fix, but I am still getting this error using latest Flutter beta and Xcode 15 in an existing project.

@lukaszciastko Could you please file a issue describing your error and include reproducible steps?

The issue is exactly the same. Your fix doesn't work for my app, but it works when I create a new app. Having said that, none of the workarounds people are suggesting on the Internet have worked for me. I don't think I can include reproducible steps, because I don't know myself what causes it and an empty app works. I can see someone else mentioned here they are also having this issue with the latest Flutter: CocoaPods/CocoaPods#12012 (comment). I guess all I can do is keep investigating...

cbracken added a commit to cbracken/flutter that referenced this pull request Sep 26, 2023
Due to changes in Xcode 15, several variables such as `DT_TOOLCHAIN_DIR`
have been eliminateed in favour of others such as `TOOLCHAIN_DIR`. This
broke CocoaPods support under Xcode 15, as reported in:
CocoaPods/CocoaPods#12012

@vashworth worked around this in Flutter in:
flutter#132803

The CocoaPods issue was resolved by the following PR to their repo:
CocoaPods/CocoaPods#12009
and was released in CocoaPods 1.13.0.

Also switches from an if-else chain to a switch for CocoaPodsStatus
handling.

Issue: flutter#133584
Related: flutter#132755
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2023
cbracken added a commit that referenced this pull request Dec 15, 2023
Due to changes in Xcode 15, several variables such as `DT_TOOLCHAIN_DIR`
have been eliminateed in favour of others such as `TOOLCHAIN_DIR`. This
broke CocoaPods support under Xcode 15, as reported in:
CocoaPods/CocoaPods#12012

@vashworth worked around this in Flutter in:
#132803

The CocoaPods issue was resolved by the following PR to their repo:
CocoaPods/CocoaPods#12009
and was released in CocoaPods 1.13.0.

Also switches from an if-else chain to a switch for CocoaPodsStatus
handling.

Related: #133584
Related: #132755

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

Co-authored-by: Greg Spencer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DT_TOOLCHAIN_DIR cannot be used to evaluate LD_RUNPATH_SEARCH_PATHS

3 participants