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

clang: error: linker command failed with exit code 1 #2

Open
davidplappert opened this issue Oct 5, 2017 · 5 comments
Open

clang: error: linker command failed with exit code 1 #2

davidplappert opened this issue Oct 5, 2017 · 5 comments
Assignees

Comments

@davidplappert
Copy link

davidplappert commented Oct 5, 2017

cordova build ios produced this after following your steps with the sample app. Searching Google didn't help. Any clues?

cd /Users/davidplappert/Websites/app/cordova-plugin-aws-user-pool/Sample/awsUserPoolPluginSample/platforms/ios
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/davidplappert/.nvm/versions/node/v6.11.3/bin:~/.rbenv/shims:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin:/Users/davidplappert/Qt/5.5/clang_64/bin/:/Users/davidplappert/.terraform_0.6.16:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS"
    /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/iPhoneSimulator11.0.sdk -L/Users/davidplappert/Websites/app/cordova-plugin-aws-user-pool/Sample/awsUserPoolPluginSample/platforms/ios/build/emulator -L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSAPIGateway -L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSCognito -L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSCognitoIdentityProvider -L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSCore -L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSLambda -F/Users/davidplappert/Websites/app/cordova-plugin-aws-user-pool/Sample/awsUserPoolPluginSample/platforms/ios/build/emulator -filelist /Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Intermediates.noindex/awsUserPoolPluginSample.build/Debug-iphonesimulator/awsUserPoolPluginSample.build/Objects-normal/x86_64/awsUserPoolPluginSample.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Intermediates.noindex/awsUserPoolPluginSample.build/Debug-iphonesimulator/awsUserPoolPluginSample.build/Objects-normal/x86_64/awsUserPoolPluginSample_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -ObjC -lAWSAPIGateway -lAWSCognito -lAWSCognitoIdentityProvider -lAWSCore -lAWSLambda -lsqlite3 -lz -framework Foundation -framework SystemConfiguration -framework UIKit -ObjC -lAWSAPIGateway -lAWSCognito -lAWSCognitoIdentityProvider -lAWSCore -lAWSLambda -lsqlite3 -lz -framework Foundation -framework SystemConfiguration -framework UIKit -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Intermediates.noindex/awsUserPoolPluginSample.build/Debug-iphonesimulator/awsUserPoolPluginSample.build/awsUserPoolPluginSample.app.xcent /Users/davidplappert/Websites/app/cordova-plugin-aws-user-pool/Sample/awsUserPoolPluginSample/platforms/ios/build/emulator/libCordova.a -weak_framework SystemConfiguration -Xlinker -dependency_info -Xlinker /Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Intermediates.noindex/awsUserPoolPluginSample.build/Debug-iphonesimulator/awsUserPoolPluginSample.build/Objects-normal/x86_64/awsUserPoolPluginSample_dependency_info.dat -o /Users/davidplappert/Websites/app/cordova-plugin-aws-user-pool/Sample/awsUserPoolPluginSample/platforms/ios/build/emulator/awsUserPoolPluginSample.app/awsUserPoolPluginSample
ld: warning: directory not found for option '-L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSAPIGateway'
ld: warning: directory not found for option '-L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSCognito'
ld: warning: directory not found for option '-L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSCognitoIdentityProvider'
ld: warning: directory not found for option '-L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSCore'
ld: warning: directory not found for option '-L/Users/davidplappert/Library/Developer/Xcode/DerivedData/awsUserPoolPluginSample-eiwhpveylqadgnblkvgfuqemqhjn/Build/Products/Debug-iphonesimulator/AWSLambda'
ld: library not found for -lAWSAPIGateway
clang: error: linker command failed with exit code 1 (use -v to see invocation)```
@davidplappert
Copy link
Author

I have a feeling it has to do with the bottom part of your read me.

Framework Versions

Where should these lines be put? I can't find them in the sample app. Thanks in advance!

@happygts happygts self-assigned this Oct 7, 2017
@happygts
Copy link
Owner

Hi,

Sorry for taking so long to respond.
You can try to delete the plugin :
cordova plugin remove cordova-plugin-aws-user-pool
and add it again :
cordova plugin add cordova-plugin-aws-user-pool

The framework versions are just an indication they are already available inside the plugin.

If it didn't work can you tell me what you did while trying to test the sample ?

Let me know if it helped.

@814k31 814k31 mentioned this issue Dec 14, 2017
@happygts
Copy link
Owner

814k31, did you try to test with the sample ?
Everything works find on my side.

@814k31
Copy link

814k31 commented Jan 31, 2018

Sorry for the delay
@moreaup I've received the same issue with the sample

I followed the sample readme with

CognitoIdentityUserPoolId: 'XXXXXXXXXXXX',
CognitoIdentityUserPoolAppClientId: 'XXXXXXXXXX,
CognitoIdentityUserPoolAppClientSecret: null,
CognitoArnIdentityPoolId: null,

Cordova version: 6.5.0
Xcode Version 9.2

@814k31
Copy link

814k31 commented Feb 9, 2018

solution:

Install cocoapods
Go to ios platform project file cd <project location>/platforms/ios/
Run pods install
Use the .xcworkspace open <project>.xcworkspace
Run like normal

It will not work with the .xcodeproj

Sorry if this was obvious guys. I'm pretty new to how xcode and ios works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants