The problem I am having is installing NTL with GMP on my mac (Sierra).
These are the steps I have taken following this tutorial
1) I downloaded Unix: ntl-10.3.0.tar.gz
2) double clicked file to create the ntl-10.3.0.tar.gz folder in my downloads
3)
cd ~/Downloads/ntl-10.3.0/src
./configure
make
This gives me an error, because I guess I didn’t have GMP installed yet:
gen_gmp_aux.cpp:26:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
4) There are instructions on this page that describe how to install GMP
5) I download gmp-6.1.2.tar.lz from here. (Not that it matters but notice the extension is different in the instructions … I’m mentioning everything just in case)
6) I find out that .lz extensions need the lzip command:
7)
brew install lzip
cd ~/Downloads
lzip -d gmp-6.1.2.tar.lz
tar -xf gmp-6.1.2.tar
cd gmp-6.1.2
8)
Note: Reading the instructions, I don’t configure with —prefix=$HOME/sw because I want it installed in the /usr/local directory, not my home directory
./configure
make
make check
No errors come up, every thing is green and says ‘passed’
9)
make install
10)
Back to NTL
cd ~/Downloads/ntl-10.3.0/src/
make
I get the same error as before:
gen_gmp_aux.cpp:26:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
11)
I look in my directory
ls -la /usr/local/include/
and found gmp.h there where it should be
12)
I create a simple .cpp file to test it (basically just main with the associated include)
g++ someFile.cpp -lgmp
with this at the top
#include <gmp.h>
and it doesn’t seem to find it, same fatal error message.
Other people seem to have run into this issue also (all I could find was years ago) one of the guys did this:
brew uninstall gmp
brew install gmp
Following suit, I also did, then tried making the NTL again and it still doesn’t work…
I know I can put a flag in to not use GMP in the build:
You can also supply the option --disable-shared to the configure script, if you only want static libraries. However, if you ultimately want to build NTL as a shared library, then you must also buld GMP as a shared library.
but I would really like to.
What am I doing wrong? any suggestions?
I thought about sending a bug report, but I don't think it's a bug, it's with my configuration.