intel / pailliercryptolib

Intel Paillier Cryptosystem Library is an open-source library which provides accelerated performance of a partial homomorphic encryption (HE), named Paillier cryptosystem, by utilizing Intel® IPP-Crypto on AVX512IFMA instructions. Intel Paillier Cryptosystem Library is certified for ISO compliance.
Apache License 2.0
73 stars 18 forks source link

errors building, installing & questions about docs #13

Closed phamductu closed 2 years ago

phamductu commented 2 years ago

Hi, thanks again for the library!

There are some errors that I encountered when trying to use the library, hope that you could help me! Thanks in advance! Some information about my environment first:

  1. This error occured when I tried to build the library by instructions from your repo:

    [ 81%] Built target ipcl
    gmake[2]: *** No rule to make target 'ext_gbenchmark/lib64/libbenchmark.a', needed by 'benchmark/bench_ipcl'.  Stop.
    gmake[2]: *** Waiting for unfinished jobs....
    [ 83%] Building CXX object test/CMakeFiles/unittest_ipcl.dir/test_cryptography.cpp.o
    [ 86%] Building CXX object test/CMakeFiles/unittest_ipcl.dir/main.cpp.o
    [ 90%] Building CXX object benchmark/CMakeFiles/bench_ipcl.dir/bench_cryptography.cpp.o
    [ 90%] Building CXX object benchmark/CMakeFiles/bench_ipcl.dir/main.cpp.o
    [ 93%] Building CXX object benchmark/CMakeFiles/bench_ipcl.dir/bench_ops.cpp.o
    [ 95%] Building CXX object test/CMakeFiles/unittest_ipcl.dir/test_ops.cpp.o
    gmake[1]: *** [CMakeFiles/Makefile2:324: benchmark/CMakeFiles/bench_ipcl.dir/all] Error 2
    gmake[1]: *** Waiting for unfinished jobs....
    [ 97%] Linking CXX executable unittest_ipcl
    [ 97%] Built target unittest_ipcl
    gmake: *** [Makefile:136: all] Error 2

    I turned off all the options in CMakeLists.txt (especially IPCL_BENCHMARK) and I built successfully.

  2. After turning off all the options, I tried to install the library with sudo cmake --install build. And this happened:

    CMake Error at /usr/local/lib/cmake/ipcl-1.1.3/IPCLConfig.cmake:31 (include):
    include could not find requested file:
    
    /usr/local/lib/cmake/ipcl-1.1.3/ipclTargets.cmake
    Call Stack (most recent call first):
    CMakeLists.txt:8 (find_package)

    Apparently, this is caused by the following line: include(${CMAKE_CURRENT_LIST_DIR}/ipclTargets.cmake) and it should be changed to include(${CMAKE_CURRENT_LIST_DIR}/IPCLTargets.cmake) (capitalized) This practice successed and I can use the library.

  3. Because I'm quite new to CMake stuffs, I only know one way to use the library for another repo is to install it like the above. Could you suggest to me how to use the library for another repo?

  4. Is there a document for the library? I can only find how to use the library (encrypt/decrypt/operations) by reading the test.

skmono commented 2 years ago

Hi @randoracle, thanks for the interest and reporting the issue with thorough details! We are currently investigating this and will get back to you ASAP.

skmono commented 2 years ago

Out of the 4 items, item 1 and 2, have been taken care of with PR #15. However, while testing 3 and working on 4, we discovered some unintended errors and raised it in #16.

We will close this issue and move it to #16.