Thursday, November 24, 2022

[How To] Install SEAL Python on a Raspberry Pi


Follow this tutorial to install Microsoft SEAL 4.X for Python on a Raspberry Pi 3 device. You can follow the same commands to install it on any other Linux machine. I have copied the output for each command for your reference.

$ uname -a
Linux raspberrypi 5.15.76-v7+ #1597 SMP Fri Nov 4 12:13:17 GMT 2022 armv7l GNU/Linux

$ sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt-get install git build-essential cmake python3 python3-dev python3-pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9).
git is already the newest version (1:2.30.2-1).
python3 is already the newest version (3.9.2-3).
python3-dev is already the newest version (3.9.2-3).
python3-dev set to manually installed.
cmake is already the newest version (3.18.4-2+rpt1+rpi1+deb11u1).
python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Cloning into 'SEAL-Python'...
remote: Enumerating objects: 1623, done.
remote: Counting objects: 100% (247/247), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 1623 (delta 174), reused 188 (delta 161), pack-reused 1376
Receiving objects: 100% (1623/1623), 8.68 MiB | 7.14 MiB/s, done.
Resolving deltas: 100% (880/880), done.

$ cd SEAL-Python

$ pip3 install numpy pybind11
Requirement already satisfied: numpy in /home/pi/.local/lib/python3.9/site-packages (1.21.0)
Collecting pybind11
     |████████████████████████████████| 216 kB 391 kB/s 
Installing collected packages: pybind11
Successfully installed pybind11-2.10.1

