Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
PALISADE Development
PALISADE Development
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1
    • Merge Requests 1
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PALISADE
  • PALISADE DevelopmentPALISADE Development
  • Wiki
  • Build instructions

Last edited by Yuriy Polyakov Jul 21, 2020
Page history

Build instructions

We use CMake to build PALISADE. The high-level (platform-independent) procedure for building PALISADE is as follows:

  1. Install system prerequisites (if not already installed), including a C++ compiler with OMP support, cmake, make, and autoconf.

  2. Clone the PALISADE repo to your local machine.

  3. Download git submodules by running the following commands (PALISADE downloads submodules for cereal, google-benchmark, google-test, and gperftools open-source libraries):

git submodule sync --recursive
git submodule update --init  --recursive
  1. Create a directory where the binaries will be built. The typical choice is a subfolder "build". In this case, the commands are:
mkdir build
cd build
cmake ..

Note that CMake will check for any system dependencies that are needed for the build process. If the CMake build does not complete successfully, please review the errors CMake displays to determine any missing dependent components. If the error does not go away (even though you installed the dependency), try running "make clean" to clear the CMake cache.

  1. If you want to use any external libraries, such as NTL/GMP and tcmalloc (for maximum run-time performance), install these libraries (see Use of CMake in PALISADE).

  2. Build PALISADE by running the following command (this will take few minutes; using the -j make command-line flag is suggested to speed up the build, though our experience shows that systems with 8 GB or less ram may have difficulty with larger values of j).

make

If you want to build only library files or some other subset of PALISADE, please review the last paragraph of this page.

After the make completes, inside your specified "build" directory you should see all PALISADE library files in the "lib" folder, and other binaries as follows: demos in "bin/demo", benchmarks in "bin/benchmark", examples in "bin/examples" and unit tests in "unittest".

  1. Install PALISADE to a system directory (if desired or for production purposes)
make install

You would probably need to run sudo make install unless you are specifying some other install location that you have write permission for. You can change the install location by running cmake -DCMAKE_INSTALL_PREFIX=/your/path ... The header files are placed in the "include/palisade" folder of the specified path, and the binaries of the library are copied directly to the "lib" folder of the path. For example, if no installation path is provided in Ubuntu (and many other *nix-based OSes), the header and library binary files will be placed in "/usr/local/include/palisade" and "/usr/local/lib", respectively.

Testing and cleaning the build

Once you have built PALISADE (especially for the first time on a new system), we recommend testing.

  1. Run all unit tests to make sure all capabilities operate as expected
make testall

Note this will run all unit tests for all math backends specified in the initial CMake.

  1. Run some sample demos e.g.,
bin/examples/pke/simple-integers
bin/examples/pke/simple-real-numbers
bin/examples/pke/advanced-real-numbers

To remove the files built by make, you can execute

make clean
Clone repository
  • Build instructions
  • CI Documentation
  • Cross Compiling for ETTIS
  • Frequently Asked Questions
  • Home
  • How to rebase your branch from the master branch
  • Instructions for building PALISADE in Linux
  • Instructions for building PALISADE in Windows
  • Instructions for building PALISADE in macOS
  • Instructions for building user projects that use PALISADE
  • Known Issues
  • Library Directory Structure
  • PALISADE Contributors
  • PALISADE Programming Style Design Guide
  • Palisade Exceptions
View All Pages