Я пытаюсь установить старую версию gem для старого проекта после новой установки OS X 10.15 Catalina и XCode Tools для командной строки и Xcode 11.0. Я пытаюсь установить драгоценный камень scrypt
, версия 1.2.1
, которая зависит от authlogic.
gem install scrypt -v '1.2.1'
Этот камень используется под капотом другого камняcasein
. Поэтому я не могу обновить scrypt непосредственно внутри моего Gemfile.
Возвращает следующую ошибку:
Building native extensions. This could take a while...
ERROR: Error installing scrypt:
ERROR: Failed to build gem native extension.
current directory: /Users/sergiypetrenko/.rvm/gems/ruby-2.3.8/gems/scrypt-1.2.1/ext/scrypt
/Users/sergiypetrenko/.rvm/rubies/ruby-2.3.8/bin/ruby -rrubygems /Users/sergiypetrenko/.rvm/gems/ruby-2.3.8/gems/rake-13.0.0/exe/rake RUBYARCHDIR\=/Users/sergiypetrenko/.rvm/gems/ruby-2.3.8/extensions/x86_64-darwin-19/2.3.0/scrypt-1.2.1 RUBYLIBDIR\=/Users/sergiypetrenko/.rvm/gems/ruby-2.3.8/extensions/x86_64-darwin-19/2.3.0/scrypt-1.2.1
mkdir -p x86_64-darwin
gcc -fexceptions -O -fno-omit-frame-pointer -fno-strict-aliasing -Wall -msse -msse2 -arch x86_64 -arch i386 -o x86_64-darwin/crypto_scrypt-sse.o -c ./crypto_scrypt-sse.c
gcc -fexceptions -O -fno-omit-frame-pointer -fno-strict-aliasing -Wall -msse -msse2 -arch x86_64 -arch i386 -o x86_64-darwin/memlimit.o -c ./memlimit.c
gcc -fexceptions -O -fno-omit-frame-pointer -fno-strict-aliasing -Wall -msse -msse2 -arch x86_64 -arch i386 -o x86_64-darwin/scrypt_calibrate.o -gcc -fexceptions -O -fno-omit-frame-pointer -fno-strict-aliasing -Wall -msse -msse2 -arch x86_64 -arch i386 -o x86_64-darwin/sha256.o -c ./sha256.c
gcc -bundle -o x86_64-darwin/libscrypt_ext.bundle x86_64-darwin/crypto_scrypt-sse.o x86_64-darwin/memlimit.o x86_64-darwin/scrypt_calibrate.o x86_64-darwin/scrypt_ext.o x86_64-darwin/scryptenc_cpuperf.o x86_64-darwin/sha256.o -fexceptions -arch x86_64 -arch i386
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture i386:
"___error", referenced from:
_crypto_scrypt in crypto_scrypt-sse.o
_memtouse in memlimit.o
"___stack_chk_fail", referenced from:
_scrypt_SHA256_Transform in sha256.o
_scrypt_SHA256_Final in sha256.o
_HMAC_scrypt_SHA256_Init in sha256.o
_HMAC_scrypt_SHA256_Final in sha256.o
_PBKDF2_scrypt_SHA256 in sha256.o
"___stack_chk_guard", referenced from:
_scrypt_SHA256_Transform in sha256.o
_scrypt_SHA256_Final in sha256.o
_HMAC_scrypt_SHA256_Init in sha256.o
_HMAC_scrypt_SHA256_Final in sha256.o
_PBKDF2_scrypt_SHA256 in sha256.o
"_free", referenced from:
_crypto_scrypt in crypto_scrypt-sse.o
"_getrlimit$UNIX2003", referenced from:
_memtouse in memlimit.o
"_gettimeofday", referenced from:
_scryptenc_cpuperf in scryptenc_cpuperf.o
"_malloc", referenced from:
_crypto_scrypt in crypto_scrypt-sse.o
"_memcpy", referenced from:
_scrypt_SHA256_Update in sha256.o
_PBKDF2_scrypt_SHA256 in sha256.o
"_mmap$UNIX2003", referenced from:
_crypto_scrypt in crypto_scrypt-sse.o
"_munmap$UNIX2003", referenced from:
_crypto_scrypt in crypto_scrypt-sse.o
"_sysconf", referenced from:
_memtouse in memlimit.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rake aborted!
Command failed with status (1): [gcc -bundle -o x86_64-darwin/libscrypt_ext...]
/Users/sergiypetrenko/.rvm/gems/ruby-2.3.8/gems/ffi-compiler-1.0.1/lib/ffi-compiler/compile_task.rb:153:in `block in define_task!'
/Users/sergiypetrenko/.rvm/gems/ruby-2.3.8/gems/rake-13.0.0/exe/rake:27:in `<main>'
Tasks: TOP => default => x86_64-darwin/libscrypt_ext.bundle
(See full trace by running task with --trace)
rake failed, exit code 1
Основным решением для OS X 10.14 Mojave для меня было установить этот пакет /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
,Но пока Apple решила удалить / usr / include в Каталине. Причина в том, что Xcode теперь поддерживает несколько SDK и несколько установок Xcode.
Ссылка на похожие проблемы: Установка старого scrypt gem в ОС Mojave
MacOS Catalina не можетнайти / usr / включить файл