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

IOS library not found for -lDoubleConversion #25804

Closed
KiranreddySrDev opened this issue Jul 24, 2019 · 62 comments
Closed

IOS library not found for -lDoubleConversion #25804

KiranreddySrDev opened this issue Jul 24, 2019 · 62 comments
Labels
Bug Needs: Author Feedback Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@KiranreddySrDev
Copy link

"react": "16.8.6",
react-native: 0.60.4,
"react-native-webview": "^5.12.1"

Steps To Reproduce

  1. I have created a new project and it has only one package that is react-native-webview
  2. When I build in the IOS emulator then I got some with the Xcode.
  3. I got to link the webview also even it's not working I have tried many time still got the same issue

Screenshot 2019-07-24 at 3 31 53 PM

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Jul 24, 2019
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Jul 24, 2019
@KiranreddySrDev
Copy link
Author

Yes. I mentioned what I got just error with IOS but Android is working fine. Why I don't know.
My Xcode 10.2.
Just let me what Can I do?

@Dellybro
Copy link

Dellybro commented Jul 26, 2019

So i was having this issue too. If you are updating from 0.59 to 0.60, ensure that you have deleted your Pods and reinstalled.

cd ios
rm -rf Pods
pod install

@gunnartorfis
Copy link

I had tried literally everything suggested by the awesome community.

The solution for me was to create an empty Swift file through Xcode and let Xcode create a Bridging-header.h file. The key was to not delete the Swift file after Xcode creating the bridging header file.

@paruckerr
Copy link

Same issue here, react-native run-ios works fine, when I try on simulator or device => Library not found for -lDoubleConversion =/

@paruckerr
Copy link

the problem was open and build project in wrong place...

=> open ios/{Project}.xcodeproj instead => open ios/{Project}.xcworkspace

@KiranreddySrDev
Copy link
Author

I did the same thing but still, I am getting the same error. I have tried with 0.59 again then it was working fine.
If I create new a project run on Xcode I was getting the same iBundile error.

@slavikdenis
Copy link

Can you try this please? #25820 (comment)

@pmadruga
Copy link

pmadruga commented Aug 1, 2019

Have the same problem, tried #25820 (comment) but still nothing.

Also working fine with 0.59.

@lzm0x219
Copy link

lzm0x219 commented Aug 7, 2019

I also encountered this problem.

@jimhill
Copy link

jimhill commented Aug 9, 2019

This is a problem that I have been trying to work out all day too.

@pmadruga
Copy link

pmadruga commented Aug 9, 2019

I had this problem and manage to solve it somehow, but ran into a different problem right after and forgot how I solve this one in the first place. So please apologize if this doesn't work for you. To give a bit of context, I was coming from version 0.59 and was trying to upgrade to 0.60.4

I'll leave first what I think it's the main cause of the problem followed by other steps that hopefully will help you.

What I think the problem is
When upgrading, I had a lot of leftovers from previous RN versions, regarding linked binaries. But because RN 0.60 handles everything with pods, now my linked binaries look link this instead:

Screenshot 2019-08-09 at 23 01 45

Steps I took to overcome this problem
Again, this is if my memory is correct. And please branch out before you try this so that you don't screw your existing setup.

  1. Check the differences from versions.
    I've used https://react-native-community.github.io/rn-diff-purge/ to check and implement any changes between versions

  2. Cleaned the linked libraries

  3. Ran a bash script with the following. You obviously can run this individually or any of the ones that make more sense to you.

echo 'remove cache'
rm -rf $TMPDIR/react-*
rm -rf $TMPDIR/metro-*
watchman watch-del-all
npm cache verify

# echo 'removing derived data'
rm -rf ~/Library/Developer/Xcode/DerivedData

echo 'removing pods and node modules'
cd ios
pod deintegrate
pod cache clean --all
cd ../

rm -rf ios/Pods 
rm -rf ios/Podfile.lock
rm -rf ios/build
rm -rf node_modules
rm -rf package-lock.json