$ git submodule update --init --recursive
Submodule 'SEAL' (https://github.com/microsoft/SEAL.git) registered for path 'SEAL'
Submodule 'pybind11' (https://github.com/pybind/pybind11.git) registered for path 'pybind11'
Cloning into '/home/pi/Documents/SEAL-Python/SEAL'...
Cloning into '/home/pi/Documents/SEAL-Python/pybind11'...
Submodule path 'SEAL': checked out '82b07db635132e297282649e2ab5908999089ad2'
Submodule path 'pybind11': checked out '0ba639d6177659c5dc2955ac06ad7b5b0d22e05c'

$ cd  SEAL

$ cmake -S . -B build -DSEAL_USE_MSGSL=OFF
-- Build type (CMAKE_BUILD_TYPE): Release
-- Microsoft SEAL debug mode: OFF
-- SEAL_USE_CXX17: ON
-- SEAL_BUILD_DEPS: ON
-- SEAL_USE_MSGSL: OFF
-- SEAL_USE_ZLIB: ON
-- ZLIB: download ...
-- SEAL_USE_ZSTD: ON
-- Zstandard: download ...
-- ZSTD VERSION: 1.4.5
-- CMAKE_INSTALL_PREFIX: /usr/local
-- CMAKE_INSTALL_LIBDIR: lib/arm-linux-gnueabihf
-- ZSTD_LEGACY_SUPPORT not defined!
-- ZSTD_MULTITHREAD_SUPPORT is disabled
-- SEAL_USE_INTEL_HEXL: OFF
-- BUILD_SHARED_LIBS: OFF
-- SEAL_THROW_ON_TRANSPARENT_CIPHERTEXT: ON
-- SEAL_USE_GAUSSIAN_NOISE: OFF
-- SEAL_DEFAULT_PRNG: Blake2xb
-- SEAL_AVOID_BRANCHING: OFF
-- SEAL_USE_INTRIN: OFF
-- SEAL_USE_MEMSET_S: OFF
-- SEAL_USE_EXPLICIT_BZERO: ON
-- SEAL_USE_EXPLICIT_MEMSET: OFF
-- SEAL_BUILD_SEAL_C: OFF
-- SEAL_BUILD_EXAMPLES: OFF
-- SEAL_BUILD_TESTS: OFF
-- SEAL_BUILD_BENCH: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/Documents/SEAL-Python/SEAL/build

$ cmake --build build
[ 36%] Built target libzstd_static
[ 55%] Built target zlibstatic
Scanning dependencies of target seal
[ 56%] Building CXX object CMakeFiles/seal.dir/native/src/seal/batchencoder.cpp.o
[ 58%] Building CXX object CMakeFiles/seal.dir/native/src/seal/ciphertext.cpp.o
[ 59%] Building CXX object CMakeFiles/seal.dir/native/src/seal/ckks.cpp.o
[ 60%] Building CXX object CMakeFiles/seal.dir/native/src/seal/context.cpp.o
[ 62%] Building CXX object CMakeFiles/seal.dir/native/src/seal/decryptor.cpp.o
[ 63%] Building CXX object CMakeFiles/seal.dir/native/src/seal/encryptionparams.cpp.o
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/encryptionparams.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/encryptionparams.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {}; _Tp = seal::Modulus; _Alloc = std::allocator<seal::Modulus>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Modulus>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void seal::EncryptionParameters::load_members(std::istream&, seal::SEALVersion)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Modulus*, std::vector<seal::Modulus> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 63%] Building CXX object CMakeFiles/seal.dir/native/src/seal/encryptor.cpp.o
[ 64%] Building CXX object CMakeFiles/seal.dir/native/src/seal/evaluator.cpp.o
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/encryptionparams.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/context.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/ciphertext.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/evaluator.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/evaluator.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {seal::Ciphertext}; _Tp = seal::Ciphertext; _Alloc = std::allocator<seal::Ciphertext>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Ciphertext>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const seal::Ciphertext&}; _Tp = seal::Ciphertext; _Alloc = std::allocator<seal::Ciphertext>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Ciphertext>::iterator’ changed in GCC 7.1
/usr/include/c++/10/bits/vector.tcc: In member function ‘void seal::Evaluator::multiply_many(const std::vector<seal::Ciphertext>&, const seal::RelinKeys&, seal::Ciphertext&, seal::MemoryPoolHandle) const’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Ciphertext*, std::vector<seal::Ciphertext> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Ciphertext*, std::vector<seal::Ciphertext> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Ciphertext*, std::vector<seal::Ciphertext> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 65%] Building CXX object CMakeFiles/seal.dir/native/src/seal/keygenerator.cpp.o
[ 67%] Building CXX object CMakeFiles/seal.dir/native/src/seal/kswitchkeys.cpp.o
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/encryptionparams.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/kswitchkeys.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/kswitchkeys.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {seal::PublicKey}; _Tp = seal::PublicKey; _Alloc = std::allocator<seal::PublicKey>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::PublicKey>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void seal::KSwitchKeys::load_members(const seal::SEALContext&, std::istream&, seal::SEALVersion)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::PublicKey*, std::vector<seal::PublicKey> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘seal::KSwitchKeys& seal::KSwitchKeys::operator=(const seal::KSwitchKeys&)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::PublicKey*, std::vector<seal::PublicKey> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 68%] Building CXX object CMakeFiles/seal.dir/native/src/seal/memorymanager.cpp.o
[ 69%] Building CXX object CMakeFiles/seal.dir/native/src/seal/modulus.cpp.o
In file included from /usr/include/c++/10/vector:72,
                 from /usr/include/c++/10/functional:62,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/serialization.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/modulus.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/modulus.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {seal::Modulus&}; _Tp = seal::Modulus; _Alloc = std::allocator<seal::Modulus>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Modulus>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static std::vector<seal::Modulus> seal::CoeffModulus::Create(size_t, std::vector<int>)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Modulus*, std::vector<seal::Modulus> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static std::vector<seal::Modulus> seal::CoeffModulus::Create(size_t, const seal::Modulus&, std::vector<int>)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Modulus*, std::vector<seal::Modulus> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 70%] Building CXX object CMakeFiles/seal.dir/native/src/seal/plaintext.cpp.o
