FaISalBLiNK
FaISalBLiNK

Reputation: 711

Apple Match-O Linker Error / clang: error: no such file or directory - Xcode 11

I am working on a React Native application and whenever I try to build the application I am encountering these errors. I know there are many similar questions on this matter but the solutions given there are not working for me.

clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTRestart.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libReactNativePermissions.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNCPushNotificationIOS.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNReanimated.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNGestureHandler.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNMixpanel.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNCAsyncStorage.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTAnimation.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNVectorIcons.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNReactNativeDocViewer.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNFS.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libCodePush.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNDocumentPicker.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNImagePicker.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNI18n.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNBlur.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libART.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTVideo.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTImage.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTLinking.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTNetwork.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTSettings.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTText.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTVibration.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNSpinkit.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNSentry.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNGeocoder.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTContacts.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNOpenAppSettings.a'

I have searched but I am still stuck here. I have tried linking using react-native link. I have tried deleting the DerivedData folder for the application. Hence I have tried everything but can't seem to find a solution for this. So I turned to you guys please suggest any solution to fix this. Looking forward to your answers. Thank you in advance.

Upvotes: 1

Views: 2851

Answers (3)

Rajender Kumar
Rajender Kumar

Reputation: 1377

Can you go through following steps:

Delete node_modules
Delete package-lock.json
Delete ios/Pods directory
Delete Podfile.lock file 

Then run following commands one by one from your terminal.

cd root/project directory
npm install 
cd ios/ && pod install && cd ..

Then try to build your app

react-native run-ios

Upvotes: 0

sebastianf182
sebastianf182

Reputation: 9978

I have seen that you upgraded from 0.48 to 0.59. That is a lot of versions and a lot of breaking changes to jump to.

My suggestion, create a new, clean 0.59.10 project and then slowly move all your code and dependencies to the new one. There are so many things to try and check. Probably your header search paths are wrong or outdated.

Perhaps a dependency does not support your RN version anymore. Or maybe you have a missing library in the linked-libraries list.

To be honest, too many things to try. Just do a new project, from scratch, and start adding your dependencies one by one.

Upvotes: 1

Murilo Paixão
Murilo Paixão

Reputation: 646

If you're using cocoapods, which is very likely the case given the recent versions of rn, try the following:

  1. Enter the ios folder.
$ cd ios
  1. If you don't have cocoapods installed, try running:
$ gem install cocoapods # Try with `sudo` if it doesn't work.

You may also consider locking the cocoapods version for your project, read more here.

  1. Run pod install.
  2. Then make sure to open the file with the .xcworkspace extension.

Finally, try building again.

Upvotes: 1

Related Questions