alibaba-edu / mpc4j

Apache License 2.0
211 stars 42 forks source link

can't complie the SEAL #3

Closed zhifeng110 closed 1 year ago

zhifeng110 commented 2 years ago

Hi, I created a ubuntu: 20.04 container in Docker. I encountered this problem when executing "make". What can I do to solve it?

图片 图片

liuweiran900217 commented 2 years ago

Does the error occurs when compiling SEAL instead of mpc4j-native-fhe? Can you successfully install SEAL using apt-get install?

liuweiran900217 commented 2 years ago

As far as I understand, the error is related to libz.a. Can you try installing libz following the step shown in https://zoomadmin.com/HowToInstall/UbuntuPackage/libz-dev?

iF2007 commented 2 years ago

I believe this issue is not related to mpc4j. This should be a SEAL-related issue. One possible direction is to check libz-related problems.

iF2007 commented 2 years ago

DataTrust also uses SEAL-related modules of mpc4j, e.g. FHE-based asymmetric PSI, running in container environment. Therefore it is possible to build and run mpc4j in a container.

iF2007 commented 2 years ago

One possible solution is to download libz, then compile and install locally.

zhifeng110 commented 2 years ago

After I restart the container and delete the build directory, recompiling is OK。。。

shazi4399 commented 2 years ago

I'm with similar error (maybe complaining x64 libz.a not compatible),but I haven't solved it yet. image

liuweiran900217 commented 2 years ago

I'm with similar error (maybe complaining x64 libz.a not compatible),but I haven't solved it yet. image

It seems there are some linked libraries related to SEAL. If you1 have any problems installing SEAL based on the source code, we highly recommand using the command "apt-get install seal" to automatically install SEAL and related libraries. Please let me know if "apt-get install seal" works well.

shazi4399 commented 2 years ago

I'm with similar error (maybe complaining x64 libz.a not compatible),but I haven't solved it yet. image

It seems there are some linked libraries related to SEAL. If you1 have any problems installing SEAL based on the source code, we highly recommand using the command "apt-get install seal" to automatically install SEAL and related libraries. Please let me know if "apt-get install seal" works well.

I followed the guide to install seal on a new computer(Ubuntu18.04) and still get the same error. image

Then, I tried to install seal again as your suggested command sudo apt-get install SEAL or sudo apt-get install seal.But it shows that the installation package cannot be found. image

And, I tried to search for the existence of the SEAL installation package, but nothing was found image

liuweiran900217 commented 2 years ago

I am sorry for providing a wrong way of installing. It seems there are some problems when installing SEAL in Docker. Currently I cannot figure out why the problem occurs. Can you try installing SEAL without using Docker?

Besides, I think the problem is related to SEAL itself. Unfortunately, I cannot also find any related issues in the SEAL github project. It would be better if you can post an issue in the SEAL github.

husheng1997 commented 2 years ago

I'm with similar error (maybe complaining x64 libz.a not compatible),but I haven't solved it yet. image

It seems there are some linked libraries related to SEAL. If you1 have any problems installing SEAL based on the source code, we highly recommand using the command "apt-get install seal" to automatically install SEAL and related libraries. Please let me know if "apt-get install seal" works well.

I followed the guide to install seal on a new computer(Ubuntu18.04) and still get the same error. image

Then, I tried to install seal again as your suggested command sudo apt-get install SEAL or sudo apt-get install seal.But it shows that the installation package cannot be found. image

And, I tried to search for the existence of the SEAL installation package, but nothing was found image

We installed Ubuntu 22.04 on the terminal through “Docker pull ubuntu”,and installed SEAL through the following command: apt update apt install cmake apt install clang apt install git git clone https://github.com/microsoft/SEAL cd SEAL cmake -S . -B build -D CMAKE_CXX_COMPILER=/usr/bin/clang++ -D CMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_INSTALL_PREFIX=/usr/local cmake -S . -B build -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS_RELEASE="-O3" -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native" cmake --build build cmake --install build You can try and install SEAL through these commands.

shazi4399 commented 2 years ago

I'm with similar error (maybe complaining x64 libz.a not compatible),but I haven't solved it yet. image

It seems there are some linked libraries related to SEAL. If you1 have any problems installing SEAL based on the source code, we highly recommand using the command "apt-get install seal" to automatically install SEAL and related libraries. Please let me know if "apt-get install seal" works well.

I followed the guide to install seal on a new computer(Ubuntu18.04) and still get the same error. image Then, I tried to install seal again as your suggested command sudo apt-get install SEAL or sudo apt-get install seal.But it shows that the installation package cannot be found. image And, I tried to search for the existence of the SEAL installation package, but nothing was found image

We installed Ubuntu 22.04 on the terminal through “Docker pull ubuntu”,and installed SEAL through the following command: apt update apt install cmake apt install clang apt install git git clone https://github.com/microsoft/SEAL cd SEAL cmake -S . -B build -D CMAKE_CXX_COMPILER=/usr/bin/clang++ -D CMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_INSTALL_PREFIX=/usr/local cmake -S . -B build -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS_RELEASE="-O3" -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native" cmake --build build cmake --install build You can try and install SEAL through these commands.

Thank you! SEAL is successfully installed according to the method you provided.

liuweiran900217 commented 2 years ago

We checked our guidelines for installing SEAL and found that there are some errors. We reopen the issue now. After we update mpc4j for 1.0.5, you can see the updated documentation on how to install native libraries (including on the Docker image).

liuweiran900217 commented 1 year ago

Version 1.0.5 has been released. We updated README.md to show how to run mpc4j in Docker. The tests are passed on both MacBook (under x64_84 and M1) and Desktops (under x86_64). Close the issue.