0

I want to install the HElib library (for which NTL is a dependency) on a remote machine on which I do not have root privileges, i.e. I cannot use "sudo make install" to install NTL. The NTL library is not installed in usr/local as per HElib's makefile.

LDLIBS = -L/usr/local/lib $(NTL) $(GMP) -lm

How can I install NTL without root privileges and how do I modify the Makefile in order for it to run?

Boiethios
  • 38,438
  • 19
  • 134
  • 183
Radwa Sherif
  • 61
  • 1
  • 9
  • typically when compiling prior to executing make you execute ./configure which in turn synthesizes a fresh Makefile particular to your needs ... examine file configure to see environment variable PREFIX or a similarly named var which often controls full pathname of install location ... then define configure mentioned env var prior to executing ./configure ... finally execute make to engage that fresh Makefile ... this compile pattern is very common across many libraries – Scott Stensland Jul 13 '17 at 11:07

1 Answers1

1

In NTL's makefile you can change the line:

DEF_PREFIX=/usr/local

to become

DEF_PREFIX=$(HOME)/dev

Then you should be able to set in HElib's Makefile:

LDLIBS = -L$(HOME)/dev/lib $(NTL) $(GMP) -lm

Replace dev with the path to your development folder in your $HOME directory.

Galik
  • 47,303
  • 4
  • 80
  • 117