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

Library not found after update React Native 0.62 #28483

Closed
ilya-raevskiy opened this issue Apr 1, 2020 · 34 comments
Closed

Library not found after update React Native 0.62 #28483

ilya-raevskiy opened this issue Apr 1, 2020 · 34 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Resolution: Locked This issue was locked by the bot. Type: Upgrade Issue Issues reported from upgrade issue form

Comments

@ilya-raevskiy
Copy link

Library not found after update React Native 0.62

ld: warning: directory not found for option '-L-L/Users/raevskiy/Library/Developer/Xcode/DerivedData/App-dcmmftlmkqpjgghaeoecsjji/Build/Products/Release-iphonesimulator/BVLinearGradient'
ld: library not found for -lBVLinearGradient
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Снимок экрана 2020-04-02 в 00 33 41

React Native version:

System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 183.48 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.11.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.9.1 - /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: Not Found
  IDEs:
    Android Studio: Not Found
    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
@matids
Copy link

matids commented Apr 2, 2020

Same here. It's not related to BVLinearGradient, after deleting the dependency from the project it failed with Base64.

directory not found for option '-L-L/Users/ME/Library/Developer/Xcode/DerivedData/PROJECT-cmusevsphwkwubcskyhaoktwmrir/Build/Products/Debug-iphoneos/Base64'
ld: library not found for -lBase64

But if I go to the directory that's on the error message

ls /Users/ME/Library/Developer/Xcode/DerivedData/PROJECT-cmusevsphwkwubcskyhaoktwmrir/Build/Products/Debug-iphoneos/Base64
libBase64.a

As you can see the library is there...

Things I've tried:

rm -rf node_modules
yarn install
cd ios && pod deintegrate && pod install

React Native version:

System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 413.32 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.9.2 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /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: Not Found
  IDEs:
    Android Studio: 3.0 AI-171.4443003
    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

@tido64 tido64 added Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Apr 3, 2020
@github-actions
Copy link

github-actions bot commented Apr 3, 2020

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

@snairsumith
Copy link

Any updates regarding this issue.I have same issue
Screen Shot 2020-04-07 at 4 03 28 PM
.

@hoanganhx86
Copy link

hoanganhx86 commented Apr 8, 2020

I faced the same issue and fixed it by open Xcode and change the Library Search Paths to
Screen Shot 2020-04-08 at 15 53 51
without the quote sign

@hanjjang18
Copy link

hanjjang18 commented Apr 13, 2020

@hoanganhx86
I chage Library Search Paths but still not working.

@Mokto
Copy link

Mokto commented Apr 13, 2020

It solved the issue for me.

Thanks @hoanganhx86

@snairsumith
Copy link

I solved the issue by changing the build system from
File-> Workspace Settings -> Build System -> "New Build System"

@hoanganhx86
Copy link

@hoanganhx86
I chage Library Search Paths but still not working.

Can you share your error screen?

@hanjjang18
Copy link

hanjjang18 commented Apr 14, 2020

@hoanganhx86
I chage Library Search Paths but still not working.

Can you share your error screen?

I solved the issue

change the Library Search Paths and change build system from Legacy to New Build System

Thank you @hoanganhx86 @snairsumith

@pjay79
Copy link

pjay79 commented Apr 22, 2020

Same issue for me, tried all the above and not working.

library not found for -lBase64

System:
    OS: macOS 10.15.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 5.37 GB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.2 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 16, 21, 22, 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.2
      System Images: android-22 | Google APIs Intel x86 Atom, android-25 | Google APIs ARM 64 v8a, android-25 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: 20.0.5594570
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 11.2.1/11B53 - /usr/bin/xcodebuild
  npmPackages:
    react: ~16.9.0 => 16.9.0
    react-native: ~0.61.5 => 0.61.5
  npmGlobalPackages:
    create-react-native-app: 1.0.0
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2
    react-native-git-upgrade: 0.2.7

@Rapig1915
Copy link

I am running on MacOS 10.14 Mojave.
Working with React Native 0.62.
Changing build system from Legacy to New worked for me.
Thanks for a Great article!

@ColtraneNadler
Copy link

