Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Fails on macOS Big Sur 11.2 #2708

Open
Mahdi-GoVanguard opened this issue Feb 10, 2021 · 9 comments
Open

Compile Fails on macOS Big Sur 11.2 #2708

Mahdi-GoVanguard opened this issue Feb 10, 2021 · 9 comments

Comments

@Mahdi-GoVanguard
Copy link

Describe the bug
Following the compilation instructions in the GitHub Docs results in a fatal error. The compilation output traceback points to several errors related to undeclared identifiers and a no matching function error. See output below.

**Which operating system do you use? **

macOS Big Sur 11.2

uname -a 
Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

system_profiler SPHardwareDataType

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro16,4
      Processor Name: 8-Core Intel Core i9
      Processor Speed: 2.4 GHz
      Number of Processors: 1
      Total Number of Cores: 8
      L2 Cache (per Core): 256 KB
      L3 Cache: 16 MB
      Hyper-Threading Technology: Enabled
      Memory: 64 GB
      System Firmware Version: 1554.80.3.0.0 (iBridge: 18.16.14346.0.0,0)

To Reproduce

cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=ON 

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/username/Downloads/xmr-stak

username@computername xmr-stak % make install

[  7%] Built target xmr-stak-asm
[ 23%] Built target xmr-stak-c
[ 25%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp.o
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:55:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116:8: warning: 
      inline variables are a C++17 extension [-Wc++17-extensions]
static inline uint32_t _rotr(uint32_t value, uint32_t amount)
       ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116: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/12.0.0/include/ia32intrin.h:425:20: note: 
      expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/ia32intrin.h:398:1: note: 
      previous definition is here
__rord(unsigned int __X, int __C) {
^
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:55:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116:39: error: 
      expected ')'
static inline uint32_t _rotr(uint32_t value, uint32_t amount)
                                      ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116: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/12.0.0/include/ia32intrin.h:425:27: note: 
      expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
                          ^
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:55:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116: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/12.0.0/include/ia32intrin.h:425:30: note: 
      expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
                             ^
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:55:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116:55: error: 
      expected ')'
static inline uint32_t _rotr(uint32_t value, uint32_t amount)
                                                      ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116: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/12.0.0/include/ia32intrin.h:425:32: note: 
      expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
                               ^
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:55:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116: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/12.0.0/include/ia32intrin.h:425:35: note: 
      expanded from macro '_rotr'
#define _rotr(a,b) __rord((a), (b))
                                  ^
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:55:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116:62: error: 
      expected ';' after top level declarator
static inline uint32_t _rotr(uint32_t value, uint32_t amount)
                                                             ^
                                                             ;
In file included from /Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp:6:
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:562:8: error: 
      explicit specialization of undeclared template struct 'GetOptimalSqrtType'
struct GetOptimalSqrtType<1u>
       ^                 ~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:567:39: error: 
      expected a qualified name after 'typename'
using GetOptimalSqrtType_t = typename GetOptimalSqrtType<N>::type;
                                      ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:567:57: error: 
      expected ';' after alias declaration
using GetOptimalSqrtType_t = typename GetOptimalSqrtType<N>::type;
                                                        ^
                                                        ;
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:976:16: error: 
      use of undeclared identifier 'keccak'
                REPEAT_1(11, CN_INIT, monero_const, conc_var, l0, ax0, b...
                             ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:976:16: warning: 
      use of function template name with no prior declaration in function call
      with explicit template arguments is a C++2a extension [-Wc++2a-extensions]
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:976:16: error: 
      no matching function for call to 'assign'
  ...REPEAT_1(11, CN_INIT, monero_const, conc_var, l0, ax0, bx0, idx0, ptr0, bx1, sqrt_result, division_result_xmm, cn_r_data);
     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:940:37: note: 
      expanded from macro 'REPEAT_1'
#define REPEAT_1(n, f, ...) CN_EXEC(f, CN_ENUM_##n(0, __VA_ARGS__))
                            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:897:11: note: 
      expanded from macro 'CN_EXEC'
        CN_DEFER(f)         \
        ~~~~~~~~~^~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:889:23: note: 
      expanded from macro 'CN_DEFER'
#define CN_DEFER(...) __VA_ARGS__
                      ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:766:4: note: 
      expanded from macro 'CN_INIT'
                        assign(sqrt_result, h0[13])...
                        ^~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:575:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to '__m128i &' for
      1st argument
inline void assign(__m128i& output, const uint64_t input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:580:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to 'uint64_t &' (aka
      'unsigned long long &') for 1st argument
inline void assign(uint64_t& output, const uint64_t input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:585:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to 'uint64_t &' (aka
      'unsigned long long &') for 1st argument
inline void assign(uint64_t& output, const __m128i& input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:981:16: error: 
      use of undeclared identifier 'aes_round_bittube2'
                        REPEAT_1(9, CN_STEP1, monero_const, conc_var, l0...
                                    ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:982:16: warning: 
      use of function template name with no prior declaration in function call
      with explicit template arguments is a C++2a extension [-Wc++2a-extensions]
                        REPEAT_1(7, CN_STEP2, monero_const, l0, ax0, bx0...
                                    ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:983:17: error: 
      no matching function for call to 'assign'
  ...REPEAT_1(16, CN_STEP3, monero_const, l0, ax0, bx0, idx0, ptr0, lo, cl, ch, al0, ah0, cx, bx1, sqrt_result, division_result_xmm, cn_r_data);
     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:940:37: note: 
      expanded from macro 'REPEAT_1'
#define REPEAT_1(n, f, ...) CN_EXEC(f, CN_ENUM_##n(0, __VA_ARGS__))
                            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:897:11: note: 
      expanded from macro 'CN_EXEC'
        CN_DEFER(f)         \
        ~~~~~~~~~^~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:889:23: note: 
      expanded from macro 'CN_DEFER'
#define CN_DEFER(...) __VA_ARGS__
                      ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:819:2: note: 
      expanded from macro 'CN_STEP3'
        CN_MONERO_V8_DIV(n, cx, sqrt_result, division_result_xmm, cl)...
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:686:3: note: 
      expanded from macro 'CN_MONERO_V8_DIV'
                assign(sqrt_result_tmp, sqrt_result)...
                ^~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:580:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to 'const uint64_t'
      (aka 'const unsigned long long') for 2nd argument
inline void assign(uint64_t& output, const uint64_t input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:585:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to 'const __m128i'
      (vector of 2 'long long' values) for 2nd argument
inline void assign(uint64_t& output, const __m128i& input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:575:13: note: 
      candidate function not viable: no known conversion from 'uint64_t' (aka
      'unsigned long long') to '__m128i &' for 1st argument
inline void assign(__m128i& output, const uint64_t input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:983:17: error: 
      use of undeclared identifier 'int_sqrt33_1_double_precision'
                        REPEAT_1(16, CN_STEP3, monero_const, l0, ax0, bx...
                                     ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:988:15: warning: 
      use of function template name with no prior declaration in function call
      with explicit template arguments is a C++2a extension [-Wc++2a-extensions]
                REPEAT_1(0, CN_FINALIZE);
                            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:988:15: error: 
      use of undeclared identifier 'keccakf'
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:988:15: error: 
      use of undeclared identifier 'extra_hashes'
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:1005:16: error: 
      use of undeclared identifier 'keccak'
                REPEAT_2(11, CN_INIT, monero_const, conc_var, l0, ax0, b...
                             ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:1005:16: warning: 
      use of function template name with no prior declaration in function call
      with explicit template arguments is a C++2a extension [-Wc++2a-extensions]
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:1005:16: error: 
      no matching function for call to 'assign'
  ...REPEAT_2(11, CN_INIT, monero_const, conc_var, l0, ax0, bx0, idx0, ptr0, bx1, sqrt_result, division_result_xmm, cn_r_data);
     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:942:10: note: 
      expanded from macro 'REPEAT_2'
        CN_EXEC(f, CN_ENUM_##n(0, __VA_ARGS__)); \
        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:897:11: note: 
      expanded from macro 'CN_EXEC'
        CN_DEFER(f)         \
        ~~~~~~~~~^~~~~~~~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:889:23: note: 
      expanded from macro 'CN_DEFER'
#define CN_DEFER(...) __VA_ARGS__
                      ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:766:4: note: 
      expanded from macro 'CN_INIT'
                        assign(sqrt_result, h0[13])...
                        ^~~~~~
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:575:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to '__m128i &' for
      1st argument
inline void assign(__m128i& output, const uint64_t input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:580:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to 'uint64_t &' (aka
      'unsigned long long &') for 1st argument
inline void assign(uint64_t& output, const uint64_t input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:585:13: note: 
      candidate function not viable: no known conversion from
      'GetOptimalSqrtType_t<N>' (aka 'GetOptimalSqrtType') to 'uint64_t &' (aka
      'unsigned long long &') for 1st argument
inline void assign(uint64_t& output, const __m128i& input)
            ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:1005:16: error: 
      use of undeclared identifier 'keccak'
                REPEAT_2(11, CN_INIT, monero_const, conc_var, l0, ax0, b...
                             ^
/Users/username/Downloads/xmr-stak/xmrstak/backend/cpu/crypto/cryptonight_aesni.h:1005:16: warning: 
      use of function template name with no prior declaration in function call
      with explicit template arguments is a C++2a extension [-Wc++2a-extensions]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
make[2]: *** [CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmr-stak-backend.dir/all] Error 2
make: *** [all] Error 2
...

Output of CMAKE -LA

username@computername xmr-stak % cmake -LA

  CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mhedhli/Downloads/xmr-stak
-- Cache values
CMAKE_ADDR2LINE:FILEPATH=CMAKE_ADDR2LINE-NOTFOUND
CMAKE_AR:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
CMAKE_ASM_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CMAKE_ASM_COMPILER_AR:FILEPATH=CMAKE_ASM_COMPILER_AR-NOTFOUND
CMAKE_ASM_COMPILER_RANLIB:FILEPATH=CMAKE_ASM_COMPILER_RANLIB-NOTFOUND
CMAKE_ASM_FLAGS:STRING=
CMAKE_ASM_FLAGS_DEBUG:STRING=-g
CMAKE_ASM_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_ASM_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
CMAKE_EXECUTABLE_FORMAT:STRING=MACHO
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool
CMAKE_INSTALL_PREFIX:PATH=/Users/mhedhli/Downloads/xmr-stak
CMAKE_LINKER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
CMAKE_LINK_STATIC:BOOL=OFF
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND
CMAKE_OBJDUMP:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump
CMAKE_OSX_ARCHITECTURES:STRING=
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=
CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
CMAKE_RANLIB:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
CPU_ENABLE:BOOL=ON
CUDA_ENABLE:BOOL=OFF
EXECUTABLE_OUTPUT_PATH:STRING=bin
HWLOC:FILEPATH=/usr/local/lib/libhwloc.dylib
HWLOC_ENABLE:BOOL=ON
HWLOC_INCLUDE_DIR:PATH=/usr/local/include
LIBRARY_OUTPUT_PATH:STRING=bin
MHTD:FILEPATH=/usr/local/lib/libmicrohttpd.dylib
MICROHTTPD_ENABLE:BOOL=ON
MTHD_INCLUDE_DIR:PATH=/usr/local/include
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/local/opt/openssl/lib/libcrypto.dylib
OPENSSL_INCLUDE_DIR:PATH=/usr/local/opt/openssl/include
OPENSSL_SSL_LIBRARY:FILEPATH=/usr/local/opt/openssl/lib/libssl.dylib
OpenCL_ENABLE:BOOL=ON
OpenCL_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenCL.framework
OpenCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenCL.framework
OpenSSL_ENABLE:BOOL=ON
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/local/bin/pkg-config
XMR-STAK_COMPILE:STRING=native
...

Feel free to add more information.

Xcode tools and brew are all up to date.
...
@acrogenesis
Copy link

I'm getting this same error on the same mac

@heeroyuyj
Copy link

same error here!

Can anyone with good intentions share the successfully compiled v1.0.5 version?

@dunkshot
Copy link

dunkshot commented Mar 8, 2021

I've got same error.
Big Sur 11.2.2

@dariusz22p
Copy link

same here

@Reskip
Copy link

Reskip commented Mar 28, 2021

Maybe _rotr share the same name as other library functions.
I tried to rename it (it can be rename to any randomly name) and compile in Mac OS successfully.

P.S This function appears three times in total, and can be simply renamed by the replacement function in IDE

@bcheeves
Copy link

bcheeves commented Apr 6, 2021

let me give that a try, I did just try to fetch the latest snapshot of the dev tree and compile from there, and still same issue. I'm on Mac OS Catalina, but ever since the latest update to 10.15.7, I'm having the same issue with compilation. So maybe Mac introduced a new library with this _rotr function name or something?

@bcheeves
Copy link

bcheeves commented Apr 6, 2021

That worked for me, I opened up the ./xmr-stak/xmrstak/backend/cpu/soft_aes.hpp file in Xcode. Then did a Find --> Find and Replace. Typed in "_rotr" for the search criteria and replaced it with another name, and it replaced two sections of the code in that file. Saved it, and attempted the "make install" again. This time it got to 46% and failed again on httpd.cpp with this output:
/Users/benners/xmr-stak/xmrstak/http/httpd.cpp:160:6: error: no matching function for call to 'MHD_start_daemon' d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION, ^~~~~~~~~~~~~~~~ /usr/local/include/microhttpd.h:2440:1: note: candidate function not viable: no known conversion from 'int (*)(void *, MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' (aka 'int (*)(void *, MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') to 'MHD_AccessHandlerCallback' (aka 'MHD_Result (*)(void *, MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') for 5th argument MHD_start_daemon (unsigned int flags, ^ 1 error generated. make[2]: *** [CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o] Error 1 make[1]: *** [CMakeFiles/xmr-stak-backend.dir/all] Error 2 make: *** [all] Error 2
looks similar to issues seen in #2701
and also another open source project (Ola) found here:
https://git.gnunet.org/libmicrohttpd.git/tree/src/include/microhttpd.h
and it still fails the make process, on the same line:

xmr-stak % make
[ 7%] Built target xmr-stak-asm
[ 23%] Built target xmr-stak-c
Consolidate compiler generated dependencies of target xmr-stak-backend
[ 25%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
/Users/benners/xmr-stak/xmrstak/http/httpd.cpp:160:6: error: no matching function for call to 'MHD_start_daemon'
d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION,
^~~~~~~~~~~~~~~~
/usr/local/include/microhttpd.h:2473:1: note: candidate function not viable: no known conversion from 'int (*)(void *, MHD_Connection *, const
char *, const char *, const char *, const char *, size_t , void **)' (aka 'int ()(void *, MHD_Connection *, const char *, const char *,
const char *, const char *, unsigned long , void **)') to 'MHD_AccessHandlerCallback' (aka 'MHD_Result ()(void *, MHD_Connection *,
const char *, const char *, const char *, const char *, unsigned long *, void **)') for 5th argument
MHD_start_daemon (unsigned int flags,
^
1 error generated.
make[2]: *** [CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmr-stak-backend.dir/all] Error 2

@siegfried
Copy link

siegfried commented Apr 8, 2021

I had the same error on OpenBSD 6.8, and fixed it by rename all _rotr to __rotr in the file.

/mnt/warehouse/repos/xmr-stak/xmrstak/backend/cpu/crypto/soft_aes.hpp:116:24: error: redefinition of '__rord' as different kind of symbol
static inline uint32_t _rotr(uint32_t value, uint32_t amount)

@antt001
Copy link

antt001 commented Apr 10, 2021

to work around MHD_start_daemon error, you can disable microhttpd using : -DMICROHTTPD_ENABLE=OFF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants