intel / pailliercryptolib_python

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 technologies on Intel CPUs supporting the AVX512IFMA instructions. The library is written in modern standard C++ and provides the essential API for the Paillier cryptosystem scheme. Intel Paillier Cryptosystem Library - Python is a Python extension package intended for Python based privacy preserving machine learning solutions which utilizes the partial HE scheme for increased data and model protection.
Apache License 2.0
55 stars 12 forks source link

Error while compiling and installing the package #39

Closed Deepthiappasani closed 1 year ago

Deepthiappasani commented 1 year ago

Here is the error message: Building wheels for collected packages: ipcl-python Building wheel for ipcl-python (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [230 lines of output] running bdist_wheel running build running build_py running build_ext -- CMAKE_BUILD_TYPE: Release -- CMAKE_C_COMPILER: /usr/bin/cc -- CMAKE_CXX_COMPILER: /usr/bin/c++ -- IPCL_PYTHON_TEST: ON -- IPCL_PYTHON_DOCS: OFF -- IPCL_PYTHON_DETECT_CPU_RUNTIME: ON -- IPCL_PYTHON_ENABLE_OMP: OFF -- IPCL_PYTHON_ENABLE_QAT: ON -- IPCL_BINDINGS_SRCS_DIR: /home/deepthi/FHE/experiment/pailliercryptolib_python/src/ipcl_python/bindings -- Configuring Intel Paillier Cryptosystem Library CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-subbuild/CMakeLists.txt.tmp CMake Error: : System Error: Permission denied CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:891 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) /usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate) lib/ipcl.cmake:35 (FetchContent_MakeAvailable) CMakeLists.txt:85 (include)

  -- Detecting QAT......
  CMake Warning at build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/ipcl/ipcl-util.cmake:78 (message):
    Environment variable ICP_ROOT must be defined - IPCL_ENABLE_QAT set to OFF
  Call Stack (most recent call first):
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:98 (ipcl_detect_qat)

  -- CMAKE_BUILD_TYPE:           Release
  -- CMAKE_C_COMPILER:           /usr/bin/cc
  -- CMAKE_CXX_COMPILER:         /usr/bin/c++
  -- CMAKE_INSTALL_PREFIX:       /usr/local
  -- CMAKE_PREFIX_PATH:          /home/deepthi/intel;/opt/intel
  -- IPCL_TEST:                  OFF
  -- IPCL_BENCHMARK:             OFF
  -- IPCL_ENABLE_OMP:            OFF
  -- IPCL_ENABLE_QAT:            OFF
  -- IPCL_THREAD_COUNT:          IGNORE
  -- IPCL_DOCS:                  OFF
  -- IPCL_SHARED:                ON
  -- IPCL_DETECT_CPU_RUNTIME:    ON
  -- IPCL_INTERNAL_PYTHON_BUILD: ON
  -- Configuring ipp-crypto
  CMake Warning at build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/ippcrypto.cmake:16 (find_package):
    By not providing "Findippcp.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "ippcp", but
    CMake did not find one.

    Could not find a package configuration file provided by "ippcp" (requested
    version 11.4) with any of the following names:

      ippcpConfig.cmake
      ippcp-config.cmake

    Add the installation prefix of "ippcp" to CMAKE_PREFIX_PATH or set
    "ippcp_DIR" to a directory containing one of the above files.  If "ippcp"
    provides a separate development package or SDK, be sure it has been
    installed.
  Call Stack (most recent call first):
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:214 (include)

  -- IPP-Crypto NOT found - building from source
  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_ipp-crypto/src/ext_ipp-crypto-stamp/ext_ipp-crypto-gitinfo.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2466 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3236 (_ep_add_download_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/ippcrypto.cmake:49 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:214 (include)

  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:1110 (file):
    file failed to open for writing (Permission denied):

      /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_ipp-crypto/tmp/ext_ipp-crypto-gitclone.cmake
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2479 (_ep_write_gitclone_script)
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3236 (_ep_add_download_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/ippcrypto.cmake:49 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:214 (include)

  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_ipp-crypto/tmp/ext_ipp-crypto-cfgcmd.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2981 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3239 (_ep_add_configure_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/ippcrypto.cmake:49 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:214 (include)

  -- Configuring cereal
  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_cereal/src/ext_cereal-stamp/ext_cereal-gitinfo.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2466 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3236 (_ep_add_download_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/cereal.cmake:10 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:215 (include)

  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:1110 (file):
    file failed to open for writing (Permission denied):

      /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_cereal/tmp/ext_cereal-gitclone.cmake
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2479 (_ep_write_gitclone_script)
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3236 (_ep_add_download_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/cereal.cmake:10 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:215 (include)

  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_cereal/tmp/ext_cereal-cfgcmd.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2981 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3239 (_ep_add_configure_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/cereal.cmake:10 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:215 (include)

  -- Configuring cpu_features
  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_cpufeatures/src/ext_cpufeatures-stamp/ext_cpufeatures-gitinfo.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2466 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3236 (_ep_add_download_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/cpufeatures.cmake:13 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:218 (include)

  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:1110 (file):
    file failed to open for writing (Permission denied):

      /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_cpufeatures/tmp/ext_cpufeatures-gitclone.cmake
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2479 (_ep_write_gitclone_script)
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3236 (_ep_add_download_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/cpufeatures.cmake:13 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:218 (include)

  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ext_cpufeatures/tmp/ext_cpufeatures-cfgcmd.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2981 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3239 (_ep_add_configure_command)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/cpufeatures.cmake:13 (ExternalProject_Add)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/CMakeLists.txt:218 (include)

  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-build/ipcl/cmake/ipcl-2.0.0/IPCLConfigVersion.cmake.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/WriteBasicConfigVersionFile.cmake:49 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/CMakePackageConfigHelpers.cmake:225 (write_basic_config_version_file)
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/ipcl/CMakeLists.txt:154 (write_basic_package_version_file)

  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/ipcl-src/cmake/ipcl-2.0.0/IPCLConfig.cmake.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/CMakePackageConfigHelpers.cmake:330 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    build/temp.linux-x86_64-3.8/_deps/ipcl-src/ipcl/CMakeLists.txt:160 (configure_package_config_file)

  CMake Error: Could not open file for write in copy operation /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/_deps/pybind11-subbuild/CMakeLists.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:891 (configure_file):
    configure_file Problem configuring file
  Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
    /usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate)
    lib/pybind11.cmake:11 (FetchContent_MakeAvailable)
    CMakeLists.txt:86 (include)

  -- pybind11 v2.11.0 dev1
  -- Configuring incomplete, errors occurred!
  See also "/home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
  See also "/home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeError.log".
  CMake Error: Cannot open file for write: /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/CMakeCache.txt.tmp
  CMake Error: : System Error: Permission denied
  CMake Error: Unable to open cache file for save. /home/deepthi/FHE/experiment/pailliercryptolib_python/build/temp.linux-x86_64-3.8/CMakeCache.txt
  CMake Error: : System Error: Permission denied
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/home/deepthi/FHE/experiment/pailliercryptolib_python/setup.py", line 68, in <module>
      setup(
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/deepthi/FHE/experiment/pailliercryptolib_python/setup.py", line 32, in run
      self.build_extension(ext)
    File "/home/deepthi/FHE/experiment/pailliercryptolib_python/setup.py", line 60, in build_extension
      subprocess.check_call(
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/home/deepthi/FHE/experiment/pailliercryptolib_python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/deepthi/FHE/experiment/pailliercryptolib_python/build/lib.linux-x86_64-3.8/ipcl_python/bindings/', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DIPCL_PYTHON_ENABLE_QAT=ON', '-DIPCL_PYTHON_DETECT_CPU_RUNTIME=ON', '-DIPCL_PYTHON_ENABLE_OMP=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ipcl-python Running setup.py clean for ipcl-python Failed to build ipcl-python ERROR: Could not build wheels for ipcl-python, which is required to install pyproject.toml-based projects

fangxiaoran commented 1 year ago

Hi @Deepthiappasani, thanks for asking. It seems you don't have write permission on the build path /home/deepthi/FHE/experiment/pailliercryptolib_python/build/. Can you confirm it?

fangxiaoran commented 1 year ago

This issue was closed because it has been inactive for more than 30 days.