ChanBan
ChanBan

Reputation: 41

Version number mismatch: inconsistency between gmp.h and libgmp

I was trying to install NTL library on ubuntu, and after using "make", I get this error :

GMP version check (6.0.0/6.1.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
makefile:346: recipe for target 'setup3' failed
make[1]: *** [setup3] Error 134
make[1]: Leaving directory '/mnt/c/Users/pc-admin/ntl-11.0.0/ntl-11.0.0/src'
makefile:310: recipe for target 'setup-phase' failed
make: *** [setup-phase] Error 2

I saw the posts

https://gmplib.org/list-archives/gmp-discuss/2009-March/003663.html

http://www.mpfr.org/faq.html#undef_ref1

But still that didnt quite help. Currently my usr/local/lib has

XXX@SECURE2:/usr/local/lib$ ls
libgmp.a   libgmp.so     libgmp.so.23.0.3  libmpfr.la  libmpfr.so.6      libmpir.a   libmpir.so     libmpir.so.23.0.3  python3.5
libgmp.la  libgmp.so.23  libmpfr.a         libmpfr.so  libmpfr.so.6.0.1  libmpir.la  libmpir.so.23  pkgconfig

and /usr/local/include has

XXX@SECURE2:/usr/local/include$ ls
gmp.h  mpf2mpfr.h  mpfr.h  mpir.h

Tried changing environment paths as

C_INCLUDE_PATH=usr/local/include
LIBRARY_PATH=usr/local/lib
LD_LIBRARY_PATH=usr/local/lib

Somehow I don't understand how to solve. Any help would be highly appreciated! Thanks for your patience

Upvotes: 3

Views: 3937

Answers (3)

Weikeng Chen
Weikeng Chen

Reputation: 141

I encountered this problem today when I installed GMP after NTL Makefile lets me do so.

The following command seems to help:

sudo ldconfig

Upvotes: 4

CodeSamurai-like
CodeSamurai-like

Reputation: 381

I figured out a solution, start again and let the Wizard figure it out.

First, get rid of everything we did before

make clobber
./configure

Then edit the makefile and enable the wizard (around line 128)

#WIZARD=off
WIZARD=on

Upvotes: 0

kangsouth
kangsouth

Reputation: 73

I met the same problem.It was because of the library's version. First I installed gmp-6.1.2(using configure,make,make install command),and then I downloaded ntl-11.3.2,input configure and make commands.And the problem appeared:

GMP version check (6.1.2/6.1.0)

*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)

makefile:353: recipe for target 'setup3' failed

I guessed maybe I need to install gmp 6.1.0.So I first entered gmp-6.1.2 directory,using command sudo make uninstall,then downloaded gmp-6.1.0 and the problem was solved. Maybe you can have a try uninstalling gmp 6.0.0,installing 6.1.0.

Upvotes: 1

Related Questions