Xcode 12.0下无法编译,曾经编译好的也无法执行
qinyongqiang opened this issue · 4 comments
创建一个Issue
请按照如下模版尽可能详细的填写资料。不按照规则提供我解决您的问题所需的信息将很有可能导致您的帐号被我的私人账号和Hikari组织永久黑名单
编译环境
macOS 10.15.6
Xcode version 12.0编译指令
为Wiki里面的编译指令,截取cmake 配置和执行ninja的一段为:
mkdir Build && cd Build && cmake -G "Ninja" -DLLDB_CODESIGN_IDENTITY='' -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_APPEND_VC_REV=on -DLLDB_USE_SYSTEM_DEBUGSERVER=YES -DLLVM_CREATE_XCODE_TOOLCHAIN=on -DCMAKE_INSTALL_PREFIX=~/Library/Developer/ -DXCODE_VERSION=12.0 ../Hikari && ninja
错误表现
[9/2722] Linking CXX shared library lib/clang/8.0.0/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libc++abi.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libc++.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libSystem.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libcache.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libcommonCrypto.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libcompiler_rt.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libcopyfile.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libcorecrypto.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libdispatch.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libdyld.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/liblaunch.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libmacho.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libremovefile.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_asl.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_blocks.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_c.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_collections.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_configuration.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_containermanager.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_coreservices.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_darwin.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_dnssd.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_featureflags.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_info.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_m.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_malloc.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_notify.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_product_info_filter.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sandbox.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sim_kernel.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sim_platform.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sim_pthread.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_trace.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libunwind.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libxpc.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sim_kernel_host.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sim_platform_host.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_sim_pthread_host.tbd) built for iOS Simulator ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_kernel.tbd) built for macOS/Mac Catalyst ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_platform.tbd) built for macOS/Mac Catalyst ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_pthread.tbd) built for macOS/Mac Catalyst [21/2722] Generating ../../../../lib/clang/8.0.0/lib/darwin/libclang_rt.ios.a FAILED: lib/clang/8.0.0/lib/darwin/libclang_rt.ios.a cd /Users/qin/Projects/ToolChains/202009/Build/projects/compiler-rt/lib/builtins && /usr/local/Cellar/cmake/3.18.2/bin/cmake -E make_directory /Users/qin/Projects/ToolChains/202009/Build/./lib/clang/8.0.0/lib/darwin && lipo -output /Users/qin/Projects/ToolChains/202009/Build/./lib/clang/8.0.0/lib/darwin/libclang_rt.ios.a -create -arch armv7 /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_armv7_ios.a -arch armv7s /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_armv7s_ios.a -arch arm64 /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_arm64_ios.a -arch armv7k /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_armv7k_ios.a -arch arm64 /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_arm64_iossim.a -arch i386 /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_i386_iossim.a -arch x86_64 /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_x86_64_iossim.a fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_arm64_ios.a and /Users/qin/Projects/ToolChains/202009/Build/lib/libclang_rt.builtins_arm64_iossim.a have the same architectures (arm64) and can't be in the same fat output file [34/2722] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.ios.dir/asan_interceptors.cc.o ninja: build stopped: subcommand failed.
其它问题
在Xcode 12.0下编译无法通过,同时用Xcode 11编译好的ToolChain在 12.0下编译程序无法通过,具体表现为
引入
#import <Foundation/Foundation.h>
和#import <UIKit/UIKit.h>
等基础包的时候就会报错无法编译通过
等基础包的时候就会报错无法编译通过
具体报错是什么
- 编译环境
macOS 10.15.7
Xcode version 12.0.1
- 错误表现
In file included from /Users/a1/Desktop/QpbyGame/frameworks/cocos2d-x/cocos/scripting/lua-bindings/manual/platform/ios/CCLuaObjcBridge.mm:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:11:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:10:9: fatal error: 'Foundation/NSURLHandle.h' file not found
#import <Foundation/NSURLHandle.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
看起来不是简单能够适配的,恕不提供免费开源支持
看起来不是简单能够适配的,恕不提供免费开源支持
汗。。。。