XCode 5.1 and building iOS broken?

Monkey Targets Forums/iOS/XCode 5.1 and building iOS broken?

Raph(Posted 2014) [#1]
I was updated to 5.1 just now, and now I cannot build for iOS. This is trying to compile bouncyaliens from the bananas folder, 77f:

Build settings from command line:
    SDKROOT = iphonesimulator7.1

=== BUILD TARGET MonkeyGame OF PROJECT MonkeyGame WITH CONFIGURATION Release ===

Check dependencies
No architectures to compile for (ARCHS=, VALID_ARCHS=i386 x86_64).

TRANS FAILED: Error executing 'xcodebuild -configuration Release -sdk iphonesimulator', return code=16640
** BUILD FAILED **


The following build commands failed:
	Check dependencies
(1 failure)
Done.



Anyone else having this issue? I did open up the template xcodeproj file, and it seems to be set to universal for the architectures...


Raph(Posted 2014) [#2]
Near as I can tell, this is because XCode 5.1 includes 64 bit in the default set of architectures.

See these Stack Overflow threads:
http://stackoverflow.com/questions/22328882/xcode-5-1-no-architectures-to-compile-for-only-active-arch-yes-active-arch-x
http://stackoverflow.com/questions/22330594/xcode-5-1-and-compiling-error-for-architecture-x86-64
http://stackoverflow.com/questions/22372264/ios-7-1-gives-error-after-updating-to-xcode-5-1

I tried opening the MonkeyGame.xcodeproj in the targets folder directly in XCode, and changing as the above threads suggest:

- Build Settings>Architectures>Architectures from $(ARCH_STANDARD) (armv7, armv7s, arm64) to just armv7 armv7s
- Build Settings>Architectures>Valid Architectures the same way

It got much farther in the compilation process, but still failed, this time with




dawlane(Posted 2014) [#3]
Try this
Delete the current build directory
Compile the Monkey project
Open the projects xcode project file
In the Xcode menu bar at the top of the screen select Editor->Validate Settings
Perform the changes.
Close Xcode and compile again via the Monkey IDE
If it works (it does on mine), then make the same changes to the Xcode project file in targets->iOS->template

You should do the same if the Desktop target has problems as well.


Raph(Posted 2014) [#4]
That did in fact work. So here is the full process, in full detail.

- Deleted existing bouncyaliens.build77f folder.

- Opened bouncyaliens.monkey in Ted.

- Hit build, and got this as expected

Build settings from command line:
    SDKROOT = iphonesimulator7.1

=== BUILD TARGET MonkeyGame OF PROJECT MonkeyGame WITH CONFIGURATION Release ===

Check dependencies
No architectures to compile for (ARCHS=, VALID_ARCHS=i386 x86_64).

TRANS FAILED: Error executing 'xcodebuild -configuration Release -sdk iphonesimulator', return code=16640
** BUILD FAILED **

The following build commands failed:
	Check dependencies
(1 failure)
Done.


- Closed Ted. Opened bouncyaliens.xcodeproj.

- Went to Editor>Validate Settings. It offered to change several things:
o Automatically Select Architectures
o Enable Build Architecture Only When Debugging
o Update to Latest Project Format

- I hit Perform Changes.

- Do NOT go change the architectures as suggested in my post above.

- Return to Ted, build again. Hopefully you get
** BUILD SUCCEEDED **


- If that works, then

- open targets/ios/template/MonkeyGame.xcodeproj

- Go to Editor>Validate Settings, and Perform Changes.

- Close XCode.

- Delete your bouncyaliens.build77f folder again.

- open bouncyaliens.monkey in Ted and compile it again.

- this time, it should work first try.

And it sounds like the next update needs to have an updated MonkeyGame.xcodeproj in the distribution.


zoqfotpik(Posted 2014) [#5]
I ran into the same problem today, the above fixed it.


benmc(Posted 2014) [#6]
I am also having this same issue, and doing the above worked a little, but if you include the AdMob module, it fails. First there's the undeclared gc_force_sweep undeclared error. Comment that out, and there are a number of linker errors.

It looks like the AdMob SDK may need to be updated? I'm going to see if I can do that manually, but I'm really unfamiliar with this.

EDIT:

I did get it to work finally by commenting out some things, updating the SDK, and adding some other Frameworks. I don't really know if I should go through what I did here - as it may not have been fully correct, but it's possible and will hopefully be fixed in a future release.

I'm using 77f


malick(Posted 2014) [#7]
I got the gc_force_sweep error when trying to compile the admob example. Commenting out that line in Xcode let it compile.