checking for __gmpz_init in -lgmp... yes
checking matching GMP version... no (6.1 / 6.0.0)
configure: error: Unable to use GMP - Please check config.log
I have gmp-6.1.2, shouldn't that be sufficient?
Where ist the required version defined?
Thx,
Juergen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is simple: the library is version 6.1 while the header is 6.0.0 - set CFLAGS during configure to adjust the C search path. See config.log for details what is found.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually there is a 6.0 on the machine, but in /lib64
and without headers, probably as dependencies of another package.
So I got 6.0.0 sources and used it for CFLAGS
Now configure is happy.
Thx, Jürgen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I bumped into a similar problem when testing out MPIR last night. I built a --enable-gmpcompat version, installed to /usr/local/ but gcc is stubbornly picking up libgmp.so from a multiarch setup from /usr/lib/x86_64-linux-gnu/. Try as I might, no /etc/ld.so,conf.d configurations seem to effect the search order in a way to scan /usr/local/lib/ for libgmp.sobefore the 64 bit multi arch. So, now I've got a header file in /usr/local/include for MPIR version 6 and conflicting with a version 5 system install of GMP (along with a proper matching MPIR compat library in /usr/local/lib).
Exactly the same error condition from ./configure
configure: Checks for GMP ...
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking for __gmpz_init in -lgmp... yes
checking matching GMP version... no (5.1 / 6.1.0)
configure: error: Unable to use GMP - Please check config.log
Yayy, linkers.
Not asking for any assistance, just griping.
The fix for ./configure with a test build of GnuCOBOL was LDFLAGS=-L/usr/local/lib ./configure .... The upside, ./configure works. The downside is that that version of GnuCOBOL now emits -L/usr/local/lib -L/usr/local/lib for every compile (with a /usr/local install). Not harmful, but not optimal.
I still can't get gcc standalone to recognize the local install unless overriding. And I've done a few laps around the ldconfig tree. Something, somewhere in the multiarch 32bit/64bit setup on this machine is trying to protect me from myself. It will be defeated. :-)
As an aside. Adding PDCurses and VBISAM to our source tree and tarball adds about 20% to compressed delivery sizes, (which will allow testing against known versions). MPIR adds about 200%, so I say we skip that part and link to it for Windows folk. After decompression, and build, MPIR expands out to a fair huge 50 meg tree here, for what is a final 500K shared library. Quite a bit of baggage, but well tested.
Go ahead and ignore this post, just griping about ldconfig and multiarch voodoo when it comes to duplicate sonames.
Cheers,
Brian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I tried to build gnu-cobol-2.0_rc-2.tar.gz.
configure fails with
checking for __gmpz_init in -lgmp... yes
checking matching GMP version... no (6.1 / 6.0.0)
configure: error: Unable to use GMP - Please check config.log
I have gmp-6.1.2, shouldn't that be sufficient?
Where ist the required version defined?
Thx,
Juergen
The problem is simple: the library is version 6.1 while the header is 6.0.0 - set CFLAGS during configure to adjust the C search path. See config.log for details what is found.
I had set CFLAGS :
configure:14133: gcc -std=gnu99 -o conftest -g -O2 -I/projekte/gmp-6.1.2/include -L/projekte/gmp-6.1.2/lib conftest.c -lgmp >&5
configure:14133: $? = 0
configure:14133: ./conftest
configure:14133: $? = 0
configure:14146: checking matching GMP version
configure:14155: result: no (6.1 / 6.0.0)
configure:14157: error: Unable to use GMP - Please check config.log
I see. I've changed configure.ac locally, it would now output:
It seems to link against version 6.1 and runs the 6.0 library.
So I suggest to do
Remark: you will have to set
LD_LIBRARY_PATHalways when you want to usecobc/cobcrunlater (including running the testsuite).Simon
No, there is no 6.0 on the machine. And setting LD_LIBRARY_PATH does not change the error.
You may upload config.log and I'll recheck - but it's quite likely that the libgmp reports version 6.0.0
Simon
Actually there is a 6.0 on the machine, but in /lib64
and without headers, probably as dependencies of another package.
So I got 6.0.0 sources and used it for CFLAGS
Now configure is happy.
Thx, Jürgen
I bumped into a similar problem when testing out MPIR last night. I built a
--enable-gmpcompatversion, installed to/usr/local/but gcc is stubbornly picking uplibgmp.sofrom a multiarch setup from/usr/lib/x86_64-linux-gnu/. Try as I might, no/etc/ld.so,conf.dconfigurations seem to effect the search order in a way to scan/usr/local/lib/forlibgmp.sobefore the 64 bit multi arch. So, now I've got a header file in/usr/local/includefor MPIR version 6 and conflicting with a version 5 system install of GMP (along with a proper matching MPIR compat library in/usr/local/lib).Exactly the same error condition from ./configure
Yayy, linkers.
Not asking for any assistance, just griping.
The fix for ./configure with a test build of GnuCOBOL was
LDFLAGS=-L/usr/local/lib ./configure .... The upside, ./configure works. The downside is that that version of GnuCOBOL now emits-L/usr/local/lib -L/usr/local/libfor every compile (with a /usr/local install). Not harmful, but not optimal.I still can't get gcc standalone to recognize the local install unless overriding. And I've done a few laps around the ldconfig tree. Something, somewhere in the multiarch 32bit/64bit setup on this machine is trying to protect me from myself. It will be defeated. :-)
As an aside. Adding PDCurses and VBISAM to our source tree and tarball adds about 20% to compressed delivery sizes, (which will allow testing against known versions). MPIR adds about 200%, so I say we skip that part and link to it for Windows folk. After decompression, and build, MPIR expands out to a fair huge 50 meg tree here, for what is a final 500K shared library. Quite a bit of baggage, but well tested.
Go ahead and ignore this post, just griping about ldconfig and multiarch voodoo when it comes to duplicate sonames.
Cheers,
Brian