echo 'cocoapods install'
gem install cocoapods

echo 'brew'
brew update && brew upgrade

echo 'installing node modules'
npm i 

# mostly for any legacy stuff
echo 'react-native link'
react-native link

echo 'installing pods'
cd ios 
pod update
pod install

Hope it helps.

@jimhill
Copy link

jimhill commented Aug 10, 2019

Thanks @pmadruga but frustratingly that didn't work. For reference, it's only when archiving that the issue occurs for me.

It's the same issue as #25788

@jimhill
Copy link

jimhill commented Aug 10, 2019

So when archiving, the error is due to not finding the folders (which appear to be the target support folders) e.g.

MYBUILD/BuildProductsPath/Release-iphoneos/DoubleConversion
MYBUILD/BuildProductsPath/Release-iphoneos/Folly etc

And when I go to look in the MYBUILD/BuildProductsPath/Release-iphoneos directory there are only files such as:

libReact.a,
libdouble-conversion.a etc.

--

Update - the fastest fix? to simply rebuild from scratch. Worked first time.

@raghav-mylagary
Copy link

the problem was open and build project in wrong place...

=> open ios/{Project}.xcodeproj instead => open ios/{Project}.xcworkspace

use this command to open the workspace
cd ios && xed .

@jimhill
Copy link

jimhill commented Aug 12, 2019

Just to point out that my issue was not related to forgetting to open the workspace. Before upgrading I was already using cocoapods. I now have a fully working version so will diff the configs to see what I can uncover.

@webMasterMrBin
Copy link

still not found when pod install
RN: 0.60.0

@diamont1001
Copy link

I got the same issue.

react-native run-ios and react-native run-android works fine,
but got error in Xcode => library not found for -lDoubleConversion

Any solution here?

@diamont1001
Copy link

the problem was open and build project in wrong place...

=> open ios/{Project}.xcodeproj instead => open ios/{Project}.xcworkspace

It works.

Step 1: quit Xcode completely
Step 2: open ios/{Project}.xcworkspace (PS: not ios/{Project}.xcodeproj)

Cheers!

@the-habu
Copy link

the problem was open and build project in wrong place...
=> open ios/{Project}.xcodeproj instead => open ios/{Project}.xcworkspace

It works.

Step 1: quit Xcode completely
Step 2: open ios/{Project}.xcworkspace (PS: not ios/{Project}.xcodeproj)

Cheers!

Can you do a release build? Mine fails as soon as I use a release scheme. 😞 Debug works fine for me too...

@diamont1001
Copy link

@geekazoid-at

Yes, it works for me at debug/release/archive mode.

@ldco2016
Copy link

ldco2016 commented Sep 5, 2019

@paruckerr , that worked for me, but then I ran Archive and that succeeded, but no Organizer opened for me to export to generate .ipa.

I was able to locate the directory it got stored in here:
~/Library/Developer/Xcode/Archives/<date>/ProjectName <date>.xcarchive, but when I do an ls there is nothing in there:

➜  NFIBEngage 9-5-19, 2.43 PM.xcarchive ls
➜  NFIBEngage 9-5-19, 2.43 PM.xcarchive

@Ebeldev
Copy link

Ebeldev commented Sep 26, 2019

I do get this bug of -lDoubleConversion library not found.

react-native-cli: 2.0.1
react-native: 0.60.5

When I do a clean react-native init, then try to build it I do get this error.

@diamont1001
Copy link

@Ebeldev Make sure the project file you open is xxx. xcworkspace (not xxx. xcodeproj)

@Ebeldev
Copy link

Ebeldev commented Oct 1, 2019

@diamont1001 If I build it with xcworkspace: I get this error : error: Build input file cannot be found: '/Users/etiennebelanger/Documents/apps/react-native-apps/InfosLaurentides/node_modules/react-native/ReactCommon/yoga/yoga/YGMarker.cpp'