Ilya, were you able to resolve this?

I am running into the same issue. Although- I had started with React native 0.62, and everything was working smoothly until I installed a new package, and then I got this error.

@ghost
Copy link

ghost commented May 17, 2020

https://medium.com/@punjabicoder/react-native-version-0-62-e7414c2b2d35
here is the solution guys.

@TheMrugraj
Copy link

TheMrugraj commented May 22, 2020

Already have proper Library Search Path but, still the same issue.

@fabOnReact
Copy link
Contributor

follow the instructions at https://github.com/react-native-community/react-native-linear-gradient

remove that library. My opinion is this issue should be closed.

  1. You are not using latest react-native version
  2. The issue is connected to an external library https://github.com/react-native-community/react-native-linear-gradient
  3. The issue is connected to the user troubleshooting his update process and belongs to stackoverflow
  4. There is no reproducible example

Please close. Thanks

@ghost
Copy link

ghost commented May 23, 2020

Already have proper Library Search Path but, still the same issue

have you checked in both target as well as in project

@jpriesten
Copy link

Thank you @hoanganhx86
It worked for me

@aemc
Copy link

aemc commented Jun 13, 2020

I get something similar with Library not found for -lRNFirebase

I'm on RN 0.59.10 and this only starting failing when I upgraded rn-firebase from v5 to v6

Podfile:

# Uncomment the next line to define a global platform for your project

platform :ios, '10.3'

target 'Mobile' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  rn_path = "../node_modules/react-native"

  # Pods for Mobile

  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga"
  pod 'React', path: rn_path

  pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
  pod 'RNFBDatabase', :path => '../node_modules/@react-native-firebase/database'
  pod 'RNFBAuth', :path => '../node_modules/@react-native-firebase/auth'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == "React"
        target.remove_from_project
      end
    end
  end
end

ld: warning: directory not found for option '-L/Users/user/Library/Developer/Xcode/DerivedData/Mobile-ffdrrqgiyphlinerkjxrqqqeocrs/Build/Intermediates.noindex/ArchiveIntermediates/Mobile/BuildProductsPath/Release-iphoneos/React'

image

@trflagg
Copy link

trflagg commented Jul 3, 2020

For anyone here whose error string includes directory not found for option '-L-L/Users/.... (particularly notice the -L-L).

The solution is to move $(inherited) to the bottom of your Library Search Paths: react-native-community/upgrade-support#36 (comment)

The reason this is happening is because the inherited ends up blank, so the compile command is inserting an extra blank argument before the first actual link argument, so -L -L/Users/.... turns into -L-L/Users/... which fails.

@CodeShiva87
Copy link

CodeShiva87 commented Jul 27, 2020

I'm getting this error "Library not found for -lRNAdMobManager" for the iOS version in xcode after installing React Native Firebase @react-native-firebase/app and @react-native-firebase/admob in React Native 0.62.2. Can anyone help please?
It's working fine in Android.

@Biplovkumar
Copy link

I solved the issue by changing the build system from
File-> Workspace Settings -> Build System -> "New Build System"

I Used this and also removed .ttf files which has came from link vector icons in copy bundle resources tab.

@safaiyeh safaiyeh added the Type: Upgrade Issue Issues reported from upgrade issue form label Sep 17, 2020
@github-actions
Copy link

Do you need help upgrading to a newer React Native version? Visit the Upgrade Support repository or use the upgrade helper to see the changes that need to be made to upgrade your app.

@Iman-Jamali
Copy link

I faced the same issue and fixed it by open Xcode and change the Library Search Paths to
Screen Shot 2020-04-08 at 15 53 51
without the quote sign

This plus a Clean Build Folder worked for me. Thanks

@MANTENN
Copy link

MANTENN commented Jan 14, 2021

I checked the path and the file is there but its not being loaded for some reason with the same error:

ld: library not found for -lCocoaAsyncSocket
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ls of that directory

