I am taking my iPhone app code from SVN and then trying to build it via Jenkins. Xcode version 7.3.1
But I am getting the following error -
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Release-iphoneos/xxxxxxx.app/xxxxxxx normal armv7
(1 failure)
Build step 'Xcode' marked build as failure
Finished: FAILURE
I have already spent days to resolve this and would appreciate if some one can help me. Let me know if more details are needed.
Thanks.
Related
I am trying to build(release) my ionic 3 apps for iOS. I was able to do it earlier without any problem but all of a sudden I started to get below errors
/Users/akash/Desktop/sourcecode /platforms/ios/Xpym/Plugins/cordova-plugin-ionic-webview/CDVWKWebViewEngine.h:21:9: fatal error: 'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/akash/Library/Developer/Xcode/DerivedData/Xpym-bvfukasejehwgkcvbzmyfdzldbzg/Build/Intermediates.noindex/Xpym.build/Release-iphonesimulator/Xpym.build/Objects-normal/x86_64/IONAssetHandler.o
/Users/akash/Desktop/sourcecode\
/platforms/ios/Xpym/Plugins/cordova-plugin-ionic-webview/IONAssetHandler.m
normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure) xcodebuild: Command failed with exit code 65
I have tried removing node_modules folder and reinstalling them, reinstalling ios platform but I am now continuously getting this error.
But when I build it without --release, the build is successful.
Receiving the following error when doing a
tns run -v ios
(mac is running High Sierra and xcode is current, certificates are in place, etc). any assistance would be greatly appreciated. Here the error:
`Building project...
Xcode build...
=== BUILD TARGET HelloWorld OF PROJECT HelloWorld WITH CONFIGURATION Debug ===
ld: framework not found FileProvider for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: framework not found FileProvider for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
=== BUILD TARGET HelloWorld OF PROJECT HelloWorld WITH CONFIGURATION Debug ===
error: the following command failed with exit code 1 but produced no further output
Ld build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/x86_64/HelloWorld normal x86_64
** BUILD FAILED **
Unable to apply changes on device: B71912B9-B650-4EBF-AB43-3383136CB95F. Error is: Command xcodebuild failed with exit code 65.
Executing after-watch hook from /Users/XXX/temp/NATIVE/HelloWorld/hooks/after-watch/nativescript-dev-webpack.js`
run tns build ios --clean --log trace first ,if the log trace is related to some plugin, use whose latest version in the package.json file , run npm install, than run tns build ios --clean --log trace again.
if it not work, run tns prepare ios --release and open {app-name}/platforms/ios/{app-name}.xcworkspace file with xcode , try run it, xcode will tell you where is the problem.
When attempting to build using ionic run ios -lc I am seeing the following error in terminal:
** BUILD FAILED **
The following build commands failed:
Ld build/emulator/xXxXxXx.app/xXxXxXx normal i386
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/cordova/build-debug.xcconfig,-project,xXxXxXx.xcodeproj,ARCHS=i386,-target,xXxXxXx,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/build/sharedpch
Error: /Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
When attempting to build the same app in xCode I am seeing the error linker command failed with exit code 1 (use -v to see invocation)
I've removed and added the ios platform
I've updated ios-deploy
I've updated ios-sim
I've restarted Xcode
I've restarted my machine Xcode is up to date
I can build other projects successfully
The Xcode error linker command failed with exit code 1 (use -v to see invocation) led me to this stack overflow answer
The second answer there suggests a check for multiple / duplicate .m files in the Xcode project Compile Resources:
That can happen if the same .m file is referenced multiple times in your target's "Compile Sources" section in "Build Phases". Remove duplicate entries and you should be fine.
So I had a check in Xcode and there was indeed a duplicate call to a plugin resource.
After checking package.json I found the same plugin was referenced in two ways (with two paths).
Removing one of the two plugins resolved the issue.
I found the solution on github
the solution for me was open the .xcworkspace file insted of .xcodeproj located inside my '/platforms/ios' folder.
https://github.com/phonegap/phonegap-plugin-push/issues/1240
the solution for my case was simply
cd platforms/ios
then:
pod install
I have a project (Flappy Thing) which has iOS (Flappy-Thing-iOS) and OS X (Flappy-Thing-OSX) targets using entirely swift (no obj-c). I am using Xcode 6.1.1. When I run the app on my mac or the simulator it compiles and runs fine without any errors. But when I try and profile the app (which I think uses the release build config rather than debug), I get a bunch of errors:
When I profile on iOS (on the simulator):
1.
Lipo error
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:
can't open input file:
/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Intermediates/Flappy Thing.build/Release-iphonesimulator/Flappy-Thing-iOS.build/Objects-normal/i386/Flappy-Thing-iOS (No such file or directory)
2.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
failed with exit code 1
3.
Command /usr/bin/ditto failed with exit code 1
4.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
5.
Dsymutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release-iphonesimulator/Flappy-Thing-iOS.app/Flappy-Thing-iOS'
And when I profile for OS X:
1.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
2.
Command /usr/bin/ditto failed with exit code 1
3.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
4.
Dysmutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release/Flappy-Thing-OSX.app/Contents/MacOS/Flappy-Thing-OSX'
I have read other solutions for Lipo errors such as setting build active architecture only to yes for release config. But none of them have worked
Can someone please explain what these errors mean, what is causing them and how to fix them.
Thanks in advance :]
Edit: these are the current architecture build settings:
iOS target:
OS X target:
Edit 2:
I have only run and profiled the iOS target on the simulator. The OS X target also gets these errors (but not the lipo one) when I profile it (but it builds fine normally)
Maybe because you profile the simulator (which is i386) while valid archs are arm only in your build settings (thus, no i386 obj files available to link and run).
When you profile for MAC, you automatically build for i386.
I'm following the tutorial recommended on the Frank-Cucumber website (http://blog.thepete.net/blog/2012/06/24/writing-your-first-frank-test/), but once executing frank build, the build fails saying:
The following build commands failed:
Ld Frank/frankified_build/2012\ Olympics.app/2012\ Olympics normal i386
(1 failure)
This clang error is present around the previous ld call:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using XCode 4.6.3, I have the command line tools installed, and I'm running the example application taken from GitHub.
What could be wrong? Any ideas?
Seems like using sudo frank build --arch armv7s fixes it.