@henrymoulton
Copy link
Contributor

Experiencing this issue too when initialising adding Cocoapods to an old React Native project, 0.59.10.

@henrymoulton
Copy link
Contributor

@jimhill sounds like you had a good experience migrating everything.

@buddhikajay
Copy link

Hi All,

I'm also facing the same issue. Even if I create a new RN project from scratch, it cannot be archived. Development build works fine. Any proper solution ?

@buddhikajay
Copy link

buddhikajay commented Nov 14, 2019

This worked for me

cd ios
pod deintegrate
pod install
pod update
cd ..
rm -rf node_modules
npm install

@nathantaal
Copy link

@nathantaal make sure your Xcode build settings look alright:

  • Link Binary With Libraries:
    should have your libPods-projectName.a
  • Target Dependencies should have React listed
Screen Shot 2019-11-07 at 6 05 43 AM
  • And finally make sure your Library search paths look right, you should be able to see the DoubleConversion library name in the paths:
Screen Shot 2019-11-07 at 6 07 49 AM

You might be on to something here, but I wonder how to add React as a dependency since the .xworkspace file is removed since react-native 0.60?
+

@nathantaal
Copy link

nathantaal commented Nov 18, 2019

For everyone the solution is different. For me, none of all worked. Because of React 0.60, React shouldn't be a Target dependency. The only thing I had to do was opening the xcodeworkspace and setting the recommended settings to my pods. Now I can archive apps like I always could.

Edit: 3 days later and I'm unable to reproduce this as a solution, after a fresh pod install and allowing the recommended settings I'm unable to archive the build.

@spohner
Copy link

spohner commented Dec 3, 2019

Had this exact error when archiving. Degrading the ios target platform in the Podfile from 11.0 to 9.0 solved it for us. Had raised this previous when including a third-party library which did not support version 9.0. Remember to run 'pod deintegrate' and remove Podfile.lock before 'pod install' after changing this parameter. Took a long time to figure this out.

@emmanuele-villa
Copy link

I also have this issue with react native 0.61, but only when building from command line..
Opening the xcodeworkspace and building or archiving the app works good, but calling xcodebuild form the terminal result in the same error

@JakeHadley
Copy link

I'm getting the same as @emmanuele-villa. I get an error <projectName>Tests.m:11:9: fatal error: 'React/RCTLog.h' file not found, and other times I get this library not found error. I tried adding React to the product -> manage schemes -> project area, but react is not listed.

@tapz
Copy link

tapz commented Dec 18, 2019

I'm getting this:

ld: warning: directory not found for option '-L/Users/tapani/DerivedData/xx-hgcsjkjqxpxmxzhfzfhrxyutqfml/Build/Products/Debug-iphoneos/Folly'
ld: warning: directory not found for option '-L/Users/tapani/DerivedData/xx-hgcsjkjqxpxmxzhfzfhrxyutqfml/Build/Products/Debug-iphoneos/React-Core'
ld: warning: directory not found for option '-L/Users/tapani/DerivedData/xx-hgcsjkjqxpxmxzhfzfhrxyutqfml/Build/Products/Debug-iphoneos/React-cxxreact'
ld: warning: directory not found for option '-L/Users/tapani/DerivedData/xx-hgcsjkjqxpxmxzhfzfhrxyutqfml/Build/Products/Debug-iphoneos/React-jsi'
ld: warning: directory not found for option '-L/Users/tapani/DerivedData/xx-hgcsjkjqxpxmxzhfzfhrxyutqfml/Build/Products/Debug-iphoneos/React-jsiexecutor'
ld: warning: directory not found for option '-L/Users/tapani/DerivedData/xx-hgcsjkjqxpxmxzhfzfhrxyutqfml/Build/Products/Debug-iphoneos/ReactCommon'
ld: library not found for -lFolly
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@tapz
Copy link

