react-native-maps icon indicating copy to clipboard operation
react-native-maps copied to clipboard

Apple Mach-O Linker failure

Open DennisSnijder opened this issue 10 years ago • 10 comments

When installing the React Native map module after running the pod install, and following the steps i get the following error while building in xcode

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

besides this it also gives me a warning that a directory has not been found /Build/Products/Debug-iphonesimulator/React

DennisSnijder avatar Nov 04 '16 09:11 DennisSnijder

Never mind, got this fixed by linking it manually

DennisSnijder avatar Nov 04 '16 10:11 DennisSnijder

@DennisSnijder : How did you link manually, I am facing the same error.

rjain15 avatar Nov 13 '16 03:11 rjain15

@rjain15 https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md#option-3-manually try this, also try to use rnpm instead of npm and do the "rnpm link", saves you some work.

DennisSnijder avatar Nov 13 '16 16:11 DennisSnijder

Hi Dennis,

It still didn't work, I started with a fresh project --- like a Hello World and followed the steps.

Ld /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/first.app/first normal x86_64 cd /Users/rjain/code/react-native-samples/first/ios export IPHONEOS_DEPLOYMENT_TARGET=8.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -L/Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator -F/Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator -F/Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/React -F/Users/rjain/code/react-native-samples/first/ios/Pods/GoogleMaps/Subspecs/Base/Frameworks -F/Users/rjain/code/react-native-samples/first/ios/Pods/GoogleMaps/Subspecs/Maps/Frameworks -filelist /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Intermediates/first.build/Debug-iphonesimulator/first.build/Objects-normal/x86_64/first.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Intermediates/first.build/Debug-iphonesimulator/first.build/Objects-normal/x86_64/first_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lc++ -lz -framework Accelerate -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework GLKit -framework GoogleMaps -framework GoogleMapsBase -framework GoogleMapsCore -framework ImageIO -framework OpenGLES -framework QuartzCore -framework React -framework SystemConfiguration -framework UIKit -ObjC -lc++ /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libReact.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lAirMaps -framework Pods_first -Xlinker -dependency_info -Xlinker /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Intermediates/first.build/Debug-iphonesimulator/first.build/Objects-normal/x86_64/first_dependency_info.dat -o /Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/first.app/first ld: warning: directory not found for option '-F/Users/rjain/Library/Developer/Xcode/DerivedData/first-giisolpkkzrrqedkjvilwcfpgzqi/Build/Products/Debug-iphonesimulator/React' ld: framework not found React clang: error: linker command failed with exit code 1 (use -v to see invocation)

rjain15 avatar Nov 20 '16 03:11 rjain15

I have the same issue in using pod. Manually linking is not working for google maps

@Vinu-MysteriousTechVision did you find a solution?

vinceprofeta avatar Jan 15 '17 21:01 vinceprofeta

@rjain15 I have the same error,have you deal with it?

qq326646683 avatar Jan 18 '17 06:01 qq326646683

@vinceprofeta solved the issue for me . Given bellow procedure that i followed to solve the issue.

  1. create fresh project
  2. install react-native-maps (and importend that i haven't link the project)
  3. Option 2: CocoaPods https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md pod install procedure used to link the project. this option is used for my project related.

note: if you getting the same error also do one think that clear the derived data, clean the project and build

I had a project where I had installed via CocoaPods where it worked on the iOS emulator, but then got this error when trying to build for the device. I tried making a test project and everything seemed to work fine after running the command react-native link react-native-maps in the test project. So I then proceeded to remove CocoaPods from my existing xcode project using this method. I also deleted the reference to AirMaps.xcodeproj from Libraries in the Xcode IDE and then re-ran react-native link react-native-maps. I then setup the signing and everything seemed to work after that.

evansiroky avatar Mar 16 '17 00:03 evansiroky

I deleted a folder of a test project in Project Navigator and Targets. It solved my problem.

asimolmez avatar Mar 28 '17 03:03 asimolmez