If your copy of palisade does NOT include the distros for gmp and ntl (located in third-party/distros) you need to download and place the distributions in that directory. The gmp uses a compression scheme that is not always found on all systems so:
Additionally, on both ubuntu and centos 7 you will need to install m4
sudo apt-get install m4
sudo yum install m4
One can unpack, build, test, and install gmp with one command from the palisade root directory
make -f Makefile.gmp
Please note, this may take a while to complete. Please make sure that the output of the tests all Pass completely before proceeding.
One can redo any particular step of the unpack-build-teset-install process by make -f Makefile.gmp gmp_xxx
where gmp_xxx is one of
`gmp_unpack gmp_config gmp_make gmp_check gmp_install
make -f Makefile.gmp clean_gmp will remove all traces of the install
Installing and configuring NTL for Palisade
As with gmp, one can unpack, build, test, and install NTL with one command from the palisade root directory
make -f Makefile.ntl
Please note that this takes a VERY LONG TIME to complete. Make sure that the output of the tests all Pass completely before proceeding.
One can redo any particular step by make -f Makefile.ntl ntl_xxx
where ntl_xxx is one of
`ntl_unpack ntl_config ntl_make ntl_check ntl_install
make -f Makefile.ntl clean_ntl will remove all traces of the install
Not that the default configuration for palisade are NTL_THREADS=on, NTL_THREAD_BOOST=on, NTL_EXCEPTIONS=on, SHARED=on
This is set automatically in the make process above.
Also, make sure the .so file is in your path. You can add it to your path by customizing the command
sudo ldconfig /home/palisade/Documents/palisade/student-edition/bin/lib/ /home/palisade/Documents/palisade/student-edition/third-party/lib/
to reflect your actual repo location on your machine. You may need to rerun this operation every time you reboot.
Note the following information has not been updated recently and may be stale
If you use Eclipse then you should add added the path third-party to eclipse project properties->"C/C++ General"->"Paths and Symbols".
Configuring Palisade with the GMP NTL backend
Edit src/core/lib/math/backend.h comment out the line
#define MATHBACKEND 2
and uncomment the line
// #define MATHBACKEND 6
Or use one of the automated build scripts recently introduced.
Remove the old palisade build by cd to the palisade repo root, and typing
To remake the build using the chosen backend. Note that gmp and ntl should not need to be rebuilt by this step.