meelgroup / ganak

The first scalable probabilistic exact counter
MIT License
25 stars 6 forks source link

Compilation problems on mac #10

Closed algebravic closed 1 year ago

algebravic commented 3 years ago

I'm running on a mac, using the latest version of xcode and big sur. Here's what happens when I try to build ganak. Should it specify that it's using c++11? It fails after giving a lot of warnings.

Victors-iMac:build victorsmiller$ cmake ..
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- You can choose the type of build, options are:Debug;Release;RelWithDebInfo;MinSizeRel
-- Doing a RelWithDebInfo build
-- Compiling for dynamic library use
-- build type is RelWithDebInfo
-- Performing Test HAVE_FLAG_-mtune=native
-- Performing Test HAVE_FLAG_-mtune=native - Success
-- Performing Test HAVE_FLAG_-Wall
-- Performing Test HAVE_FLAG_-Wall - Success
-- Performing Test HAVE_FLAG_-Wextra
-- Performing Test HAVE_FLAG_-Wextra - Success
-- Performing Test HAVE_FLAG_-Wunused
-- Performing Test HAVE_FLAG_-Wunused - Success
-- Performing Test HAVE_FLAG_-Wsign-compare
-- Performing Test HAVE_FLAG_-Wsign-compare - Success
-- Performing Test HAVE_FLAG_-fno-omit-frame-pointer
-- Performing Test HAVE_FLAG_-fno-omit-frame-pointer - Success
-- Performing Test HAVE_FLAG_-Wtype-limits
-- Performing Test HAVE_FLAG_-Wtype-limits - Success
-- Performing Test HAVE_FLAG_-Wuninitialized
-- Performing Test HAVE_FLAG_-Wuninitialized - Success
-- Performing Test HAVE_FLAG_-Wno-deprecated
-- Performing Test HAVE_FLAG_-Wno-deprecated - Success
-- Performing Test HAVE_FLAG_-Wstrict-aliasing
-- Performing Test HAVE_FLAG_-Wstrict-aliasing - Success
-- Performing Test HAVE_FLAG_-Wpointer-arith
-- Performing Test HAVE_FLAG_-Wpointer-arith - Success
-- Performing Test HAVE_FLAG_-Wheader-guard
-- Performing Test HAVE_FLAG_-Wheader-guard - Success
-- Performing Test HAVE_FLAG_-Wformat-nonliteral
-- Performing Test HAVE_FLAG_-Wformat-nonliteral - Success
-- Performing Test HAVE_FLAG_-Winit-self
-- Performing Test HAVE_FLAG_-Winit-self - Success
-- Performing Test HAVE_FLAG_-Wparentheses
-- Performing Test HAVE_FLAG_-Wparentheses - Success
-- Performing Test HAVE_FLAG_-Wunreachable-code
-- Performing Test HAVE_FLAG_-Wunreachable-code - Success
-- Performing Test HAVE_FLAG_-ggdb3
-- Performing Test HAVE_FLAG_-ggdb3 - Success
-- 
-- Performing Test HAVE_FLAG_-fPIC
-- Performing Test HAVE_FLAG_-fPIC - Success
-- Performing Test HAVE_FLAG_-std=c99
-- Performing Test HAVE_FLAG_-std=c99 - Success
-- Performing Test HAVE_FLAG_-msse4.1
-- Performing Test HAVE_FLAG_-msse4.1 - Success
-- Performing Test HAVE_FLAG_-mpclmul
-- Performing Test HAVE_FLAG_-mpclmul - Success
-- GIT hash found: 492fec344b5f61ec176134c95fa627ef4e20e6e9
-- PROJECT_VERSION: 1.0.1
-- PROJECT_VERSION_MAJOR: 1
-- PROJECT_VERSION_MINOR: 0
-- PROJECT_VERSION_PATCH: 1
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/victorsmiller/Programming/Git/ganak/build
Victors-iMac:build victorsmiller$ make
[  5%] Building C object src/clhash/CMakeFiles/clhash.dir/clhash.c.o
[ 11%] Linking C shared library libclhash.dylib
[ 11%] Built target clhash
[ 17%] Building CXX object src/component_types/CMakeFiles/component_types.dir/base_packed_component.cpp.o
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.cpp:7:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:51:18: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  T *data_start_ = nullptr;
                 ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:52:8: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  T *p = nullptr;
       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:55:25: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned end_of_bits_ = 0;
                        ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:207:19: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned* data_ = nullptr;
                  ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:209:24: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  uint64_t* clhashkey_ = nullptr;
                       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:212:21: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned hashkey_ = 0;
                    ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:216:27: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned creation_time_ = 1;
                          ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:217:18: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned hack_ = 0;
                 ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:218:21: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned old_size = 0;
                    ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:219:25: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned old_num_vars = 0;
                        ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:225:46: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned length_solution_period_and_flags_ = 0;
                                             ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:111:8: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
   for(auto i=0; i<32;i++){
       ^
12 warnings generated.
[ 23%] Building CXX object src/component_types/CMakeFiles/component_types.dir/component_archetype.cpp.o
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.cpp:8:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:13:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component.h:103:25: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned clauses_ofs_ = 0;
                        ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component.h:109:20: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  CacheEntryID id_ = 0;
                   ^
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.cpp:8:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:16:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:16:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:11:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:51:18: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  T *data_start_ = nullptr;
                 ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:52:8: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  T *p = nullptr;
       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:55:25: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned end_of_bits_ = 0;
                        ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:207:19: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned* data_ = nullptr;
                  ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:209:24: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  uint64_t* clhashkey_ = nullptr;
                       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:212:21: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned hashkey_ = 0;
                    ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:216:27: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned creation_time_ = 1;
                          ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:217:18: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned hack_ = 0;
                 ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:218:21: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned old_size = 0;
                    ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:219:25: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned old_num_vars = 0;
                        ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:225:46: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  unsigned length_solution_period_and_flags_ = 0;
                                             ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/base_packed_component.h:111:8: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
   for(auto i=0; i<32;i++){
       ^
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.cpp:8:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:16:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:16:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:95:20: warning: 
      comparison of integers of different signs: 'int' and 'const unsigned int'
      [-Wsign-compare]
    for (int i=0; i<hack_;i++){
                  ~^~~~~~
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:114:8: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  for (auto it = rComp.varsBegin() + 1; *it != varsSENTINEL; it++) {
       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:123:10: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
    for (auto jt = rComp.clsBegin() + 1; *jt != clsSENTINEL; jt++) {
         ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:162:8: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  for (auto it = rComp.varsBegin() + 1; *it != varsSENTINEL; it++)
       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:170:11: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
     for (auto jt = rComp.clsBegin() + 1; *jt != clsSENTINEL; jt++)
          ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:186:8: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  for (auto it = rComp.varsBegin() + 1; *it != varsSENTINEL; it++) {
       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:195:10: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
    for (auto jt = rComp.clsBegin() + 1; *jt != clsSENTINEL; jt++) {
         ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:232:8: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  for (auto it = rComp.varsBegin() + 1; *it != varsSENTINEL; it++)
       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:240:11: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
     for (auto jt = rComp.clsBegin() + 1; *jt != clsSENTINEL; jt++)
          ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:252:17: warning: 
      comparison of integers of different signs: 'int' and
      'std::__1::vector<void *, std::__1::allocator<void *> >::size_type'
      (aka 'unsigned long') [-Wsign-compare]
  for(int i=0; i<random.capacity();i++){
               ~^~~~~~~~~~~~~~~~~~
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.cpp:8:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:16:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:72:3: warning: 
      'const' type qualifier on return type has no effect [-Wignored-qualifiers]
  const CacheEntryID father() const {
  ^~~~~~
/Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:102:37: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  CacheEntryID next_bucket_element_ = 0;
                                    ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:107:24: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  CacheEntryID father_ = 0;
                       ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:108:34: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  CacheEntryID first_descendant_ = 0;
                                 ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:109:30: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
  CacheEntryID next_sibling_ = 0;
                             ^
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.cpp:8:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:165:10: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
    for (auto v_it = super_comp().varsBegin(); *v_it != varsSENTINEL;  v_it++)
         ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:174:10: warning: 
      'auto' type specifier is a C++11 extension [-Wc++11-extensions]
    for (auto it_cl = super_comp().clsBegin(); *it_cl != clsSENTINEL; it_cl++)
         ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:222:54: warning: 
      unused parameter 'ret_comp' [-Wunused-parameter]
void ComponentArchetype::createComponents(Component &ret_comp,
                                                     ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:223:26: warning: 
      unused parameter 'ret_cache_comp' [-Wunused-parameter]
      CacheableComponent ret_cache_comp,
                         ^
/Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:224:16: warning: 
      unused parameter 'stack_size' [-Wunused-parameter]
      unsigned stack_size){
               ^
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.cpp:8:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/component_archetype.h:16:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/cacheable_component.h:16:
In file included from /Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:13:
/Users/victorsmiller/Programming/Git/ganak/src/component_types/../clhash/clhash.h:68:63: error: 
      invalid application of 'sizeof' to an incomplete type 'void'
        return clhash(random_data_, (const char *)data, len * sizeof(T));
                                                              ^~~~~~~~~
/Users/victorsmiller/Programming/Git/ganak/src/component_types/difference_packed_component.h:254:22: note: 
      in instantiation of function template specialization
      'clhasher::operator()<void>' requested here
    clhashkey_[i] = h((void*)data_, sizeof(unsigned)*data_size);
                     ^
34 warnings and 1 error generated.
make[2]: *** [src/component_types/CMakeFiles/component_types.dir/component_archetype.cpp.o] Error 1
make[1]: *** [src/component_types/CMakeFiles/component_types.dir/all] Error 2
make: *** [all] Error 2
msoos commented 3 years ago

Hi,

So I tried go fix it. Can you please check?

Thanks,

Mate

ferhaterata commented 1 year ago

Hi,

It seems it doesn't work on M1?

/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/immintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
Consolidate compiler generated dependencies of target clhash
[  5%] Building C object src/clhash/CMakeFiles/clhash.dir/clhash.c.o
clang: warning: argument unused during compilation: '-msse4.1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mpclmul' [-Wunused-command-line-argument]
In file included from /Users/ferhat/git/ganak/src/clhash/clhash.c:6:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/x86intrin.h:15:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/immintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/ferhat/git/ganak/src/clhash/clhash.c:6:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/x86intrin.h:15:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/immintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/x86gprintrin.h:15:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/hresetintrin.h:42:27: error: invalid input constraint 'a' in asm
  __asm__ ("hreset $0" :: "a"(__eax));
                          ^
In file included from /Users/ferhat/git/ganak/src/clhash/clhash.c:6:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/x86intrin.h:15:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/immintrin.h:21:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:54:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:133:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:163:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:193:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:220:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:243:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:264:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:291:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:314:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:335:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:356:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:377:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:398:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:420:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:443:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:465:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/clhash/CMakeFiles/clhash.dir/clhash.c.o] Error 1
make[1]: *** [src/clhash/CMakeFiles/clhash.dir/all] Error 2
make: *** [all] Error 2
msoos commented 1 year ago

Hi,

First of all, thank you for the thorough reports! I have now pushed a fix in 49688254c3c15d9d2f4f3dfe0e2e2229deffc579. You can now compile with:

rm -rf build
mkdir build
cd build
cmake -DNOPCC=ON ...
make

You MUST delete your build directory. CMake is not amazing, and it will not re-build correctly if you just execute the cmake command. This will allow you to compile and run. However, as the name implies, it turns off probabilistic component caching (PCC). Sorry... a better fix is coming in the next months! I hope this fixes your issue! Please close this issue if it does :)

Thanks again for reporting,

Mate

msoos commented 1 year ago

Closing issue, since it seems to have fixed it, yay!