microsoft / SEAL

Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.
https://www.microsoft.com/en-us/research/group/cryptography-research/
MIT License
3.62k stars 709 forks source link

No template named 'unique_lock‘ in namespace 'std', /native/src/seal/util/locks.h #674

Closed vesperlou closed 6 months ago

vesperlou commented 1 year ago

Hi, I tried to install SEAL version 3.6 following EVA's guidelines:

git clone -b v3.6.4 https://github.com/microsoft/SEAL.git
cd SEAL
cmake -DSEAL_THROW_ON_TRANSPARENT_CIPHERTEXT=OFF .
make -j
sudo make install

and encountered the following error

/SEAL/native/src/seal/util/locks.h:17:33: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
using WriterLock = std::unique_lock<std::shared_mutex>;

I fixed it by adding include <mutex> in locks.h. Is it the correct solution or did I mistake something elsewhere?

kimlaine commented 6 months ago

This is the correct way. It's already fixed in the new version of SEAL.