CocoaAsyncSocket         RCTTypeSafety            React-cxxreact
DoubleConversion         React-Core               React-jsi
FBReactNativeSpec        React-CoreModules        React-jsiexecutor
Flipper                  React-RCTAnimation       React-jsinspector
Flipper-DoubleConversion React-RCTBlob            ReactCommon
Flipper-Folly            React-RCTImage           Yoga
Flipper-Glog             React-RCTLinking         YogaKit
Flipper-PeerTalk         React-RCTNetwork         glog
Flipper-RSocket          React-RCTSettings        libPods-myprojectname.a
FlipperKit               React-RCTText            myprojectname.app
Folly                    React-RCTVibration
➜  Debug-iphonesimulator 

Also CocoaASync is the first library that is loaded and fails.

@MANTENN
Copy link

MANTENN commented Jan 14, 2021

I checked the path and the file is there but its not being loaded for some reason with the same error:

ld: library not found for -lCocoaAsyncSocket
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ls of that directory

CocoaAsyncSocket         RCTTypeSafety            React-cxxreact
DoubleConversion         React-Core               React-jsi
FBReactNativeSpec        React-CoreModules        React-jsiexecutor
Flipper                  React-RCTAnimation       React-jsinspector
Flipper-DoubleConversion React-RCTBlob            ReactCommon
Flipper-Folly            React-RCTImage           Yoga
Flipper-Glog             React-RCTLinking         YogaKit
Flipper-PeerTalk         React-RCTNetwork         glog
Flipper-RSocket          React-RCTSettings        libPods-myprojectname.a
FlipperKit               React-RCTText            myprojectname.app
Folly                    React-RCTVibration
➜  Debug-iphonesimulator 

Also CocoaASync is the first library that is loaded and fails.

Make sure you do not copy the quotes. Bad IDE.

I get a dif error now.

Ld /Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/myprojectname.app/myprojectname normal (in target 'myprojectname' from project 'myprojectname')
    cd /Users/mntn/Documents/Projects/github.com/mantenn/xx/packages/mobile/ios
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/DoubleConversion -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Flipper -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Flipper-DoubleConversion -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Flipper-Folly -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Flipper-Glog -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Flipper-PeerTalk -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Flipper-RSocket -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/FlipperKit -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Folly -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/RCTTypeSafety -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-Core -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-CoreModules -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTAnimation -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTBlob -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTImage -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTLinking -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTNetwork -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTSettings -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTText -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-RCTVibration -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-cxxreact -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-jsi -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-jsiexecutor -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/React-jsinspector -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/ReactCommon -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/Yoga -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/YogaKit -L/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/glog -L/Users/mntn/Documents/Projects/github.com/mantenn/xx/packages/mobile/ios/Pods/CocoaLibEvent/lib -L/Users/mntn/Documents/Projects/github.com/mantenn/xx/packages/mobile/ios/Pods/OpenSSL-Universal/ios/lib -F/Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator -filelist /Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Intermediates.noindex/myprojectname.build/Debug-iphonesimulator/myprojectname.build/Objects-normal/x86_64/myprojectname.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -object_path_lto -Xlinker /Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Intermediates.noindex/myprojectname.build/Debug-iphonesimulator/myprojectname.build/Objects-normal/x86_64/myprojectname_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lCocoaAsyncSocket -lDoubleConversion -lFBReactNativeSpec -lFlipper -lFlipper-DoubleConversion -lFlipper-Folly -lFlipper-Glog -lFlipper-PeerTalk -lFlipper-RSocket -lFlipperKit -lFolly -lRCTTypeSafety -lReact-Core -lReact-CoreModules -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReactCommon -lYoga -lYogaKit -lcrypto -levent -levent_core -levent_extra -levent_pthreads -lglog -lssl -lstdc++ -framework AudioToolbox -framework CFNetwork -framework JavaScriptCore -framework MobileCoreServices -framework Security -framework UIKit -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Intermediates.noindex/myprojectname.build/Debug-iphonesimulator/myprojectname.build/myprojectname.app-Simulated.xcent -lCocoaAsyncSocket -lDoubleConversion -lFBReactNativeSpec -lFlipper-DoubleConversion -lFlipper-Folly -lFlipper-Glog -lFlipper-PeerTalk -lFlipper-RSocket -lFlipper -lFlipperKit -lFolly -lglog -lPods-myprojectname-tvOS -lPods-myprojectname-tvOSTests -lPods-myprojectname -lRCTTypeSafety -lReact-Core -lReact-CoreModules -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReactCommon -lYoga -lYogaKit -framework JavaScriptCore -Xlinker -dependency_info -Xlinker /Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Intermediates.noindex/myprojectname.build/Debug-iphonesimulator/myprojectname.build/Objects-normal/x86_64/myprojectname_dependency_info.dat -o /Users/mntn/Library/Developer/Xcode/DerivedData/myprojectname-fbrcxmvzztlnetdktjisjynozoti/Build/Products/Debug-iphonesimulator/myprojectname.app/myprojectname

