[oi-dev] error trying to compile gcc47-libgmp

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Sun Jun 2 16:12:07 UTC 2013


On Fri, 31 May 2013, Alexander Pyhalov wrote:

> Hello.
>
> I have tried to build gcc47, but received
>
> configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
> in this configuration expects 64 bits.
> You appear to have set $CFLAGS, perhaps you also need to tell GMP the
> intended ABI, see "ABI and ISA" in the manual.

These problems are because of how libgmp configures itself.  The 
following are the build notes I used for GCC 4.7.1 on OI. The 
procedure for 4.8.0 is different:


Install binutils 2.22:

    configure '--prefix=/usr/local/lib/binutils-2.22'

Install these library prerequisites

1)  gmp		5.0.5 (32-bit)  Multi-arch is useful so 64 bit useful for other purposes.

   configure '--disable-static' '--enable-cxx' 'CPPFLAGS=-fexceptions' 'ABI=32'

2)  mpfr	3.1.1

   configure '--disable-static' '--with-gmp=/usr/local'

3)  mpc		1.0

   configure '--disable-static' '--with-mpfr=/usr/local' '--with-gmp=/usr/local'

4)  isl		0.10 (specific version from ftp://gcc.gnu.org/pub/gcc/infrastructure/)

   configure '--disable-static' '--with-gmp-prefix=/usr/local'

5)  ppl		0.11.2 (specific version from ftp://gcc.gnu.org/pub/gcc/infrastructure/)

   configure '--disable-static' '--with-gmp-prefix=/usr/local'

6)  cloog	0.17.0 (specific version from ftp://gcc.gnu.org/pub/gcc/infrastructure/)

   configure '--disable-static' '--with-isl=system' '--with-isl-prefix=/usr/local' \
 		'--with-gmp-prefix=/usr/local' '--with-bits=gmp'

7)  cloog-ppl	0.15.9 (from ftp://gcc.gnu.org/pub/gcc/infrastructure/)

   configure  '--disable-static' '--with-ppl=/usr/local' '--with-bits=gmp' '--with-gmp=/usr/local'

% /path/gcc-4.7.1/configure CC=gcc-4.7.1 CXX=c++-4.7.1 LDFLAGS='-L/usr/local/lib -R/usr/local/lib' --prefix=/usr/local --program-suffix=-4.7.1 --enable-shared --enable-threads --enable-version-specific-runtime-libs --with-gnu-as --with-as=/usr/local/lib/binutils-2.22/bin/as --without-gnu-ld --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc --enable-decimal-float --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local --disable-gmp --enable-languages=c,c++,fortran,java,objc,obj-c++

gmake -j 18 BOOT_CFLAGS='-O2' BOOT_LDFLAGS='-R/usr/local/lib' bootstrap

gmake install


Create fixed up specs to hard-code libgcc_s.so:


    cd /usr/local/lib/gcc/i386-pc-solaris2.11/4.7.1

    /usr/local/bin/gcc-4.7.1 -dumpspecs > specs

    edit specs to find libgcc where we will make it globally available
    (via symbolic links):

         *link_libgcc:
         %{m64:-R /usr/local64/lib %D}%{!m64:-R /usr/local/lib %D}


Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




More information about the oi-dev mailing list