Titanium JIRA Archive
Appcelerator Community (AC)

[AC-378] Library "does not contain bitcode" error when building to iOS 9 device with Titanium SDK < 5.0.0

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2015-11-14T00:58:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI, Studio, Titanium SDK & CLI
Labelsn/a
ReporterTerry Morgan
AssigneeShak Hossain
Created2015-09-23T13:40:29.000+0000
Updated2015-11-14T00:58:48.000+0000

Description

Attempting to build any project to my iPhone 6+ running iOS 9 other any Ti SDK 5.0.0.GA results in the following linker error:
[TRACE] ld: '/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/lib/libti_ios_profiler.a(TiProfilerDiscovery.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
[TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[TRACE] Ld build/test.build/Debug-iphoneos/test-universal.build/Objects-normal/armv7/test normal armv7
[TRACE]     cd /Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone
[TRACE]     export IPHONEOS_DEPLOYMENT_TARGET=7.0
[TRACE]     export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/terrymorgan/.nvm/v0.10.38/bin:/usr/local/opt/rbenv/shims:/usr/local/heroku/bin:/usr/local/opt/rbenv/shims:/usr/local/opt/rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/terrymorgan/.rbenv/shims:/Users/terrymorgan/.rbenv/bin:~/bin:/usr/local/bin:/usr/local/sbin:/Users/terrymorgan/pear/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/npm/bin:/Users/terrymorgan/bin:/Users/terrymorgan/Library/Android/sdk/platform-tools:/Users/terrymorgan/Library/Android/sdk/tools:/Users/terrymorgan/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:/Users/terrymorgan/Development/adt-bundle-mac-x86_64-20140321/sdk/tools:/Users/terrymorgan/Development/adt-bundle-mac-x86_64-20140321/eclipse:/usr/local/opt/go/libexec/bin"
[TRACE]     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/build/Debug-iphoneos -L/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/lib -L/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/Classes/APSAnalytics -L/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/Classes/APSHTTPClient -F/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/build/Debug-iphoneos -filelist /Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/build/test.build/Debug-iphoneos/test-universal.build/Objects-normal/armv7/test.LinkFileList -miphoneos-version-min=7.0 -dead_strip -fembed-bitcode -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/build/Debug-iphoneos -ObjC -weak_framework iAd -fobjc-link-runtime -stdlib=libc++ -lti_ios_profiler -framework CoreMedia -weak_framework CoreMotion -lAPSAnalytics -weak_framework CoreText -framework EventKit -framework EventKitUI -weak_framework Security -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -weak_framework MapKit -framework MessageUI -framework MobileCoreServices -lti_ios_debugger -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -lAPSHTTPClient -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lTiCore -ltiverify -licucore -Xlinker -dependency_info -Xlinker /Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/build/test.build/Debug-iphoneos/test-universal.build/Objects-normal/armv7/test_dependency_info.dat -o /Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/build/test.build/Debug-iphoneos/test-universal.build/Objects-normal/armv7/test
[TRACE] ld: '/Users/terrymorgan/Documents/Titanium_Studio_Workspace/test/build/iphone/lib/libti_ios_profiler.a(TiProfilerDiscovery.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
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR]         Ld build/test.build/Debug-iphoneos/test-universal.build/Objects-normal/arm64/test normal arm64
[ERROR] (1 failure)
I have tried the following Ti SDK versions, all with the same result: * 3.5.1.GA * 4.0.0.GA * 4.1.1.GA I see the same error from both the CLI & studio and I also see the same error for both brand new & existing projects.

Comments

  1. Ingo Muschenetz 2015-09-28

    This is unfortunately expected. Xcode 7 turns on bitcode by default if there is not an explicit setting for turning it off. Since SDKs prior to 5.0.0 have no knowledge of bitcode, they don't know how to turn it off. The current workaround is, after you build using Xcode 7, you can open the Xcode 7 project that was created and set the 'enable bitcode' to NO. It is possible you could edit the default template in earlier SDKs to add this setting manually: https://github.com/appcelerator/titanium_mobile/blob/5_0_X/iphone/iphone/Titanium.xcodeproj/project.pbxproj#L2733

JSON Source