directory not found for option '-L-L/.../CocoaAsyncSocket'
See original GitHub issueEnvironment
System:
OS: macOS 10.15.2
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 66.96 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 13.3.0 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.13.2 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-27 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
*react-native*: Not Found
Upgrading version
0.61.5 => 0.62
Description
After following the upgrade helper and this issue for the iOS project file, I get stuck with the following build error:
ld: warning: directory not found for option '-L-L/Users/../ios/build/Release-iphonesimulator/CocoaAsyncSocket'
ld: library not found for -lCocoaAsyncSocket
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I suspect something is wrong in my Search Paths, but I am not yet able to figured it out.
Reproducible demo
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
React-Native: Apple Mach-O Linker Error, Directory not found ...
1 Answer 1 · then delete your Podfile.lock · inside the ios folder in terminal run pod install · go back to the...
Read more >directory not found for option '-F… | Apple Developer Forums
Hi all,. I have just been testing out one of my applications on XCode 7 Beta 1. I've made a couple of observations...
Read more >framework not found CocoaAsyncSocket - Google Groups
Sergio Cruz. Solved the issue adding $(inherited) to FrameWork search paths and header search paths in app target.
Read more >Error On Deploy App To Xcode - Directory Not Found For Option
ld: warning: directory not found for option 'LL/Users/./ios/build/Releaseiphonesimulator/CocoaAsyncSocket' ld: library not found for lCocoaAsyncSocket.
Read more >React Native IOS build failed, linker command failed with exit ...
ld: warning: directory not found for option '-L-L/Users/ahyanawaz/ ... /Debug-iphonesimulator/CocoaAsyncSocket' ld: library not found for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I followed the same steps as you and I also got the errormessage ‘ld: library not found for -lCocoaAsyncSocket’ when compiling in xcode. But after a lot trying I discovered my problem.
I problem was with the LIBRARY_SEARCH_PATHS, see also: step 4. I compared my project with a new RN project and I saw that the $(inherited) was at the top at the new project, so reversed the order and then it worked.
Thank you for sharing, @aaroncornelissen! For me, it was the same variable, just for Target instead of Project.
Apparently you need to ensure the LIBRARY_SEARCH_PATHS has $(inherited) set last on both React Native Project and Target level in Build settings. Otherwise, it seems the relative search paths for each pod will not be searched and only inherited is used. I don’t have an explanation for this, as I don’t know how XCode treats the linking phase.