kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

Shell Script Invocation Error #42

Open DeweyOx opened 12 years ago

DeweyOx commented 12 years ago

When building a Fake framework (XCode 4.2), we get:

ls: /Users/[user]/Library/Developer/Xcode/DerivedData/[project]-guaoggrgxmcnjlaokdcyoyfgvlmb/Build/Products/Debug-iphoneos/[project].framework/Headers: No such file or directory

Even through the directory (symbolic) is there and has all the headers

And then "Build task claims to succeed in spite of generating error messages"

Is there an easy fox for this or can it be safely ignored.

kstenerud commented 12 years ago

Does your framework have any headers in the "public" section of the "copy headers" build phase? The script portion tries to copy the public headers to build the final framework but will complain if the headers dir wasn't there (which would happen if no headers were declared public).

DeweyOx commented 12 years ago

Thanks for the prompt response.

Yes, there are > 100 public headers in the project, but no private ones.

The headers have only been linked to the project, not copied - the "Copy items into destination group's folder (if needed)" is not checked when adding them. Could this be the reasons?

I also noticed that there is a "setenv USE_HEADER_SYMLINKS NO" in the error log.

thanks!

kstenerud commented 12 years ago

It shouldn't matter, so long as the headers are included in the "copy headers" phase. For example: http://i.imgur.com/Wj9kW.png

DeweyOx commented 12 years ago

Hmmm. I think this was just a strange Xcode thing. I added a dylib reference, then removed it, and the error went away. Bizarre.

pho0 commented 12 years ago

I'm now getting this with Version 4.3.1 (4E1019) but only when building for hardware ... building for the simulator works great:

Shell Script Invocation Error Command /bin/sh failed with exit code 65

The tail of the build logs show this:

=== BUILD NATIVE TARGET Uber OF PROJECT Uber WITH CONFIGURATION Debug === Check dependencies No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7).

\ BUILD FAILED **

The following build commands failed: Check dependencies (1 failure) Command /bin/sh failed with exit code 65

pho0 commented 12 years ago

ok, the issue here was I needed to add i386 to the valid architectures to get past the "Build other platforms" part of the framework build scripts. That in of itself isn't a huge deal but it seems to appear randomly in projects I have that use iOS-Universal-Framework.

Riekr commented 12 years ago

i have a project that uses 5 frameworks made by me in the same workspace and let's says the project compiles 1 in 20 trials today. On another machine i can compile at the 1st trial but the frameworks are not compiled before my project since the frameworks projects are not in the workspace. It seems that adding more frameworks scrumbles up xcode compiler depenencies. Hope it helps and for a fix soon :)

PS: for the framework projects giving you errors try to uncheck "Parallelize Build" in the build schema