-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
"Error 'DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead' in Xcode 15 beta 5" #12012
Comments
This code block is from lib/cocoapods/target/build_settings.rb and triggers an error when a podspec has only dynamically vendored_framework file resource and is marked with a swift_version. define_build_settings_method :library_search_paths_to_import, :memoized => true do
search_paths = vendored_static_library_search_paths + vendored_dynamic_library_search_paths
if target.uses_swift? || other_swift_flags_without_swift?
search_paths << '/usr/lib/swift'
search_paths << '${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}'
search_paths << '$(PLATFORM_DIR)/Developer/Library/Frameworks' if test_xcconfig?
end
return search_paths if target.build_as_framework? || !target.should_build?
search_paths << target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)
end |
I’m seeing the same issue with out project. Looks like this might prevent building any project using Cocoapods with Xcode 15 beta 3. |
Same issue after moving from Xcode15b4 to Xcode15b5. |
I have the same issue since xcode15b5. |
`
I fix this error with post install hook |
done, please bump the submodule as part of this PR and I will run CI to verify this. |
thanks @ZhangTonghai, drop that at the bottom of your podfile and then run 'pod install', works! |
post_install do |installer|
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end
end |
Fixed by #12009 |
Complete solution for Flutter Developers to add in ios/Podfile:
|
@kekko7072 I tried out your solution, getting this error |
I've tried both solutions from @Dwarven and @ZhangTonghai and (for me) they both result in an error after running
I searched and found this error in previous issues but the solutions there did not work for me (missing xcconfig files, or files referenced in "Recovered References") This project still installs and builds fine in Beta 4 so I'll go back to that for now. Does anyone know if the solution in #12009 relies on these posted solutions? |
This issue is caused by the new ld in Xcode 15. I have been trying to reproduce the problem using open source libraries so that Apple can resolve it as soon as possible. Can you help identify which library is causing the issue? |
I'm unable to figure out what library is causing this |
Any updates? Or better to use beta 4 for now? |
I'm also receive that error. In my cases I use next libriries
Someone known how to fix this issue? |
@ADiks09 Have you tried deleting the pod file.lock and running the following commands: |
I tried with this but it throws the same error |
MLKitBarcodeScanning.framework Assertion failed: (fixups().size() == 2), function initFixup, file Atom.cpp
For me it was mobile_scanner package for flutter, which used MLKitBarcodeScanning.framework The workaround mentioned here: juliansteenbakker/mobile_scanner#690 (comment) works This workaround breaks other frameworks that my main project uses, but Ive verified it fixes this specific problem with a separate flutter project only dependent on mobile_scanner |
@BradenBagby Using
|
Complete solution for Capacitor Developers to add in ios/Podfile:
|
Replace this with your PodFile on IOS dir.
|
This issue has been fixed in Xcode 15-beta6. |
@CrazyFanFan I have Xcode Beta 6 and the issue is still present with the same error, the solution provided by @ZhangTonghai worked for us |
@giannigdev I apologize for any confusion. In addition to the original question, there is a discussion about another issue related to the new ld error in Xcode 15. The "fix" refers to addressing the problem with LD. As for the error with 'DT_TOOLCHAIN_DIR,' you can utilize some temporary workarounds mentioned above to bypass it. It might be a good idea to start a new thread specifically dedicated to discussing the Xcode15(LD)'s problem. |
This issue still present in Xcode 15 beta6. `rkr@AY-LP-RKR iOS_App % pod install Analyzing dependencies [!] Specifying multiple /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/podfile/dsl.rb:974:in |
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
the same issue happens on xcode 15 release version. this is the working solution. thank you very much @ZhangTonghai. |
It worked for me. But have this error "Error (Xcode): SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target" |
Hi. I see a lot of workarounds for a Podfile here. As a Pod author I want to ask if there is a workaround for the |
I am using the following post install hook which also works on the newest Xcode
|
@nekrich As a pod author you can add |
Still facing this issue, anyone help `Error (Xcode): type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block type Parse Issue (Xcode): Could not build module 'WebKit' Parse Issue (Xcode): Could not build module 'WebKit' |
@reysagar update flutter_inappwebview plugin to version 5.8.0 It's fixed now: pichillilorenzo/flutter_inappwebview#1790 |
@Afur version 5.8.0 didn't work for me either, Still thank you.
Flutter 3.13.1 • channel stable • https://github.com/flutter/flutter.git |
I am using
and I got error again but my error is cuz of network image cache and update pubspec.yaml by this line I am using
instead of
and my app run perfectly |
It helped to solve this problem. Thanks @ZhangTonghai |
Thanks @ZhangTonghai. |
Thanks this worked! Saved me a crazy amount of time, no doubt. Using CocoaPods 1.13 and XCode 15 this bug is still there as of Oct 2023. |
Error message without fix: DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead Source for the fix: CocoaPods/CocoaPods#12012
Yeah issue is happening with 15.0.1, above post install worked. |
I was facing same issue but I updated my Cocoapods to |
I am using 'Sonoma' OS and Xcode 15.0.1. I updated pod to 1.14.3, but the problem still occurs. |
This is what I did and it's worked for me Whenever you update the XCode, you need to update Cocoapods brew upgrade cocoapods clean the the installed packages using the command “flutter clean” and install again saving pubspec.yaml file. then on the project folder redirect to the ios folder and install pods again pod install That's it. My Xcode version: |
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 <gspencergoog@users.noreply.github.com>
is work for me |
Report
What did you do?
Build with Xcode15-beta5 after
pod install
What did you expect to happen?
Build success.
What happened instead?
Xcode report error:
CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
Foo.zip
The text was updated successfully, but these errors were encountered: