Ld: truncated fat file

I found this error when trying to run an XCODE application that uses the NinevehGL framework:

ld: truncated fat file. Slice from 1478656 to 2279616 is past end of file with length 2270604 file './NinevehGL.framework/NinevehGL' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I really don’t know what the problem is and how to solve such an error. I did not find any documentation handling this problem.

+4
source share
4 answers

Try to make the following changes to your project: -

  • Include all necessary frameworks in the link phase
  • Remove -all_loadfrom other linker flags.
  • Empty the build folder and compile it from scratch.

, , SDK iOS Xcode. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulatorXXX.sdk, Xcode > > SDK iOS. . , Xcode.

xcode.

+2

:

ld: truncated fat file. Slice from 1067056 to 2127456 is past end of file with length 770048 file '/Users/jenkins-slave-pepper/workspace/iosbuild/App/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID' for architecture armv7

, - .

rm -rf ~/Library/Caches/CocoaPods
rm -rf `pwd`/Pods/
pod update
+2

:

ld: truncated fat file. Slice from *** to *** is past end of file with length *** file '***' for architecture armv7

.

EDIT:

. , . , xCode SourceTree .

+1

git? , .gitattributes, *. A (/ ) .

"" Wiki, , git "" .

...

#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
+1

Source: https://habr.com/ru/post/1652577/


All Articles