Still failing on Linking Libraries.

@sramezani
Copy link

I faced the same issue for react-native-viewpager and fixed it:

Screenshot 2021-02-09 at 11 (1)

You need to check Library Search Paths for package you faced issue. If you din't find in the list you need click on + button and add your package:
e.g.

${PODS_CONFIGURATION_BUILD_DIR}/react-native-viewpager

@zubko
Copy link
Contributor

zubko commented Mar 18, 2021

For my case, updating the Xcode project to recommended settings helped to fix the issue that libraries were not found for the Release build because for some reason the CocoaPods didn't compile before the main target.

These steps are mentioned here:
react-native-community/upgrade-support#13

@aleBiriri
Copy link

In my case i did the following:

  1. Remove quotes from Library Search Path (like this)
  2. Set New Build System (like this)
  3. Change Target version to 11.00 (like this)

Environment setup:
React Native 0.64.0
XCode 12.04

@rcwestlake
Copy link

@hoanganhx86 I know it's been awhile since you answered this but I'm running into this same issue and can't figure it out. I've tried everything. But I'm still getting ld: warning: directory not found for option '-L/Users/ryanwestlake/Library/Developer/Xcode/DerivedData/Challenger-dvoioiexlfqgfxcqfbzkapcvenyp/Build/Products/Debug-iphonesimulator/AppAuth' and ld: library not found for -lAppAuth

System:
    OS: macOS 11.2.3
    CPU: (8) arm64 Apple M1
    Memory: 877.66 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.1.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /opt/homebrew/bin/yarn
    npm: 7.11.2 - /opt/homebrew/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 12.5/12E262 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: ~0.63.4 => 0.63.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

The interesting thing is that a member of my team can run the same project in their XCode and it builds properly.

This is the Library Search Paths (tried with and without quotes) for the project:
image

And for the Library Search Paths for the target:
image

@fachrighiffary
Copy link

Any updates regarding this issue.I have same issue
Screen Shot 2020-04-07 at 4 03 28 PM
.

did you solve this problem?,, ive got this proble too

@abhikking
Copy link

abhikking commented Jul 20, 2021

Any updates regarding this issue.I have same issue
Screen Shot 2020-04-07 at 4 03 28 PM
.

@fachrighiffary and @snairsumith did you resolved your problem? I have the same issue

@elencho
Copy link

elencho commented Jul 26, 2021

For anyone here whose error string includes directory not found for option '-L-L/Users/.... (particularly notice the -L-L).

The solution is to move $(inherited) to the bottom of your Library Search Paths: react-native-community/upgrade-support#36 (comment)

The reason this is happening is because the inherited ends up blank, so the compile command is inserting an extra blank argument before the first actual link argument, so -L -L/Users/.... turns into -L-L/Users/... which fails.

Bro I don't know how to thanks, I spent 4 days working on it, Thank you very much

@rush86999
Copy link

rush86999 commented Aug 9, 2021

Still having the same issue if anybody solves it.

ld: warning: directory not found for option '-L<Multiple'
ld: warning: directory not found for option '-Lvalues>'
ld: library not found for -lCocoaAsyncSocket

@ilkerceng
Copy link

I faced the same issue and fixed it by open Xcode and change the Library Search Paths to
Screen Shot 2020-04-08 at 15 53 51
without the quote sign

Also changing target version to 11 fixed. Thanks

@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Resolution: Locked This issue was locked by the bot. Type: Upgrade Issue Issues reported from upgrade issue form
Projects
None yet
Development

No branches or pull requests