[ 72%] Building CXX object CMakeFiles/seal.dir/native/src/seal/randomgen.cpp.o
[ 73%] Building CXX object CMakeFiles/seal.dir/native/src/seal/serialization.cpp.o
[ 73%] Building CXX object CMakeFiles/seal.dir/native/src/seal/valcheck.cpp.o
[ 74%] Building C object CMakeFiles/seal.dir/native/src/seal/util/blake2b.c.o
[ 75%] Building C object CMakeFiles/seal.dir/native/src/seal/util/blake2xb.c.o
[ 77%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/clipnormal.cpp.o
[ 78%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/common.cpp.o
[ 79%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/croots.cpp.o
[ 81%] Building C object CMakeFiles/seal.dir/native/src/seal/util/fips202.c.o
[ 82%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/globals.cpp.o
[ 82%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/galois.cpp.o
[ 83%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/hash.cpp.o
[ 84%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/iterator.cpp.o
[ 86%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/mempool.cpp.o
[ 87%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/numth.cpp.o
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator<long long unsigned int>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<long long unsigned int>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {seal::Modulus}; _Tp = seal::Modulus; _Alloc = std::allocator<seal::Modulus>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Modulus>::iterator’ changed in GCC 7.1
/usr/include/c++/10/bits/vector.tcc: In function ‘std::vector<seal::Modulus> seal::util::get_primes(uint64_t, int, size_t)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Modulus*, std::vector<seal::Modulus> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {long long unsigned int}; _Tp = long long unsigned int; _Alloc = std::allocator<long long unsigned int>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<long long unsigned int>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/stl_vector.h: In function ‘void seal::util::babystep_giantstep(uint64_t, std::vector<long long unsigned int>&, std::vector<long long unsigned int>&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In function ‘std::vector<long long unsigned int> seal::util::multiplicative_orders(std::vector<long long unsigned int>, uint64_t)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In function ‘std::vector<long long unsigned int> seal::util::conjugate_classes(uint64_t, uint64_t)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/globals.h:10,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/memorymanager.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.h:6,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/numth.cpp:4:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
[ 88%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/polyarithsmallmod.cpp.o
[ 89%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/rlwe.cpp.o
[ 91%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/rns.cpp.o
In file included from /usr/include/c++/10/vector:72,
                 from /usr/include/c++/10/functional:62,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/common.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/rns.cpp:4:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const seal::Modulus&}; _Tp = seal::Modulus; _Alloc = std::allocator<seal::Modulus>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Modulus>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from /usr/include/c++/10/functional:62,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/common.h:7,
                 from /home/pi/Documents/SEAL-Python/SEAL/native/src/seal/util/rns.cpp:4:
/usr/include/c++/10/bits/stl_vector.h: In member function ‘void seal::util::RNSTool::initialize(size_t, const seal::util::RNSBase&, const seal::Modulus&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Modulus*, std::vector<seal::Modulus> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
[ 91%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/scalingvariant.cpp.o
[ 92%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/ntt.cpp.o
[ 93%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/streambuf.cpp.o
[ 94%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/uintarith.cpp.o
[ 96%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/uintarithmod.cpp.o
[ 97%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/uintarithsmallmod.cpp.o
[ 98%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/uintcore.cpp.o
[100%] Building CXX object CMakeFiles/seal.dir/native/src/seal/util/ztools.cpp.o
[100%] Linking CXX static library lib/libseal-4.0.a
[100%] Built target seal

$ cd ..

$ python3 setup.py build_ext -i
running build_ext
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'seal' extension
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION_INFO=4.0.0 -I/usr/include/python3.9 -Ipybind11/include -ISEAL/native/src -ISEAL/build/native/src -I/home/pi/.local/lib/python3.9/site-packages/pybind11/include -I/usr/include/python3.9 -c src/wrapper.cpp -o build/temp.linux-armv7l-3.9/src/wrapper.o -std=c++17 -fvisibility=hidden -g0 -std=c++17
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In member function ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::_M_erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/10/bits/vector.tcc:171:5: note: parameter passing for argument of type ‘std::vector<double>::iterator’ changed in GCC 7.1
  171 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::_M_erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>]’:
/usr/include/c++/10/bits/vector.tcc:171:5: note: parameter passing for argument of type ‘std::vector<long long int>::iterator’ changed in GCC 7.1
  171 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long int&}; _Tp = long long int; _Alloc = std::allocator<long long int>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<long long int>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::initimpl::factory<Func, pybind11::detail::void_type (*)(), Return(Args ...)>::execute<pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > >, {}>::<lambda(pybind11::detail::value_and_holder&, const pybind11::buffer&)>, void, {pybind11::detail::value_and_holder&, const pybind11::buffer&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::initimpl::factory<Func, pybind11::detail::void_type (*)(), Return(Args ...)>::execute<pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > >, {}>::<lambda(pybind11::detail::value_and_holder&, const pybind11::buffer&)>, void, {pybind11::detail::value_and_holder&, const pybind11::buffer&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, const pybind11::slice&)>, void, {std::vector<double, std::allocator<double> >&, const pybind11::slice&}, {pybind11::name, pybind11::is_method, pybind11::sibling, char [42]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, const pybind11::slice&)>, void, {std::vector<long long int, std::allocator<long long int> >&, const pybind11::slice&}, {pybind11::name, pybind11::is_method, pybind11::sibling, char [42]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(const std::vector<double>&, const pybind11::slice&)>, std::vector<double>*, {const std::vector<double, std::allocator<double> >&, const pybind11::slice&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [44]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(const std::vector<long long int>&, const pybind11::slice&)>, std::vector<long long int>*, {const std::vector<long long int, std::allocator<long long int> >&, const pybind11::slice&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [44]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, DiffType)>, long long int, {std::vector<long long int, std::allocator<long long int> >&, int}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [42]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, DiffType)>, double, {std::vector<double, std::allocator<double> >&, int}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [42]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, DiffType)>, void, {std::vector<double, std::allocator<double> >&, int}, {pybind11::name, pybind11::is_method, pybind11::sibling, char [40]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, DiffType)>, void, {std::vector<long long int, std::allocator<long long int> >&, int}, {pybind11::name, pybind11::is_method, pybind11::sibling, char [40]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {double}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {long long int}; _Tp = long long int; _Alloc = std::allocator<long long int>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<long long int>::iterator’ changed in GCC 7.1
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<long long int>::iterator’ changed in GCC 7.1
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, DiffType, const T&)>, void, {std::vector<double, std::allocator<double> >&, int, const double&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg, char [36]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/vector.tcc:161:19: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
  161 |  _M_realloc_insert(begin() + (__position - cbegin()), __x);
      |  ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_if_equal_operator<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, const T&)>, void, {std::vector<double, std::allocator<double> >&, const double&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [95]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, const pybind11::iterable&)>, void, {std::vector<double, std::allocator<double> >&, const pybind11::iterable&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [61]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::initimpl::factory<Func, pybind11::detail::void_type (*)(), Return(Args ...)>::execute<pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > >, {}>::<lambda(pybind11::detail::value_and_holder&, const pybind11::iterable&)>, void, {pybind11::detail::value_and_holder&, const pybind11::iterable&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<double>, pybind11::class_<std::vector<double>, std::unique_ptr<std::vector<double, std::allocator<double> >, std::default_delete<std::vector<double, std::allocator<double> > > > > >::<lambda(std::vector<double>&, const T&)>, void, {std::vector<double, std::allocator<double> >&, const double&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [35]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, DiffType, const T&)>, void, {std::vector<long long int, std::allocator<long long int> >&, int, const long long int&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg, char [36]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/vector.tcc:161:19: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
  161 |  _M_realloc_insert(begin() + (__position - cbegin()), __x);
      |  ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_if_equal_operator<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, const T&)>, void, {std::vector<long long int, std::allocator<long long int> >&, const long long int&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [95]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1431:24: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1431 |       { return _M_erase(begin() + (__position - cbegin())); }
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, const pybind11::iterable&)>, void, {std::vector<long long int, std::allocator<long long int> >&, const pybind11::iterable&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [61]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::initimpl::factory<Func, pybind11::detail::void_type (*)(), Return(Args ...)>::execute<pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > >, {}>::<lambda(pybind11::detail::value_and_holder&, const pybind11::iterable&)>, void, {pybind11::detail::value_and_holder&, const pybind11::iterable&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In static member function ‘static pybind11::handle pybind11::cpp_function::initialize<pybind11::detail::vector_modifiers<std::vector<long long int>, pybind11::class_<std::vector<long long int>, std::unique_ptr<std::vector<long long int, std::allocator<long long int> >, std::default_delete<std::vector<long long int, std::allocator<long long int> > > > > >::<lambda(std::vector<long long int>&, const T&)>, void, {std::vector<long long int, std::allocator<long long int> >&, const long long int&}, {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, char [35]}>::<lambda(pybind11::detail::function_call&)>::_FUN(pybind11::detail::function_call&)’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const seal::Modulus&}; _Tp = seal::Modulus; _Alloc = std::allocator<seal::Modulus>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Modulus>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In member function ‘bool pybind11::detail::list_caster<Type, Value>::load(pybind11::handle, bool) [with Type = std::vector<seal::Modulus>; Value = seal::Modulus]’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Modulus*, std::vector<seal::Modulus> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:72,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const seal::Ciphertext&}; _Tp = seal::Ciphertext; _Alloc = std::allocator<seal::Ciphertext>]’:
/usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type ‘std::vector<seal::Ciphertext>::iterator’ changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/vector:67,
                 from pybind11/include/pybind11/detail/../detail/common.h:255,
                 from pybind11/include/pybind11/detail/../attr.h:13,
                 from pybind11/include/pybind11/detail/class.h:12,
                 from pybind11/include/pybind11/pybind11.h:13,
                 from src/wrapper.cpp:1:
/usr/include/c++/10/bits/stl_vector.h: In member function ‘bool pybind11::detail::list_caster<Type, Value>::load(pybind11::handle, bool) [with Type = std::vector<seal::Ciphertext>; Value = seal::Ciphertext]’:
/usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<seal::Ciphertext*, std::vector<seal::Ciphertext> >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
creating build/lib.linux-armv7l-3.9
arm-linux-gnueabihf-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.9/src/wrapper.o SEAL/build/lib/libseal-4.0.a SEAL/build/lib/libz.a SEAL/build/lib/libzstd.a -o build/lib.linux-armv7l-3.9/seal.cpython-39-arm-linux-gnueabihf.so
copying build/lib.linux-armv7l-3.9/seal.cpython-39-arm-linux-gnueabihf.so ->

$ cp seal.cpython-39-arm-linux-gnueabihf.so examples

$ cd examples

$ python3 4_bgv_basics.py
Plaintext matrix row size: 4096.0
noise budget in freshly encrypted x: 145
--------------------------------------------------
size of x_squared: 3
size of x_squared (after relinearization): 2
noise budget in x_squared: 109 bits
[ 1, 4, 9, 16, 0, 0, 0, 0, ... ]
--------------------------------------------------
size of x_4th: 3
size of x_4th (after relinearization): 2
noise budget in x_4th: 34 bits
[ 1, 16, 81, 256, 0, 0, 0, 0, ... ]
--------------------------------------------------
size of x_8th: 3
size of x_8th (after relinearization): 2
noise budget in x_8th: 0 bits
[ -143894, -258397, -231296, 214702, -352484, 369502, 412973, 291979, ... ]
run out of noise budget
----------------------------------------------------------------------------------------------------
noise budget in freshly encrypted x: 145
--------------------------------------------------
size of x_squared: 3
noise budget in x_squared (with modulus switching): 101 bits
[ 1, 4, 9, 16, 0, 0, 0, 0, ... ]
--------------------------------------------------
size of x_4th: 3
size of x_4th (after relinearization): 2
noise budget in x_4th (with modulus switching): 58 bits
[ 1, 16, 81, 256, 0, 0, 0, 0, ... ]
--------------------------------------------------
size of x_8th: 3
size of x_8th (after relinearization): 2
noise budget in x_8th (with modulus switching): 14 bits
[ 1, 256, 6561, 65536, 0, 0, 0, 0, ... ]

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.