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

Created on 1 Apr 2020  路  23Comments  路  Source: facebook/react-native

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
Author Feedback Repro Upgrade Issue

Most helpful comment

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

All 23 comments

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
: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.

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

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

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

It solved the issue for me.

Thanks @hoanganhx86

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

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

Can you share your error screen?

@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 Legacyto New Build System

Thank you @hoanganhx86 @snairsumith

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

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!

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.

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

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

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

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

have you checked in both target as well as in project

Thank you @hoanganhx86
It worked for me

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

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'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.

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlongster picture jlongster  路  3Comments

janmonschke picture janmonschke  路  3Comments

DreySkee picture DreySkee  路  3Comments

aniss picture aniss  路  3Comments

josev55 picture josev55  路  3Comments