xcode i386 架构在 MacOS 错误中被弃用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53610512/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
i386 architecture deprecated in MacOS error
提问by Misha
I'm completely new to the Mac environment and I've only been using it for a few hours. When I run a shell script, I get the following error-
我对 Mac 环境完全陌生,而且我只使用了几个小时。当我运行 shell 脚本时,出现以下错误 -
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture i386:
"_OSAtomicCompareAndSwapPtr", referenced from:
___darwintrace_setup in darwintrace.o
"__DefaultRuneLocale", referenced from:
_check_interpreter in proc.o
"___error", referenced from:
__dt_access in access.o
__dt_close in close.o
___darwintrace_setup_tls in darwintrace.o
___darwintrace_setup in darwintrace.o
__dt_dup2 in dup2.o
__dt_mkdir in mkdir.o
__dt_open in open.o
...
"___getdirentries64", referenced from:
__interpose___getdirentries64 in readdir.o
"___maskrune", referenced from:
_check_interpreter in proc.o
"___snprintf_chk", referenced from:
___darwintrace_sandbox_check in darwintrace.o
___darwintrace_log_op in darwintrace.o
"___stack_chk_fail", referenced from:
___darwintrace_setup in darwintrace.o
___darwintrace_is_in_sandbox in darwintrace.o
___darwintrace_sandbox_check in darwintrace.o
___darwintrace_log_op in darwintrace.o
_check_interpreter in proc.o
__dt_getdirentries64 in readdir.o
__dt_getdirentries in readdir.o
...
"_unlink", referenced from:
__interpose_unlink in unlink.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [darwintrace.dylib] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
How do I remove i386 architecture from Xcode? How do I resolve this error?
如何从 Xcode 中删除 i386 架构?如何解决此错误?
回答by oscarthecat
Using xcode 9.4 or 9.4.1, which is the last version to support 32 bit build and valid on Mojave.
使用 xcode 9.4 或 9.4.1,这是支持 32 位构建并在 Mojave 上有效的最后一个版本。
回答by user3468229
So the issue is that apple has removed to ability to compile 32 bit programs on macos with xcode10
所以问题是苹果已经取消了在 macos 上使用 xcode10 编译 32 位程序的能力
source: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
来源:https: //developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes