archiving in xcode 7.3.1 - xcode

i am trying to get my app on testflight for testing. however when following the instruction on this video https://www.youtube.com/watch?v=6tydk4Fc-tg&t=302s everything work up to trying to archive the app.
i get the below error and i'm not quite sure what to do. if you have any idea on how to solve this problem, please help. i'm using Xcode 7.3.1 and ivy 1.9.1.
ld: warning: directory not found for option
'-L/Users/nabi/Desktop/kivy-ios/break-ios/../build/lib'
ld: warning: directory not found for option
'-F/Users/nabi/Desktop/kivy-ios/dist/frameworks'
ld: '/Users/nabi/Desktop/kivy-ios/dist/lib/libfreetype.a(ftsystem.o)'
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Ld
/Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break
normal arm64
cd /Users/nabi/Desktop/kivy-ios/break-ios
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk
-L/Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/BuildProductsPath/Release-iphoneos
-L/Users/nabi/Desktop/kivy-ios/break-ios/../dist/lib -L/Users/nabi/Desktop/kivy-ios/break-ios/../build/lib -F/Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/BuildProductsPath/Release-iphoneos
-F/Users/nabi/Desktop/kivy-ios/dist/frameworks -filelist /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break.LinkFileList
-miphoneos-version-min=8.1 -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/BuildProductsPath/Release-iphoneos
-all_load -fobjc-link-runtime -framework AudioToolbox -framework ImageIO -framework MessageUI -framework UIKit -framework OpenGLES
-framework CoreMotion -framework MobileCoreServices -framework CoreGraphics -framework Accelerate -framework QuartzCore -lc++ -lz
-lsqlite3 -lbz2 -lfreetype -lsdl2_mixer -lsdl2 -lsdl2_image -lffi -lkivy -lpython -lios -lsdl2_ttf -Xlinker -dependency_info -Xlinker /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break_dependency_info.dat
-o /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break
ld: warning: directory not found for option
'-L/Users/nabi/Desktop/kivy-ios/break-ios/../build/lib' ld: warning:
directory not found for option
'-F/Users/nabi/Desktop/kivy-ios/dist/frameworks' ld:
'/Users/nabi/Desktop/kivy-ios/dist/lib/libfreetype.a(ftsystem.o)' does
not contain bitcode. You must rebuild it with bitcode enabled (Xcode
setting ENABLE_BITCODE), obtain an updated library from the vendor, or
disable bitcode for this target. for architecture arm64 clang: error:
linker command failed with exit code 1 (use -v to see invocation)

The error tells you clearly what to do. When you see the dialog that asks if you want to rebuild using bitcode, you must uncheck that option. If you are not even getting that far, use the build settings of your target to disable bitcode:
In that screen shot, you'd need to switch from Yes to No.

Related

Since Xcode 13.3, I'm seeing an error when compiling in Terminal with -flto

On macOS 12.3 I am working on a patch to build HandBrake with -flto. It then can be build in Terminal with ./configure --lto. This worked nicely with Xcode 13.2 and 13.2.1 installed. But since I have updated to Xcode 13.3 (compiler updated to Apple clang version 13.1.6 (clang-1316.0.21.2)) it fails with the following error:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -L/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot -L/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/libhb -L/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/contrib/lib -F/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot -filelist /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI_lto.o -filelist /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/macosx/osl.filelist.txt -lc++ -w -framework Foundation -liconv -lbz2 -lz -framework CoreMedia -framework CoreVideo -framework VideoToolbox -framework CoreGraphics -framework CoreText -lavfilter -framework AudioToolbox -framework CoreServices -framework IOKit -lopus -lhandbrake -lass -lavcodec -lavformat -lavutil -lbluray -ldav1d -ldvdnav -ldvdread -lspeex -lturbojpeg -lfreetype -lfribidi -lmp3lame -llzma -lpostproc -logg -lswscale -ltheora -lvorbis -lswresample -lvorbisenc -lvpx -lx264 -lxml2 -ljansson -lharfbuzz -lzimg -Xlinker -dependency_info -Xlinker /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI_dependency_info.dat -o /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI
ld: linking module flags 'override-stack-alignment': IDs have conflicting values in '/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/contrib/lib/libx264.a(base.o)' and 'ld-temp.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI normal (in target 'HandBrakeCLI' from project 'HandBrake')
(1 failure)
make: *** [macosx.build] Error 65
I've tried already to remove and compile the necessary toolchain (nasm, cmake...) with the same version of Xcode. I've reinstalled the CommandLineTools, I removed them completely. I've added flags -fno-stack-check and similar. Nothing helped. I have no idea what the reason of this is, I'm really lost right now. I also could not find anything in the Release Notes of Xcode 13.3.

Clang: error: linker command failed with exit code 1 (use -v to see invocation) in project

