3

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: architecture build settings iOS

OS X target: architecture build settings 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)

  • Could you add screen shots proving that your architecture build settings for these two targets make sense? – matt Feb 17 '15 at 17:57

1 Answers1

0

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.

Bogdan V.
  • 719
  • 4
  • 7
  • Thank you but I also get errors when I profile on mac (see Edit 2) –  Feb 18 '15 at 19:47
  • What is the complete "Dsymutil: error: unable to open executable " message for mac target? – Bogdan V. Feb 18 '15 at 20:54
  • I have added the errors for OS X as well as for iOS –  Feb 19 '15 at 08:03
  • You need more control over the build process. Try xcodebuild command line tool. Details here (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html ) or use man xcodebuild. Build the project and you'll get more information. – Bogdan V. Feb 19 '15 at 10:07