Я пытаюсь создать довольно сложный проект C ++ , который отлично строился до последнего обновления macOS.
У меня установлены все зависимости (brew install git python cmake gcc boost@1.60
), и я всегда выполнял описанные шаги сборки здесь (сборка из командной строки, без использования XCode для сборки). Я также пробовал использовать последнюю версию Boost (1.72), но получаю ту же ошибку ...
Это результат выполнения команды cmake ..
(без переданных флагов):
CMake Warning (dev) at CMakeLists.txt:12 (set):
implicitly converting 'TYPE' to 'STRING' type.
This warning is for project developers. Use -Wno-dev to suppress it.
-- BUILD TESTS: disabled
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is Clang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Looking for _rotr
-- Looking for _rotr - found
-- Found Boost: /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found suitable version "1.72.0", minimum required is "1.55") found components: system filesystem thread date_time chrono regex serialization program_options
CMake Warning in CMakeLists.txt:
CMAKE_SKIP_INSTALL_RULES was enabled even though installation rules have
been specified
-- Configuring done
-- Generating done
-- Build files have been written to: /conceal-core/build
И это частичный вывод команды make
(из-за первого появления «ошибки» я не могу включить весь вывод из-за ограничений SO, но при необходимости могу предоставить полный журнал):
[ 47%] Building CXX object src/CMakeFiles/Crypto.dir/crypto/cryptonight.cpp.o
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:7:
/conceal-core/src/crypto/soft_aes.hpp:97:8: warning: inline variables are a C++17 extension [-Wc++17-extensions]
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/conceal-core/src/crypto/soft_aes.hpp:97:24: error: redefinition of '__rord' as different kind of symbol
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:357:20: note: expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:330:1: note: previous definition is here
__rord(unsigned int __X, int __C) {
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:7:
/conceal-core/src/crypto/soft_aes.hpp:97:39: error: expected ')'
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/conceal-core/src/crypto/soft_aes.hpp:97:24: note: to match this '('
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:357:27: note: expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:7:
/conceal-core/src/crypto/soft_aes.hpp:97:24: error: expected expression
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:357:30: note: expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:7:
/conceal-core/src/crypto/soft_aes.hpp:97:55: error: expected ')'
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/conceal-core/src/crypto/soft_aes.hpp:97:24: note: to match this '('
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:357:32: note: expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:7:
/conceal-core/src/crypto/soft_aes.hpp:97:24: error: expected expression
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:357:35: note: expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:7:
/conceal-core/src/crypto/soft_aes.hpp:97:62: error: expected ';' after top level declarator
static inline uint32_t _rotr(uint32_t value, uint32_t amount) {
^
;
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
In file included from /conceal-core/src/crypto/cn_aux.hpp:8:
/conceal-core/src/crypto/coin_algos.hpp:21:10: error: unknown type name 'cryptonight_algo'
template<cryptonight_algo ALGO>
^
/conceal-core/src/crypto/coin_algos.hpp:25:42: error: use of undeclared identifier 'CRYPTONIGHT'
inline constexpr size_t cn_select_memory<CRYPTONIGHT>() { return CRYPTONIGHT_MEMORY; }
^
/conceal-core/src/crypto/coin_algos.hpp:25:55: error: expected unqualified-id
inline constexpr size_t cn_select_memory<CRYPTONIGHT>() { return CRYPTONIGHT_MEMORY; }
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
In file included from /conceal-core/src/crypto/cryptonight.hpp:12:
/conceal-core/src/crypto/cn_aux.hpp:17:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC target ("aes,sse2")
^
In file included from /conceal-core/src/crypto/cryptonight.cpp:6:
/conceal-core/src/crypto/cryptonight.hpp:33:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x01>(xout2);
^
/conceal-core/src/crypto/cryptonight.hpp:42:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x00>(xout0);
^
/conceal-core/src/crypto/cryptonight.hpp:53:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x02>(xout2);
^
/conceal-core/src/crypto/cryptonight.hpp:62:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x00>(xout0);
^
/conceal-core/src/crypto/cryptonight.hpp:73:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x04>(xout2);
^
/conceal-core/src/crypto/cryptonight.hpp:82:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x00>(xout0);
^
/conceal-core/src/crypto/cryptonight.hpp:93:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x08>(xout2);
^
/conceal-core/src/crypto/cryptonight.hpp:102:11: error: use of undeclared identifier 'soft_aeskeygenassist'
xout1 = soft_aeskeygenassist<0x00>(xout0);
^
/conceal-core/src/crypto/cryptonight.hpp:126:40: error: unknown type name 'cryptonight_algo'
template<bool SOFT_AES, size_t MEMORY, cryptonight_algo ALGO>
^
/conceal-core/src/crypto/cryptonight.hpp:168:40: error: unknown type name 'cryptonight_algo'
template<bool SOFT_AES, size_t MEMORY, cryptonight_algo ALGO>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make[2]: *** [src/CMakeFiles/Crypto.dir/crypto/cryptonight.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/Crypto.dir/all] Error 2
make: *** [all] Error 2
Из-за моих ограниченных знаний о C ++ и компоновке / компиляции я совершенно не понимаю, что может вызвать эту ошибку и как я могу ее исправить. Я попытался передать некоторые флаги в cmake
(например, -stdlib=libc++
или -mmacosx-version-min
) и даже попытался переключить компилятор на g ++ (передав флаг -DCMAKE_CXX_COMPILER=/usr/bin/g++
), но ничего не помогло.
версия macOS: 10.15 .5 (19F101)
clang: Apple clang версии 11.0.3 (clang-1103.0.32.62)
Boost: 1,60 и 1,72