-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix Xcode 15 build failure due to DT_TOOLCHAIN_DIR #132803
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
Fix Xcode 15 build failure due to DT_TOOLCHAIN_DIR #132803
Conversation
|
|
||
| @override | ||
| String? migrateLine(String line) { | ||
| if (line.startsWith('LD_RUNPATH_SEARCH_PATHS') || line.startsWith('LIBRARY_SEARCH_PATHS')) { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
christopherfujino
left a comment
There was a problem hiding this 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
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: * [Pre-fix failure](https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/vashworth_google.com/04e485a0b152a0720f5e561266f7a6e4fb64fc76227fcacc95b67486ae2771e7/+/build.proto) * [Post-fix success](https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/vashworth_google.com/d454a3e181e1a97692bdc1fcc197738fe04e4acf1cb20026fd040fd78513f3b0/+/build.proto) Fixes flutter#132755.
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: * [Pre-fix failure](https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/vashworth_google.com/04e485a0b152a0720f5e561266f7a6e4fb64fc76227fcacc95b67486ae2771e7/+/build.proto) * [Post-fix success](https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/vashworth_google.com/d454a3e181e1a97692bdc1fcc197738fe04e4acf1cb20026fd040fd78513f3b0/+/build.proto) Fixes flutter#132755.
|
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... |
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
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]>
Starting in Xcode 15, when building macOS, DT_TOOLCHAIN_DIR cannot be used to evaluate LD_RUNPATH_SEARCH_PATHS or LIBRARY_SEARCH_PATHS.
xcodebuilderror message recommend using TOOLCHAIN_DIR instead.Since Xcode 15 isn't in CI, I tested it in a one-off
ledtest:Fixes #132755.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.