[PPL-devel] Duplicate code between ppl-1.0 and gmp-5.1.0
David Fang
fang at csl.cornell.edu
Wed Dec 26 22:54:11 CET 2012
I should've read this list first!
I also applied a similar patch to the older ppl-0.11.2 (ppl9) fink
package, since we also updated packages to gmp-5.1.0.
Fang
> 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
>
>
--
David Fang
http://www.csl.cornell.edu/~fang/
http://www.achronix.com/
More information about the PPL-devel
mailing list