
Hello,
I experienced a configuration failure using PPL 0.12 complaining that the GMP /"header version didn't match the library version"/. Searching the web, I found an old 2009 post: http://www.cs.unipr.it/pipermail/ppl-devel/2009-August/015227.html with a very similar problem some time ago - the conclusion was murky.
I do not have multiple copies of GMP on my system. In fact, I built GMP v5.0.2 and PPL 0.12 from source using --disable-shared --enable-static and had no problems. However, when I compile the same GMP and PPL source using --enable-shared --disable-static, the problem pops up.
I acknowledge that there could be a problem with the GMP versioning when configured for shared libraries. Having said that, is it possible that the PPL configuration test is at fault? Specifically, how is the library version determined?
Looking at the source code for the configure script, I could not determine where the value was assigned to gmp_version (annotated line 10083 below) nor did I find gmp_version set as a configuration script variable.
10050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */
#include <gmpxx.h> #include <climits> #include <string> #include <sstream> #include <iostream>
#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1) || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR == 1 && MP_VERSION_PATCHLEVEL < 3) #GMP version 4.1.3 or higher is required #endif
<SNIP>
10083 *std::string library_version = gmp_version;*
if (header_version != library_version) { std::cerr << "GMP header (gmpxx.h) and library (ligmpxx.*) version mismatch:\n" << "header gives " << header_version << ";\n" << "library gives " << library_version << "." << std::endl; return 1; }
<SNIP> }
Simply updating the installed gmp.h file (attached) as shown below allows me to bypass the configuration test to assess the build, but clearly this is not a production solution.
/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ #define __GNU_MP_VERSION 5 #define __GNU_MP_VERSION_MINOR 0 #define *__GNU_MP_VERSION_PATCHLEVEL 1*
My configuration settings (taken from the respective config.log files) are:
GMP: $ ../../../src/gmp/gmp-5.0.2/configure --prefix=/third_party/spt/i686-w64-mingw32
--build=i686-w64-mingw32 --host=i686-w64-mingw32 --enable-shared --disable-static --enable-cxx
Environment: CFLAGS='-g0 -O2 -pipe -Wl,-S -isystem /mingw/include' CPPFLAGS='-g0 -O2 -pipe -Wl,-S -isystem /mingw/include -fexceptions' CXXFLAGS='-g0 -O2 -pipe -Wl,-S -isystem /mingw/include'
PPL: $ ../../../src/ppl/ppl-0.12/configure --prefix=/third_party/spt/i686-w64-mingw32
--build=i686-w64-mingw32 --host=i686-w64-mingw32 --enable-shared --disable-static
--with-gmp=/third_party/spt/i686-w64-mingw32
Environment: CFLAGS='-g0 -O2 -pipe -Wl,-S -isystem /mingw/include' CPPFLAGS='-g0 -O2 -pipe -Wl,-S -isystem /mingw/include' CXXFLAGS='-g0 -O2 -pipe -Wl,-S -isystem /mingw/include'
Thanks in advance for your time and consideration,
Anil E. Sahukar