tapz commented Dec 18, 2019

The problem is that some of the pods are not built and have no files in DerivedData.

What is different in these pods compared to the others?
Folly
React-Core
React-cxxreact
React-jsi
React-jsiexecutor

I created a new RN app and it does not have this build error.

@tapz
Copy link

tapz commented Dec 18, 2019

The newly created RN project includes the libraries/frameworks differently. For example the JavaScriptCore framework. It only has it under the Frameworks folder not in Link Binary With Libraries. This is really confusing, as I have used to adding libraries to the Build phases and they are automatically added to the frameworks. How does RN create the initial project to end up to this kind of project structure and how is it possible that this even works when the JavaScriptCore is not in the linked libraries?

Screenshot 2019-12-18 at 18 58 04

Screenshot 2019-12-18 at 18 58 00

@tapz
Copy link

tapz commented Dec 19, 2019

Fixed the issue by commenting out use_modular_headers! and adding use_frameworks! This is because my project contains Swift files.

I also removed HEADER_SEARCH_PATHS and LIBRARY_SEARCH_PATHS lines from the Xcode project file.

@Billmike
Copy link

Billmike commented Jan 2, 2020

I spent the last five days stuck on this, trying out everything suggested on the internet. This is what finally worked for me. (Before proceeding, make sure
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' is included in your podfiles

1. Delete Podfile.lock
2. cd ios
3. pod deintegrate
4. pod install
5. cd ..
6. rm -rf node_modules && yarn
7. Add use_frameworks! to your Podfile

Run react-native-run-ios or Build with Xcode by opening the xcworkspace file in your ios directory. Hope this helps someone!

@hramos hramos added Needs: Author Feedback Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. and removed Resolution: Needs More Information labels Jan 18, 2020
@hramos hramos closed this as completed Jan 21, 2020
@Desintegrator
Copy link

same, none of solutions worked for me

@betko
Copy link

betko commented Feb 25, 2020

I had the same problem. When I used the react-native run-ios command everything worked fine, but if I passed the --configuration Release I received the same error message. After a few hours I realised that the platform version in the Podfile was 11.0 but in the Xcode Project was 9.0.

After I corrected the version mismatch everything work fine.

@redexp
Copy link

redexp commented May 20, 2020

My solution was also sync target ios version in Podfile platform :ios, '11.0' and in Xcode General > Deployment Info > Target > iOS > 11.0 than close Xcode and run in cli cd ios && pod deintegrate && rm Podfile.lock && pod install

@Mitdd9707
Copy link

Mitdd9707 commented Jul 27, 2020

I get this bug of -lDoubleConversion library not found.
please help! @react-native-bot

I had tried literally everything suggested by the awesome community.

react-native :- 0.62.2
react:- 16.11.0

Screenshot 2020-07-27 at 11 37 39 PM

@fukit0
Copy link

fukit0 commented Oct 8, 2020

By changing platform :ios, '11.0' to '10.0' is worked for me

@FaisalKhawaj
Copy link

I was facing the same issue while running the project.
What I was doing is I was running Project.xcodeproj, :P
When i chose workspace , this was working fine for me .

1 similar comment
@FaisalKhawaj
Copy link

I was facing the same issue while running the project.
What I was doing is I was running Project.xcodeproj, :P
When i chose workspace , this was working fine for me .

@saykharng
Copy link

I had the same problem. When I used the react-native run-ios command everything worked fine, but if I passed the --configuration Release I received the same error message. After a few hours I realised that the platform version in the Podfile was 11.0 but in the Xcode Project was 9.0.

After I corrected the version mismatch everything work fine.

Saved a lot of time for me. Thank you 👍

@mppvgithub
Copy link

Have the same problem, tried #25820 (comment) but still nothing.

Also working fine with 0.59.

Have got the solution?

@facebook facebook locked as resolved and limited conversation to collaborators Oct 6, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Needs: Author Feedback Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests