简体   繁体   中英

Lipo error for release build config for OS X and iOS project with swift

I have a project (Flappy Thing) which has iOS (Flappy-Thing-iOS) and OS X (Flappy-Thing-OSX) targets using entirely swift (no obj-c). I am using Xcode 6.1.1. When I run the app on my mac or the simulator it compiles and runs fine without any errors. But when I try and profile the app (which I think uses the release build config rather than debug), I get a bunch of errors:

When I profile on iOS (on the simulator):

1.

Lipo error
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: 
can't open input file: 
/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Intermediates/Flappy Thing.build/Release-iphonesimulator/Flappy-Thing-iOS.build/Objects-normal/i386/Flappy-Thing-iOS (No such file or directory)

2.

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 
failed with exit code 1

3.

Command /usr/bin/ditto failed with exit code 1

4.

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

5.

Dsymutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release-iphonesimulator/Flappy-Thing-iOS.app/Flappy-Thing-iOS'

And when I profile for OS X:

1.

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

2.

Command /usr/bin/ditto failed with exit code 1

3.

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

4.

Dysmutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release/Flappy-Thing-OSX.app/Contents/MacOS/Flappy-Thing-OSX'

I have read other solutions for Lipo errors such as setting build active architecture only to yes for release config. But none of them have worked

Can someone please explain what these errors mean, what is causing them and how to fix them.

Thanks in advance :]

Edit: these are the current architecture build settings:

iOS target: 架构构建设置iOS

OS X target: 体系结构构建设置OS X.

Edit 2: I have only run and profiled the iOS target on the simulator. The OS X target also gets these errors (but not the lipo one) when I profile it (but it builds fine normally)

Maybe because you profile the simulator (which is i386) while valid archs are arm only in your build settings (thus, no i386 obj files available to link and run).

When you profile for MAC, you automatically build for i386.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM