Description
When building a project using SDK from branch 4_0_X, I regularly see errors such as below, I am unsure as to the actual root cause of these errors but I believe I have narrowed it down to the SDK as during my investigation it appeared the CLI had no effect.
TRACE] : Undefined symbols for architecture armv7:
[TRACE] : "_WTFCrash", referenced from:
[TRACE] : TiDebuggerInterface::resetObjectProperty(int, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) in libti_ios_debugger.a(TiDebuggerInterface.o)
[TRACE] : (maybe you meant: _WTFCrashWithSecurityImplication, _Ti_WTFCrash )
[TRACE] : ld: symbol(s) not found for architecture armv7
[TRACE] : clang: error: linker command failed with exit code 1 (use -v to see invocation)
[TRACE] : Ld build/Testy2.0.build/Debug-iphoneos/Testy2.0-universal.build/Objects-normal/arm64/Testy2.0 normal arm64
[TRACE] : cd /Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone
[TRACE] : export IPHONEOS_DEPLOYMENT_TARGET=7.0
[TRACE] : export PATH="/Applications/Xcode6.1.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode6.1.1.app/Contents/Developer/usr/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/eharris/Library/android-sdk-macosx/tools:/Users/eharris/Library/android-sdk-macosx/platform-tools"
[TRACE] : /Applications/Xcode6.1.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode6.1.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/build/Debug-iphoneos -L/Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/lib -L/Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/Classes/APSAnalytics -L/Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/Classes/APSHTTPClient -F/Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/build/Debug-iphoneos -filelist /Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/build/Testy2.0.build/Debug-iphoneos/Testy2.0-universal.build/Objects-normal/arm64/Testy2.0.LinkFileList -dead_strip -ObjC -weak_framework iAd -fobjc-link-runtime -stdlib=libc++ -miphoneos-version-min=7.0 -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/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/build/Testy2.0.build/Debug-iphoneos/Testy2.0-universal.build/Objects-normal/arm64/Testy2.0_dependency_info.dat -o /Users/eharris/Documents/Appcelerator_Studio_Workspace/Testy2.0/build/iphone/build/Testy2.0.build/Debug-iphoneos/Testy2.0-universal.build/Objects-normal/arm64/Testy2.0
[TRACE] : Undefined symbols for architecture arm64:
[TRACE] : "_WTFCrash", referenced from:
[TRACE] : TiDebuggerInterface::resetObjectProperty(int, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) in libti_ios_debugger.a(TiDebuggerInterface.o)
[TRACE] : (maybe you meant: _WTFCrashWithSecurityImplication, _Ti_WTFCrash )
[TRACE] : ld: symbol(s) not found for architecture arm64
[TRACE] : clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/Testy2.0.build/Debug-iphoneos/Testy2.0-universal.build/Objects-normal/armv7/Testy2.0 normal armv7
[ERROR] : Ld build/Testy2.0.build/Debug-iphoneos/Testy2.0-universal.build/Objects-normal/arm64/Testy2.0 normal arm64
[ERROR] : (2 failures)
Steps to reproduce
1. Create a project using SDK 3.5.1.GA
2. Build the project using ti build -p ios
3. Change the SDK in the tiapp.xml and run ti sdk select and choose the latest 4_0_X SDK
4. Run ti build -p ios again
Actual result
2. The build will pass
4. The build will fail with errors such as the one listed above
Expected result
The build should pass both times
[~eharris] [~emerriman] * Does it fail if you clean before rebuilding? * When is the first SDK that fails with this error? * Does it fail on Android as well?
If you delete the _build_ folder and re-build, it will build fine.
[~ingo] * If I clean the project then rebuilding works fine * I have downloaded the earliest SDK from the 4_0_X branch (4.0.0.v20150227132702) and this occurs using that build * Building for Android I see no issues
PR : https://github.com/appcelerator/titanium_mobile/pull/6739 4_0_X : https://github.com/appcelerator/titanium_mobile/pull/6740
Verified fix on: Mac OSX 10.10.2 Titanium SDK build: 4.0.0.v20150323131014 Titanium CLI, build: 4.0.0-alpha Alloy: 1.6.0-alpha Xcode 6.2 iPhone 6 (8.2) When changing the SDK the project is now rebuilt and the errors are no longer seen. Closing ticket.