When I try to build my Xcode project this error comes up:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It is really frustrating because I cannot get rid of it. It shows up in my normal target and my test target. Please help.
The full error is below thanks.
Ld /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator/Dotcha!.app/Dotcha! normal i386
cd "/Users/callumbondy/Desktop/Desktop/Projects/Dotcha!"
export IPHONEOS_DEPLOYMENT_TARGET=8.2
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -L/Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator -L/Applications/Adobe\ Flash\ CC\ 2014/AIR13.0/lib/aot/stub -F/Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator -filelist /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Intermediates/Dotcha!.build/Debug-iphonesimulator/Dotcha!.build/Objects-normal/i386/Dotcha!.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Intermediates/Dotcha!.build/Debug-iphonesimulator/Dotcha!.build/Objects-normal/i386/Dotcha_.swiftmodule -mios-simulator-version-min=8.2 -framework StoreKit -framework iAd -framework GameKit -Xlinker -dependency_info -Xlinker /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Intermediates/Dotcha!.build/Debug-iphonesimulator/Dotcha!.build/Objects-normal/i386/Dotcha!_dependency_info.dat -o /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator/Dotcha!.app/Dotcha!
ld: warning: ignoring file /Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libSystem.dylib, file was built for armv7 which is not the architecture being linked (i386): /Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libSystem.dylib
ld: in '/Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libobjc.A.dylib', file was built for armv7 which is not the architecture being linked (i386): /Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libobjc.A.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The library libobjc.A.dylib that you are using don't have an i386 architecture slice. You probably is getting this error when running the app on simulator right?
Compile using a compatible version of your library or try to run on a real device to see if it resolves your problem.

Problems with Code from SVN

I have a problem with my iOS code when pulling it from the SVN. My code works fine on my MAC, but after I upload it to SVN and try to build my project it shows the same error over and over.
Apple Mach-O Linker (id) error
ld: library not found for -lzbar
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
This problem is pretty annoying and makes my work on the code very difficult. Here is the complete error:
Ld /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer normal i386
cd "/Users/administrator/Desktop/test/Trade-In 4S"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator "-L/Users/administrator/Desktop/test/Trade-In 4S" "-L/Users/administrator/Desktop/test/Trade-In 4S/Classes/ZBarSDK" "-L/Users/administrator/Desktop/test/Trade-In 4S/ZBarSDK" -F/Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator -filelist /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Intermediates/SmartDealer.build/Debug-iphonesimulator/SmartDealer.build/Objects-normal/i386/SmartDealer.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -lsqlite3 -framework QuartzCore -weak_framework CoreMedia -weak_framework CoreVideo -liconv -lzbar -weak_framework AVFoundation -o /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer
ld: library not found for -lzbar
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
Thanks for your help!
Are you sure that the 'ZBarSDK' folder was successfully included in SVN? It seems that you're trying to link to a framework in that folder, so you should either find a standardized location for the framework and install it on all development machines, or leave your project alone but make sure that the ZBarSDK folder is successfully added to your SVN repo along with your other source.
You can do this from the command line--just cd into your project folder and svn add ZBarSDK.

ld: library not found for -lFlurryWithLocation

I just check out an old project from SVN for my work and when I tried to build it, i got 6 errors.
I can't resolve 2 of 'em.
So the first one is about the Flurry library.
here is the error :
"I replaced the name of the app buy APPNAME"
Ld /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME normal i386
cd "/Users/MYNAME/Documents/Projects/APPFOLDER/APPNAME"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator -F/Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Intermediates/APPNAME.build/Debug-iphonesimulator/APPNAME.build/Objects-normal/i386/APPNAME.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30100 -framework Foundation -framework UIKit -framework CoreGraphics -lsqlite3.0 -framework AddressBook -framework AddressBookUI -framework CoreLocation -framework SystemConfiguration -framework QuartzCore -framework MessageUI -lFlurryWithLocation -o /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications/Xcode.app/Contents/Developer/Library/Frameworks'
ld: library not found for -lFlurryWithLocation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried to find a solution anywhere on the web but I don't...
Then, the next error is :
GenerateDSYMFile /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app.dSYM /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME
cd "/Users/MYNAME/Documents/Projects/APPFOLDER/APPNAME"
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/dsymutil /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME -o /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app.dSYM
error: unable to open executable '/Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME'
Can somebody help me please..?
I have no more idea..
Unless the SVN specifically included the libflurryanalytics.a library (which it probably didn't because svn sees .a files as binary files and ignores them).
Download and include the libFlurryAnalytics.a from their website and include it in your target. http://www.flurry.com/product/analytics/index.html
You can then add the file into SVN using:
svn add "libFlurryAnalytics.a" --no-ignore

Why do I get an Apple Mach-O Linker (ID) Error?

I know that this question had been asked many times, but every answer seems different. I have built my project and tried to run it, but I get this error:
Ld "/Users/******/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator/Cypher Bot.app/Cypher Bot" normal i386
cd "/Users/******/Xcode/iOS/Cypher Bot/Universal/Cypher Bot/Cypher Bot"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/********/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator -F/Users/**********/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator -filelist "/Users/*******/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Intermediates/Cypher Bot.build/Debug-iphonesimulator/Cypher Bot.build/Objects-normal/i386/Cypher Bot.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework Security -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o "/Users/********/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator/Cypher Bot.app/Cypher Bot"
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in CryptoMainViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I also get this right below the message above:
What does this mean? What do I do to fix it?
The error means that the linker can't find the class definition for MFMailComposeViewController. That class is defined in the MessageUI framework. Did you add the MessageUI framework to your target? If you don't know how to do that, read this: How to "add existing frameworks" in Xcode 4?

Resources