Huelse / SEAL-Python

Microsoft SEAL 4.X For Python
MIT License
310 stars 66 forks source link

./SEAL/native/src/seal/util/locks.h:49:18: error: 'shared_mutex' is unavailable: introduced in macOS 10.12 #39

Closed demeen68 closed 3 years ago

demeen68 commented 3 years ago

I use macos 10.15.7, SEAL-Python3.3.2.1

when I run python setup.py build_ext -i in terminals, I get a error:

In file included from src/wrapper.cpp:6:
In file included from ./SEAL/native/src/seal/seal.h:6:
In file included from ./SEAL/native/src/seal/biguint.h:9:
In file included from ./SEAL/native/src/seal/memorymanager.h:11:
In file included from ./SEAL/native/src/seal/util/mempool.h:19:
./SEAL/native/src/seal/util/locks.h:15:50: error: 'shared_mutex' is unavailable: introduced in macOS 10.12
        using ReaderLock = std::shared_lock<std::shared_mutex>;
                                                 ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/shared_mutex:179:58: note: 'shared_mutex' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
                                                         ^
In file included from src/wrapper.cpp:6:
In file included from ./SEAL/native/src/seal/seal.h:6:
In file included from ./SEAL/native/src/seal/biguint.h:9:
In file included from ./SEAL/native/src/seal/memorymanager.h:11:
In file included from ./SEAL/native/src/seal/util/mempool.h:19:
./SEAL/native/src/seal/util/locks.h:17:50: error: 'shared_mutex' is unavailable: introduced in macOS 10.12
        using WriterLock = std::unique_lock<std::shared_mutex>;
                                                 ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/shared_mutex:179:58: note: 'shared_mutex' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
                                                         ^
In file included from src/wrapper.cpp:6:
In file included from ./SEAL/native/src/seal/seal.h:6:
In file included from ./SEAL/native/src/seal/biguint.h:9:
In file included from ./SEAL/native/src/seal/memorymanager.h:11:
In file included from ./SEAL/native/src/seal/util/mempool.h:19:
./SEAL/native/src/seal/util/locks.h:49:18: error: 'shared_mutex' is unavailable: introduced in macOS 10.12
            std::shared_mutex rw_lock_mutex_{};
                 ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/shared_mutex:179:58: note: 'shared_mutex' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
                                                         ^

And according to Apple dev presentation the shared_timed_mutex will be available starting with macOS 10.12

Huelse commented 3 years ago

Have you built the SEAL lib at first? It seems that your xcode or clang compiler version is out of date.