Build iPhone target failed after updating to Xcode 8
KenHuang0917 opened this issue · 13 comments
Operating system or device - Godot version:
macOS Sierra, Godot 2.1 stable, Xcode 8
Issue description (what happened, and what was expected):
After updating to Xcode 8, build iPhone target failed with the following message:
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7
ld: library not found for -lcrt1.3.1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [bin/godot.iphone.opt.arm] Error 1
scons: building terminated because of errors.
With Xcode 7, everything is just fine.
Going back to Xcode 7 by Time Machine, build OK as before!
Steps to reproduce:
Terminal build instruction is as the following:
Scons platform=iphone tools=no bits=64 target=release
Thanks for helping!
Thanks for helping but could you please show me how to "increase the minimum required version to 7.0"?
path: godot/platform/iphone/detect.py
replace with "-miphoneos-version-min=5.1.1" to "-miphoneos-version-min=7.0"
del "-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"
There is a suspicion that if you remove the "-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" is to increase the version of the possible and not necessary. In the evening, I check this nuance.
Thank you! It worked!
It worked for you, but not for all other Xcode 8 users ;)
Any solution?
Undefined symbols for architecture armv7:
"_CFHostCreateWithName", referenced from:
l6022 in GoogleMobileAds(flat-armv7)
"_CFHostStartInfoResolution", referenced from:
l6022 in GoogleMobileAds(flat-armv7)
"_CFHostGetAddressing", referenced from:
l6022 in GoogleMobileAds(flat-armv7)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The same error with XCode 8.2.1 (OSX El Capitan 10.11.6) Godot 2.1.2:
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7
ld: library not found for -lcrt1.3.1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [bin/godot.iphone.opt.arm] Error 1
scons: building terminated because of errors.
scons p=iphone tools=no bits=64 target release arch=arm64
-> Builded OK
scons p=iphone tools=no bits=32 target release arch=arm
-> With error -lcrt1.3.1.o
Resolved by:
edit "godot/platform/iphone/detect.py" and replace ALL match -miphoneos-version-min=5.1.1
to -miphoneos-version-min=7.0
as @ret80 commented.
This fixed in "master" branch
@tulsidaskhatri How is your problem? You manage to solve it?
If not yet. I tell you that I had same problem and fixed it.
Problem is because a dependency is missing.
You need to add "-framework", "CFNetwork"
in LINKFLAGS
array in config.py.
Whatsmore, below is my full deps list:
env.Append(LINKFLAGS=[
"-ObjC",
"-framework", "CFNetwork",
"-framework", "SystemConfiguration",
"-framework", "EventKit",
"-framework", "EventKitUI",
"-framework", "AdSupport",
"-framework", "AudioToolbox",
"-framework", "AVFoundation",
"-framework", "MobileCoreServices",
"-framework", "CoreGraphics",
"-framework", "CoreMedia",
"-framework", "CoreMotion",
"-framework", "CoreTelephony",
"-framework", "CoreVideo",
"-framework", "Foundation",
"-framework", "GLKit",
"-framework", "JavaScriptCore",
"-framework", "MediaPlayer",
"-framework", "MessageUI",
"-framework", "Messages",
"-framework", "MobileCoreServices",
"-framework", "OpenGLES",
"-framework", "SafariServices",
"-framework", "StoreKit",
"-framework", "SystemConfiguration",
"-framework", "UIKit",
"-framework", "WebKit",
"-framework", "GoogleMobileAds"])
PS Sorry for "digging" in old closed thread.
@BastiaanOlij does this still fail to you?
@lukaszbulzacki Thanks for your help, I solved this problem too, but now I hardly remember anything about the project or this thread. Thanks 👍
@reduz compiling on xcode 8 and 9 beta works fine. From memory, we moved the minimum build for 2.1.x to iOS 7 and for 3.0 to iOS 9.
Do need to check the simulator build one of these days.
I'm not sure about the other issues mentioned here but I think this can be closed.