
On 12/22/12 09:31, Алексей Павлов wrote:
Hi! New gmp-5.1.0 conflicting with ppl-1.0. When I try to build ppl-1.0 I got errors:
libtool: compile: i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../../mingw-sources/ppl-1.0/src -I.. -I.. -I../../../mingw-sources/ppl-1.0/src -I/temp/mingw-prereq/i686-w64-mingw32-static/include -g -O2 -frounding-math -march=nocona -mtune=nocona -O2 -pipe -fomit-frame-pointer -W -Wall -MT assert.lo -MD -MP -MF .deps/assert.Tpo -c ../../../mingw-sources/ppl-1.0/src/assert.cc -o assert.o In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:30:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Coefficient.types.hh:16, from ../../../mingw-sources/ppl-1.0/src/Coefficient.defs.hh:27, from ../../../mingw-sources/ppl-1.0/src/Box.defs.hh:29, from ../../../mingw-sources/ppl-1.0/src/Box.cc:25: ../../../mingw-sources/ppl-1.0/src/mp_std_bits.defs.hh:47:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:29:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Coefficient.types.hh:16, from ../../../mingw-sources/ppl-1.0/src/Coefficient.defs.hh:27, from ../../../mingw-sources/ppl-1.0/src/Box.defs.hh:29, from ../../../mingw-sources/ppl-1.0/src/Box.cc:25: C:/gccbuild/msys/temp/mingw-prereq/i686-w64-mingw32-static/include/gmpxx.h:3269:21: error: previous definition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:30:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Coefficient.types.hh:16, from ../../../mingw-sources/ppl-1.0/src/Coefficient.defs.hh:27, from ../../../mingw-sources/ppl-1.0/src/Box.defs.hh:29, from ../../../mingw-sources/ppl-1.0/src/Box.cc:25: ../../../mingw-sources/ppl-1.0/src/mp_std_bits.defs.hh:108:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:29:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Coefficient.types.hh:16, from ../../../mingw-sources/ppl-1.0/src/Coefficient.defs.hh:27, from ../../../mingw-sources/ppl-1.0/src/Box.defs.hh:29, from ../../../mingw-sources/ppl-1.0/src/Box.cc:25: C:/gccbuild/msys/temp/mingw-prereq/i686-w64-mingw32-static/include/gmpxx.h:3306:21: error: previous definition of 'class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:30:0, from ../../../mingw-sources/ppl-1.0/src/checked.cc:25: ../../../mingw-sources/ppl-1.0/src/mp_std_bits.defs.hh:47:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:29:0, from ../../../mingw-sources/ppl-1.0/src/checked.cc:25: C:/gccbuild/msys/temp/mingw-prereq/i686-w64-mingw32-static/include/gmpxx.h:3269:21: error: previous definition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:30:0, from ../../../mingw-sources/ppl-1.0/src/checked.cc:25: ../../../mingw-sources/ppl-1.0/src/mp_std_bits.defs.hh:108:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:29:0, from ../../../mingw-sources/ppl-1.0/src/checked.cc:25: C:/gccbuild/msys/temp/mingw-prereq/i686-w64-mingw32-static/include/gmpxx.h:3306:21: error: previous definition of 'class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >' mv -f .deps/assert.Tpo .deps/assert.Plo /bin/sh ../libtool --tag=CXX --mode=compile i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../../mingw-sources/ppl-1.0/src -I.. -I.. -I../../../mingw-sources/ppl-1.0/src -I/temp/mingw-prereq/i686-w64-mingw32-static/include -g -O2 -frounding-math -march=nocona -mtune=nocona -O2 -pipe -fomit-frame-pointer -W -Wall -MT Checked_Number.lo -MD -MP -MF .deps/Checked_Number.Tpo -c -o Checked_Number.lo ../../../mingw-sources/ppl-1.0/src/Checked_Number.cc make[3]: *** [checked.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... libtool: compile: i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../../mingw-sources/ppl-1.0/src -I.. -I.. -I../../../mingw-sources/ppl-1.0/src -I/temp/mingw-prereq/i686-w64-mingw32-static/include -g -O2 -frounding-math -march=nocona -mtune=nocona -O2 -pipe -fomit-frame-pointer -W -Wall -MT Checked_Number.lo -MD -MP -MF .deps/Checked_Number.Tpo -c ../../../mingw-sources/ppl-1.0/src/Checked_Number.cc -o Checked_Number.o make[3]: *** [Box.lo] Error 1 In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:30:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.cc:25: ../../../mingw-sources/ppl-1.0/src/mp_std_bits.defs.hh:47:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:29:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.cc:25: C:/gccbuild/msys/temp/mingw-prereq/i686-w64-mingw32-static/include/gmpxx.h:3269:21: error: previous definition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:30:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.cc:25: ../../../mingw-sources/ppl-1.0/src/mp_std_bits.defs.hh:108:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >' In file included from ../../../mingw-sources/ppl-1.0/src/checked.defs.hh:29:0, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.defs.hh:28, from ../../../mingw-sources/ppl-1.0/src/Checked_Number.cc:25: C:/gccbuild/msys/temp/mingw-prereq/i686-w64-mingw32-static/include/gmpxx.h:3306:21: error: previous definition of 'class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >' make[3]: *** [Checked_Number.lo] Error 1 make[3]: Leaving directory `/temp/prereq-build/x32-ppl-1.0-static/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/temp/prereq-build/x32-ppl-1.0-static/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/temp/prereq-build/x32-ppl-1.0-static' make: *** [all] Error 2
I resolve this by remove duplicate code from src/mp_std_bits.defs.hh and src/mp_std_bits.cc
Hello Alexey,
thanks for the report. Indeed, previous versions of GMP did not define std::numeric_limits for its data types. That is why we were defining these specializations ourselves. Immediately after the release of GMP 5.1.0 we made that code conditional on the version of GMP. Both the Git version of the PPL and the snapshot of PPL 1.1 available at
http://bugseng.com/products/ppl/download/ftp/snapshots/
contain the correction. Kind regards,
Roberto