Re: GCC 4.7.2 build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/2/17 Bharath Ramesh <bramesh@xxxxxx>:
> On Sat, Feb 16, 2013 at 02:02:29PM +0000, Jonathan Wakely wrote:
>> On 15 February 2013 14:07, Bharath Ramesh wrote:
>> >
>> > Fair enough. Here is my second attempt. Here are the commands I executed
>> > $ tar xvf /home/bramesh/downloads/gcc-4.7.2.tar.bz2
>> >
>> > $ cd gcc-4.7.2
>> > $ ./contrib/download_prerequisites
>> > $ wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.0.tar.gz
>> > $ tar xvf cloog-0.18.0.tar.gz
>> > $ ln -sf cloog-0.18.0 cloog
>>
>> The http://gcc.gnu.org/install/prerequisites.html does not say that
>> CLooG can be built by putting the sources in the GCC dir, the way GMP,
>> MPFR and MPC can be. Maybe it can, I don't know, but the docs don't
>> say it can be.  Since doing that isn't working for you, maybe you
>> should try installing CLooG separately (which I think means installing
>> GMP separately)
>
> I thought it can because the Makefile.in has references to
> building ppl/cloog similar to gmp, mpfr and mpc. I realized that
> I was using an incorrect version of CLooG as that is the version
> required by current trunk and not gcc-4.7.2. I downgraded and hit

Under gcc-4.7.2 source tree, check gcc/doc/install.texi file.
Since you would like to build CLooG library,
here are the packages and their version you need to install:

  * GNU Multiple Precision Library (GMP) version 4.3.2
  * MPFR Library version 2.4.2
  * MPC Library version 0.8.1
  * Parma Polyhedra Library (PPL) version 0.11
  * CLooG-PPL version 0.15 or CLooG 0.16

You can download them from ftp://gcc.gnu.org/pub/gcc/infrastructure/ site.
(gmp-4.3.2, mpfr-2.4.2, mpc-0.8.1, ppl-0.11, cloog-ppl-0.15.11)


> another error. Based on my research of that error in the current
> status of GCC CLooG cannot be built in tree like gmp, mpfr or
> mpc. I was hoping that I would have a 3 stage optimized build for
> CLooG as well. Guess I was wrong.
>

Like others suggestion, you should try to install these libraries separately.

Building these libraries separately is not very difficult.
You just need to know their dependency and then build them with right order:

  gmp -> No other dependency
  mpfr -> gmp
  mpc -> gmp, mpfr
  ppl -> gmp
  cloog-ppl -> gmp, ppl

For your reference, the followings are my commands to build them step by step:
(Note: Remember to substitute the path with yours.
       In addition, if you want to create .so library as well,
       do not use --disable-shared.)


[build gmp]

 $ CPPFLAGS=-fexceptions \
   /home/jasonwucj/WORKING/WORK-WIKI/gmp-4.3.2/configure \
   --prefix=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --enable-cxx \
   --disable-shared
 $ make
 $ make install


[build mpfr]

 $ /home/jasonwucj/WORKING/WORK-WIKI/mpfr-2.4.2/configure \
   --prefix=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --with-gmp=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --disable-shared
 $ make
 $ make install


[build mpc]

 $ LD_LIBRARY_PATH=/home/jasonwucj/WORKING/WORK-WIKI/host-tools/lib \
   /home/jasonwucj/WORKING/WORK-WIKI/mpc-0.8.1/configure \
   --prefix=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --with-gmp=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --with-mpfr=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --disable-shared
 $ make
 $ make install


[build ppl]

 $ CXXFLAGS=-I/home/jasonwucj/WORKING/WORK-WIKI/host-tools/include \
   LDFLAGS=-L/home/jasonwucj/WORKING/WORK-WIKI/host-tools/lib \
   /home/jasonwucj/WORKING/WORK-WIKI/ppl-0.11/configure \
   --prefix=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --with-libgmp-prefix=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --disable-shared \
   --with-host-libstdcxx="-lstdc++ -lm"
 $ make
 $ make install


[build cloog-ppl]

 $ CXXFLAGS=-I/home/jasonwucj/WORKING/WORK-WIKI/host-tools/include \
   LDFLAGS=-L/home/jasonwucj/WORKING/WORK-WIKI/host-tools/lib \
   /home/jasonwucj/WORKING/WORK-WIKI/cloog-ppl-0.15.11/configure \
   --prefix=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --with-gmp=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --with-ppl=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
   --disable-shared \
   --with-host-libstdcxx="-lstdc++ -lm"
 $ make
 $ make install


[build gcc-4.7.2]

(Note: If you do static link with ppl, LIBS=xxx setting is required.)

$ LIBS="-lstdc++ -lm" \
   /home/jasonwucj/WORKING/WORK-WIKI/gcc-4.7.2/configure \
  ...
  --with-gmp=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
  --with-mpfr=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
  --with-mpc=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
  --with-ppl=/home/jasonwucj/WORKING/WORK-WIKI/host-tools \
  --with-cloog=/home/jasonwucj/WORKING/WORK-WIKI/host-tools


Hope this can help you successfully build gcc-4.7.2~ :-)


Best regards,
jasonwucj


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux