[PPL-devel] why ppl configure fails
Roberto Bagnara
bagnara at cs.unipr.it
Mon Mar 28 08:44:15 CEST 2011
On 03/28/11 06:16, Dennis Clarke wrote:
> Just a guess but I'll bet your configure test code is looking for an old
> var that simply is not defined anymore.
>
> Thus :
>
> [titan] $ cat -n simple_test.cpp
> 1 #include<gmpxx.h>
> 2 #include<climits>
> 3 #include<string>
> 4 #include<sstream>
> 5 #include<iostream>
> 6
> 7 #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)
> 8 #GMP version 4.1.3 or higher is required
> 9 #endif
> 10
> 11 int
> 12 main() {
> 13 std::string header_version;
> 14 {
> 15 std::ostringstream s(header_version);
> 16 s<< __GNU_MP_VERSION<< "."<< __GNU_MP_VERSION_MINOR; 17
> // Starting from GMP version 4.3.0, the gmp_version variable 18
> // always contains three parts. In previous versions the 19
> // patchlevel was omitted if it was 0.
> 20 if (__GNU_MP_VERSION_PATCHLEVEL != 0
> 21 || __GNU_MP_VERSION> 4
> 22 || (__GNU_MP_VERSION == 4&& __GNU_MP_VERSION_MINOR>=
> 3))
> 23 s<< "."<< __GNU_MP_VERSION_PATCHLEVEL;
> 24 header_version = s.str();
> 25 }
> 26
> 27 std::string library_version = gmp_version;
> 28
> 29 if (header_version != library_version) {
> 30 std::cerr
> 31<< "GMP header (gmp.h) and library (ligmp.*) version
> mismatch:\n"
> 32<< "header gives "<< header_version<< ";\n"
> 33<< "library gives "<< library_version<< "."<< std::endl;
> 34 return 1;
> 35 }
> 36
> 37 if (sizeof(mp_limb_t)*CHAR_BIT != GMP_LIMB_BITS
> 38 || GMP_LIMB_BITS != mp_bits_per_limb) {
> 39 std::cerr
> 40<< "GMP header (gmp.h) and library (ligmp.*) bits-per-limb
> mismatch:\n"
> 41<< "header gives "<< __GMP_BITS_PER_MP_LIMB<< ";\n" 42
> << "library gives "<< mp_bits_per_limb<< ".\n"
> 43<< "This probably means you are on a bi-arch system and\n"
> 44<< "you are compiling with the wrong header or linking
> with\n"
> 45<< "the wrong library."<< std::endl;
> 46 return 1;
> 47 }
> 48
> 49 mpz_class n("3141592653589793238462643383279502884");
> 50 return 0;
> 51 }
> 52
> [titan] $
> [titan] $
> [titan] $ $CXX $CPPFLAGS -I/opt/bw/include -v -c -o simple_test.o
> simple_test.cpp
> Using built-in specs.
> COLLECT_GCC=/opt/csw/gcc4/bin/g++
> COLLECT_LTO_WRAPPER=/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.5.1/lto-wrapper
> Target: i386-pc-solaris2.8
> Configured with: ../gcc-4.5.1/configure --host=i386-pc-solaris2.8
> --build=i386-pc-solaris2.8 --with-gnu-as --with-as=/opt/csw/bin/gas
> --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-cpu=i386
> --enable-stage1-languages=c --enable-nls --enable-threads=posix
> --prefix=/opt/csw/gcc4 --with-local-prefix=/opt/csw --enable-shared
> --enable-multilib --with-pkgversion='Blastwave.org Inc. Mon Aug 9
> 07:10:45 GMT 2010' --with-bugurl=http://www.blastwave.org/support
> --enable-languages=c,c++,objc,fortran,ada --enable-bootstrap
> Thread model: posix
> gcc version 4.5.1 (Blastwave.org Inc. Mon Aug 9 07:10:45 GMT 2010)
> COLLECT_GCC_OPTIONS='-march=pentiumpro' '-malign-double'
> '-mpreferred-stack-boundary=8' '-m32' '-O3' '-fexceptions' '-D_TS_ERRNO'
> '-Dsun=1' '-Dunix=1' '-Di386=1' '-D__sun' '-D__unix' '-D__SunOS_5_8'
> '-D__i386' '-D__SVR4' '-DSOLARIS2=8' '-D_POSIX_PTHREAD_SEMANTICS'
> '-D_LARGEFILE64_SOURCE' '-I/opt/bw/include' '-v' '-c' '-o' 'simple_test.o'
> '-shared-libgcc'
> /opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.5.1/cc1plus -quiet -v
> -I/opt/bw/include -D_TS_ERRNO -Dsun=1 -Dunix=1 -Di386=1 -D__sun -D__unix
> -D__SunOS_5_8 -D__i386 -D__SVR4 -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS
> -D_LARGEFILE64_SOURCE simple_test.cpp -quiet -dumpbase simple_test.cpp
> -march=pentiumpro -malign-double -mpreferred-stack-boundary=8 -m32
> -auxbase-strip simple_test.o -O3 -version -fexceptions -o
> /var/tmp//cca6qaec.s
> GNU C++ (Blastwave.org Inc. Mon Aug 9 07:10:45 GMT 2010) version 4.5.1
> (i386-pc-solaris2.8)
> compiled by GNU C version 4.5.1, GMP version 4.3.1, MPFR version
> 2.4.2, MPC version 0.8.1
> GGC heuristics: --param ggc-min-expand=82 --param ggc-min-heapsize=98255
> ignoring nonexistent directory
> "/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../i386-pc-solaris2.8/include"
> #include "..." search starts here:
> #include<...> search starts here:
> /opt/bw/include
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../include/c++/4.5.1
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../include/c++/4.5.1/i386-pc-solaris2.8
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../include/c++/4.5.1/backward
> /opt/csw/include
> /opt/csw/gcc4/include
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/include
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/include-fixed
> /usr/include
> End of search list.
> GNU C++ (Blastwave.org Inc. Mon Aug 9 07:10:45 GMT 2010) version 4.5.1
> (i386-pc-solaris2.8)
> compiled by GNU C version 4.5.1, GMP version 4.3.1, MPFR version
> 2.4.2, MPC version 0.8.1
> GGC heuristics: --param ggc-min-expand=82 --param ggc-min-heapsize=98255
> Compiler executable checksum: 9bd5ae1469b8af3369ce6260a5d1ccdd
> simple_test.cpp: In function 'int main()':
> simple_test.cpp:41:30: error: '__GMP_BITS_PER_MP_LIMB' was not declared in
> this scope
> [titan] $
> [titan] $ grep "GMP_BITS_PER_MP_LIMB" /opt/bw/include/gmpxx.h
> [titan] $ grep "GMP_BITS_PER_MP_LIMB" /opt/bw/include/gmp.h
> [titan] $
>
> however, if we "revert" back down to gmp 4.3.2 we see this :
>
> [titan] $ grep "GMP_BITS_PER_MP_LIMB" /opt/bw/include/gmp.h
> #define __GMP_BITS_PER_MP_LIMB 32
>
> [titan] $ $CXX $CPPFLAGS -I/opt/bw/include -v -c -o simple_test.o
> simple_test.cpp
> Using built-in specs.
> COLLECT_GCC=/opt/csw/gcc4/bin/g++
> COLLECT_LTO_WRAPPER=/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.5.1/lto-wrapper
> Target: i386-pc-solaris2.8
> Configured with: ../gcc-4.5.1/configure --host=i386-pc-solaris2.8
> --build=i386-pc-solaris2.8 --with-gnu-as --with-as=/opt/csw/bin/gas
> --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-cpu=i386
> --enable-stage1-languages=c --enable-nls --enable-threads=posix
> --prefix=/opt/csw/gcc4 --with-local-prefix=/opt/csw --enable-shared
> --enable-multilib --with-pkgversion='Blastwave.org Inc. Mon Aug 9
> 07:10:45 GMT 2010' --with-bugurl=http://www.blastwave.org/support
> --enable-languages=c,c++,objc,fortran,ada --enable-bootstrap
> Thread model: posix
> gcc version 4.5.1 (Blastwave.org Inc. Mon Aug 9 07:10:45 GMT 2010)
> COLLECT_GCC_OPTIONS='-march=pentiumpro' '-malign-double'
> '-mpreferred-stack-boundary=8' '-m32' '-O3' '-fexceptions' '-D_TS_ERRNO'
> '-Dsun=1' '-Dunix=1' '-Di386=1' '-D__sun' '-D__unix' '-D__SunOS_5_8'
> '-D__i386' '-D__SVR4' '-DSOLARIS2=8' '-D_POSIX_PTHREAD_SEMANTICS'
> '-D_LARGEFILE64_SOURCE' '-I/opt/bw/include' '-v' '-c' '-o' 'simple_test.o'
> '-shared-libgcc'
> /opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.5.1/cc1plus -quiet -v
> -I/opt/bw/include -D_TS_ERRNO -Dsun=1 -Dunix=1 -Di386=1 -D__sun -D__unix
> -D__SunOS_5_8 -D__i386 -D__SVR4 -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS
> -D_LARGEFILE64_SOURCE simple_test.cpp -quiet -dumpbase simple_test.cpp
> -march=pentiumpro -malign-double -mpreferred-stack-boundary=8 -m32
> -auxbase-strip simple_test.o -O3 -version -fexceptions -o
> /var/tmp//ccNDRaDm.s
> GNU C++ (Blastwave.org Inc. Mon Aug 9 07:10:45 GMT 2010) version 4.5.1
> (i386-pc-solaris2.8)
> compiled by GNU C version 4.5.1, GMP version 4.3.1, MPFR version
> 2.4.2, MPC version 0.8.1
> GGC heuristics: --param ggc-min-expand=82 --param ggc-min-heapsize=98255
> ignoring nonexistent directory
> "/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../i386-pc-solaris2.8/include"
> #include "..." search starts here:
> #include<...> search starts here:
> /opt/bw/include
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../include/c++/4.5.1
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../include/c++/4.5.1/i386-pc-solaris2.8
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../../include/c++/4.5.1/backward
> /opt/csw/include
> /opt/csw/gcc4/include
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/include
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/include-fixed
> /usr/include
> End of search list.
> GNU C++ (Blastwave.org Inc. Mon Aug 9 07:10:45 GMT 2010) version 4.5.1
> (i386-pc-solaris2.8)
> compiled by GNU C version 4.5.1, GMP version 4.3.1, MPFR version
> 2.4.2, MPC version 0.8.1
> GGC heuristics: --param ggc-min-expand=82 --param ggc-min-heapsize=98255
> Compiler executable checksum: 9bd5ae1469b8af3369ce6260a5d1ccdd
> COLLECT_GCC_OPTIONS='-march=pentiumpro' '-malign-double'
> '-mpreferred-stack-boundary=8' '-m32' '-O3' '-fexceptions' '-D_TS_ERRNO'
> '-Dsun=1' '-Dunix=1' '-Di386=1' '-D__sun' '-D__unix' '-D__SunOS_5_8'
> '-D__i386' '-D__SVR4' '-DSOLARIS2=8' '-D_POSIX_PTHREAD_SEMANTICS'
> '-D_LARGEFILE64_SOURCE' '-I/opt/bw/include' '-v' '-c' '-o' 'simple_test.o'
> '-shared-libgcc'
> /opt/csw/bin/gas -v -I/opt/bw/include -V -Qy -s -o simple_test.o
> /var/tmp//ccNDRaDm.s
> GNU assembler version 2.20.1 (i386-pc-solaris2.8) using BFD version (GNU
> Binutils) 2.20.1.20100303
> COMPILER_PATH=/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.5.1/:/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.5.1/:/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/:/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/:/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/:/usr/ccs/bin/
> LIBRARY_PATH=/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/:/usr/ccs/lib/:/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.5.1/../../../:/lib/:/usr/lib/
> COLLECT_GCC_OPTIONS='-march=pentiumpro' '-malign-double'
> '-mpreferred-stack-boundary=8' '-m32' '-O3' '-fexceptions' '-D_TS_ERRNO'
> '-Dsun=1' '-Dunix=1' '-Di386=1' '-D__sun' '-D__unix' '-D__SunOS_5_8'
> '-D__i386' '-D__SVR4' '-DSOLARIS2=8' '-D_POSIX_PTHREAD_SEMANTICS'
> '-D_LARGEFILE64_SOURCE' '-I/opt/bw/include' '-v' '-c' '-o' 'simple_test.o'
> '-shared-libgcc'
> [titan] $
>
>
> works as expected.
>
> I *strongly* suspect your tests in the configure script are broken for
> newer gmp revs like 5.0.1
I strongly suspect that the test program you used for this experiment
has nothing to do with PPL 0.11.2:
$ wget ftp.cs.unipr.it:/pub/ppl/releases/0.11.2/ppl-0.11.2.tar.bz2
...
$ find ppl-0.11.2 -type f | xargs grep GMP_BITS_PER_MP_LIMB
$
--
Prof. Roberto Bagnara
Applied Formal Methods Laboratory
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
More information about the PPL-devel
mailing list