Re: problem building gcc-4.6.0

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

 



On 5 April 2011 10:05, Arnab Das wrote:
> Hello,
>
>                 This is my first use of cygwin and gcc. I currently
> require the gcc compiler so I’m using Cygwin for it. I am facing
> problem installing gcc 4.6.0 wth cygwin.
>
> Steps I tried:
>
> 1)      Installed Cygwin from setup.exe. (success)
>
> 2)      Installed latest ver. of all prerequisites(viz. bash,
> binutils, bzip2, gcc-core,  gzip, m4 and make) through cygwin setup.
> (success)
>
> 3)      Installed gmp, mpfr, mpc in sequence(by building from source
> code). (success)
>
> 4)      Configured gcc-4.6.0 with  --enable-languages=c (from the
> build directory as instructed in the gcc site) (success)

Did you run configure as "./configure" ?
That is NOT supported, as clearly documented in the GCC installation
instructions.

> 5)      Build gcc-4.6.0 (error)
>
>
>
> Last few lines during building including error:
>
> cc1-checksum.o main.o  libbackend.a ../libcpp/libcpp.a
> ../libdecnumber/libdecnumber.a ../libcpp/libc
> pp.a -lintl  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
>  -lmpc -lmpfr -lgmp   -L../zlib -lz
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lmpc
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lmpfr
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lgmp

Obviously this means it can't find the gmp, mpfr and mpc libraries.

The simplest way to solve this is not to install gmp/mpfr/mpc
separately but to let gcc build them itself.

Delete the entire gcc source directory.
Unpack the gcc sources again, this will create a gcc-4.6.0 directory.

Put the gmp-x.y.z directory under the gcc-4.6.0 directory and rename
it to gmp.  Do the same for mpfr-x.y.z and mpc-x.y.z

Create a new directory called "build" at the same level as gcc-4.6.0
(NOT as a sub-directory of gcc-4.6.0)

then:

cd build
../gcc-4.6.0/configure --enable-languages=c
make



[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