[TIMOB-14492] iOS: clang: error: linker command failed with exit code 1
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | Release 3.1.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | supportTeam |
Reporter | Betty Tran |
Assignee | Chris Barber |
Created | 2013-07-04T13:20:07.000+0000 |
Updated | 2018-02-18T20:38:44.000+0000 |
Description
When building a project to run on the iOS Simulator, it fails with the following error:
[TRACE] : ld: truncated fat file. Slice from 68 to 84873484 is past end of file with length 53090291 for architecture i386
[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/Debug-iphonesimulator/test6.app/test6 normal i386
[ERROR] : (1 failure)
Note that the customer is able to build their Android projects with no problems.
The full log files are attached as follows:
- log1: log from building via Titanium Studio
- log2: log from build via the CLI
- log3: The result of running titanium info
I will also be attaching the Studio diagnostic file shortly.
The customer started getting this error after creating a new user on his mac and doing a clean install of Titanium Studio and all its updates.
Attachments
File | Date | Size |
---|---|---|
AlloyTest.zip | 2017-07-20T01:03:48.000+0000 | 8051110 |
ClassicTest.zip | 2017-07-20T01:03:49.000+0000 | 5637073 |
diagnostics | 2013-07-04T13:46:26.000+0000 | 8182 |
log1 | 2013-07-04T13:20:07.000+0000 | 253146 |
log2 | 2013-07-04T13:20:07.000+0000 | 1323097 |
log3 | 2013-07-04T13:20:07.000+0000 | 12502 |
Tried cleaning the project and building again with no success.
[~ingo] I'm not sure if this is a CLI or an IOS SDK issue. I found one ticket with similar error in TISTUD-723, but cleaning the project didn't help for this customer.
[~cbarber] Any thoughts?
it is important to note that this problem started when we added a user to the same mac, meaning, the first user could build fine, then we added a second user and installed the SDKs, then we got into some trouble. the first one was it was referring to the global /Library/Application Support/Titanium... for the SDKs, once I changed Titanium to Titanium-old, it referred to the user version and started building, but then we got this problem. I wouldn't be surprised if this turns out to be a permission issues, but I dont know where to look.
Hmm, this is an interesting error. For starters, thank you for the great logs! This could very well be a permission issue, a corrupt iOS SDK install, or a corrupt Xcode install. Once upon a time I had a corrupt iOS SDK and was getting really funky errors. I would remove /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk, then go into Xcode > Preferences > Downloads and reinstall the iOS SDK. Then try again to clean and build your project. If you still have problems, I would consider reinstalling Xcode again.
Resolving as cannot reproduce since we've not seen this happen and it sounds like it's a permission issue.
Closing ticket as I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80
I'm able to reproduce this issue with the attached projects: - AlloyTest.zip - ClassicTest.zip *Steps to reproduce:*
Build attached project "AlloyTest" or "ClassicTest" for iOS.
Note that the 1st build will succeed.
If you're using Appcelerator Studio, change the contents of 1 of the files. (This is to trigger another build.)
Attempt to do another build for iOS.
*Result:* The build will fail with the following message in the log...Note that all subsequent iOS builds will fail with the above message. *Reason:* This error will happen if a subdirectory has the same name as the iOS app bundle. Also, the subdirectory must contain at least 1 file (cannot be empty) to trigger this issue or else it won't be included in the build. For the attached "ClassicTest" project, it's because it contains the following folder name... - ./Resources/ClassicTest For the attached "AlloyTest" project, it's because it contains the following folder name... - ./app/lib/AlloyTest *Work-Around:* Rename the app bundle to a name not matching a subdirectory name in the "tiapp.xml" file.