[PPL-devel] gmp-4.3.1 header and library version mismatch
Karl-Werner Beszus
kwbes at gmx.de
Tue Aug 25 11:56:32 CEST 2009
When compiling (configuring) ppl-0.10.2, I get the error:
"configure: error: Cannot find GMP version 4.1.3 or higher."
in config.log (short):
g++ -o conftest conftest.cpp /usr/lib/libgmpxx.so /usr/lib/libgmp.so
Involved is "configure" from ppl-0.10.2:
---codeschnipp
#include <gmpxx.h>
....
#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1) || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR == 1 && __GNU_MP_VERSION_PATCHLEVEL < 3)
#GMP version 4.1.3 or higher is required
#endif
int
main() {
std::string header_version;
{
std::ostringstream s(header_version);
s << __GNU_MP_VERSION << "." << __GNU_MP_VERSION_MINOR;
// Starting from GMP version 4.3.0, the gmp_version variable
// always contains three parts. In previous versions the
// patchlevel was omitted if it was 0.
if (__GNU_MP_VERSION_PATCHLEVEL != 0
|| __GNU_MP_VERSION > 4
|| (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 3))
s << "." << __GNU_MP_VERSION_PATCHLEVEL;
header_version = s.str();
}
std::string library_version = gmp_version;
if (header_version != library_version) {
std::cerr
<< "GMP header (gmp.h) and library (ligmp.*) version mismatch:\n"
<< "header gives " << header_version << ";\n"
<< "library gives " << library_version << "." << std::endl;
return 1;
}
....
---codeschnipp
It looks like there's something wrong with "gmp_version", but I couldn't find, where/how this is defined in the code of gmp-4.3.1.
The __GNU_MP_VERSION* ones are OK.
I commented out the block with the comparing of header_version and library_version,
and the configure && make && make check of ppl-0.10.2 runs without an error.
BTW: gmp-4.3.1 compiles to: libgmp.so.3.5.0 and libgmpxx.so.4.1.0 (--enable-cxx)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20090825/d766d050/attachment.sig>
More information about the PPL-devel
mailing list