react-native: Library not found after update React Native 0.62

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 22
  • Comments: 34 (2 by maintainers)

Most upvoted comments

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

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

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

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: https://github.com/react-native-community/upgrade-support/issues/36#issuecomment-611516268

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.

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

:warning: Missing Reproducible Example
:information_source: 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.

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!

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

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: https://github.com/react-native-community/upgrade-support/issues/13

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

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.