ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARC

sudo gem install jekyll安装报错

Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
ERROR: Failed to build gem native extension.
 current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200103-63706-1n7uc12.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... yes
checking for ffi_call() in -lffi... yes
checking for ffi_closure_alloc()... no
checking for shlwapi.h... no
checking for rb_thread_call_without_gvl()... yes
checking for ruby_native_thread_p()... yes
checking for ruby_thread_has_gvl_p()... yes
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.11.3/mkmf.log
current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c
make "DESTDIR="
mkdir -p "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c"/libffi-i386; (if [ ! -f "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi"/configure ]; then echo "Running autoreconf for libffi"; cd "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi" && /bin/sh /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/autogen.sh > /dev/null; fi); (if [ ! -f "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c"/libffi-i386/Makefile ]; then echo "Configuring libffi for i386"; cd "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c"/libffi-i386 && env CC=" xcrun clang" CFLAGS="-arch i386 " LDFLAGS="-arch i386" "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --disable-docs --host=i386-apple-darwin > /dev/null; fi); /Library/Developer/CommandLineTools/usr/bin/make -C "/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c"/libffi-i386
Configuring libffi for i386
clang: error: unsupported option '-print-multi-os-directory'
clang: error: no input files
/Library/Developer/CommandLineTools/usr/bin/make 'AR_FLAGS=' 'CC_FOR_BUILD=' 'CFLAGS=-arch i386  -Wall -fexceptions' 'CXXFLAGS=-g -O2' 'CFLAGS_FOR_BUILD=' 'CFLAGS_FOR_TARGET=' 'INSTALL=/usr/bin/install -c' 'INSTALL_DATA=/usr/bin/install -c -m 644' 'INSTALL_PROGRAM=/usr/bin/install -c' 'INSTALL_SCRIPT=/usr/bin/install -c' 'JC1FLAGS=' 'LDFLAGS=-arch i386' 'LIBCFLAGS=' 'LIBCFLAGS_FOR_TARGET=' 'MAKE=/Library/Developer/CommandLineTools/usr/bin/make' 'MAKEINFO=/bin/sh /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/missing makeinfo ' 'PICFLAG=' 'PICFLAG_FOR_TARGET=' 'RUNTESTFLAGS=' 'SHELL=/bin/sh' 'exec_prefix=/usr/local' 'infodir=/usr/local/share/info' 'libdir=/usr/local/lib' 'mandir=/usr/local/share/man' 'prefix=/usr/local' 'AR=ar' 'AS=as' 'CC=xcrun clang' 'CXX=g++' 'LD=/Library/Developer/CommandLineTools/usr/bin/ld' 'NM=nm' 'RANLIB=ranlib' 'DESTDIR=' all-recursive
Making all in include
make[3]: Nothing to be done for `all'.
Making all in testsuite
make[3]: Nothing to be done for `all'.
Making all in man
make[3]: Nothing to be done for `all'.
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src   -arch i386  -Wall -fexceptions -c -o src/prep_cif.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/prep_cif.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -Wall -fexceptions -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/prep_cif.c  -fno-common -DPIC -o src/.libs/prep_cif.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src   -arch i386  -Wall -fexceptions -c -o src/types.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/types.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -Wall -fexceptions -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/types.c  -fno-common -DPIC -o src/.libs/types.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src   -arch i386  -Wall -fexceptions -c -o src/raw_api.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/raw_api.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -Wall -fexceptions -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/raw_api.c  -fno-common -DPIC -o src/.libs/raw_api.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src   -arch i386  -Wall -fexceptions -c -o src/java_raw_api.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/java_raw_api.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -Wall -fexceptions -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/java_raw_api.c  -fno-common -DPIC -o src/.libs/java_raw_api.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src   -arch i386  -Wall -fexceptions -c -o src/closures.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/closures.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -Wall -fexceptions -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/closures.c  -fno-common -DPIC -o src/.libs/closures.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src   -arch i386  -Wall -fexceptions -c -o src/x86/ffi.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/x86/ffi.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -Wall -fexceptions -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/x86/ffi.c  -fno-common -DPIC -o src/x86/.libs/ffi.o
/bin/sh ./libtool    --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src  -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386  -c -o src/x86/sysv.lo /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/x86/sysv.S
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -I. -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/include -Iinclude -I/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src -arch i386 -c /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/src/x86/sysv.S  -fno-common -DPIC -o src/x86/.libs/sysv.o
/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch i386  -Wall -fexceptions  -arch i386 -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo   src/x86/ffi.lo src/x86/sysv.lo
libtool: link: ar cru .libs/libffi_convenience.a src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/sysv.o
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch i386  -Wall -fexceptions -no-undefined -version-info `grep -v '^#' /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c/libffi/libtool-version`   '-arch' 'i386'  -arch i386 -o libffi.la -rpath /usr/local/lib src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo  src/x86/ffi.lo src/x86/sysv.lo
libtool: link:  xcrun clang -dynamiclib  -o .libs/libffi.7.dylib  src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/sysv.o    -arch i386 -arch i386 -arch i386   -install_name  /usr/local/lib/libffi.7.dylib -compatibility_version 9 -current_version 9.0 -Wl,-single_module
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Undefined symbols for architecture i386:
  "___x86.get_pc_thunk.bx", referenced from:
      _ffi_call_i386 in sysv.o
      _ffi_closure_raw_SYSV in sysv.o
      _ffi_closure_raw_THISCALL in sysv.o
  "___x86.get_pc_thunk.dx", referenced from:
      _ffi_closure_i386 in sysv.o
      _ffi_closure_STDCALL in sysv.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libffi.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** ["/Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3/ext/ffi_c"/libffi-i386/.libs/libffi_convenience.a] Error 2
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.3 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.11.3/gem_make.out

重新安装ffi 制定版本

google之后找到了答案
1、sudo brew install automake autoconf libtool
2、sudo gem install ffi -v '1.9.21'

终于成功。

### 回答1: DeprecationWarning: 在0.21版本中,linear_assignment_模块已经不再被推荐使用。 DeprecationWarning是Python中的一个警告类型,用于提示某个功能或模块已被弃用,并且不再建议使用。在这种情况下,linear_assignment_模块在0.21版本中被废弃,意味着它已经不再是推荐的使用方式。 当一个模块或功能被废弃时,通常是因为它存在一些问题或不再符合最新的设计标准。为了支持代码的可维护性和最佳实践,Python开发团队会定期审核和更新标准库中的模块,将一些废弃的部分标记为不推荐使用,并在未来的版本中删除。 针对这个警告,我们应该考虑查找替代方案。在应用中使用过程中,我们可以使用搜索引擎或查阅官方文档来找到更好的替代方式。新版本可能已经提供了一个更高效或更好的模块来完成相同的任务。 在我们应用的代码中,为了消除这个警告,可以考虑找到并修改使用了linear_assignment_模块的部分,替换为推荐的新模块或方法。同时,我们也可以在代码中加上警告过滤器,将警告转换为忽略或抑制,以确保在代码运行时不再显示这个警告。 总之,deprecationwarning警告是一个提醒我们使用替代方式的重要信息。通过及时了解和采取相应的行动,我们可以确保我们的代码在迁移到新版本时保持最佳状态和最佳性能。 ### 回答2: DeprecationWarning是Python解释器中的一种警告,用于指示某个特定的模块或功能已过时,不推荐使用,并可能在将来的版本中被移除。 该警告信息中提到的linear_assignment_模块指的是在0.21版本中已过时的线性分配模块。 在0.21版本中,该模块被标记为过时,意味着该模块的使用不再被推荐,并且在将来的版本中可能会被移除。这是为了鼓励开发者使用更优化、更先进的替代方案。 当我们在使用该模块时,Python解释器会发出DeprecationWarning警告,提醒我们该模块已过时。这意味着我们应该尽快停止使用该模块,并寻找一个替代方案来替代它。 为了解决这个警告,我们应该查看新版本的文档,了解替代方案是什么。在这种情况下,我们需要查看0.21版本的文档,寻找关于线性分配的新模块或功能。 有时候,过时的模块可能已被移除,或者在后续版本中进行了重大改变。因此,及早更新和调整我们的代码是很重要的,以适应新版本的Python。 总之,当我们遇到DeprecationWarning警告时,我们应该尽快查找替代方案,并更新我们的代码,以保持与最新版本的Python和相关库的兼容性。这样可以确保我们的代码在未来的更新中可以正常运行,并且利用到最新的功能和改进。 ### 回答3: 在0.21版本中,linear_assignment_模块已被弃用。这意味着在未来的版本中,该模块可能会被移除或发生重大变化。因此,建议在编写代码时不要使用该模块。 如果你需要进行线性分配问题的求解,可以考虑使用其他替代方案来替代linear_assignment_模块。目前,可以采用python库中的scipy.optimize.linear_sum_assignment函数来解决线性分配问题。 需要注意的是,由于linear_assignment_模块被弃用,所以在进行升级到0.21版本的代码中,需要修改相关的代码部分,以适应新的解决方案。 总结而言,linear_assignment_模块在0.21版本中已经被弃用,建议在代码中避免使用该模块,并考虑使用其他替代方案来代替。这样可以确保你的代码在未来的版本中仍然能够正常运行,并具备更好的可维护性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值