pidabrow
pidabrow

Reputation: 976

GCC-4.7.2 installation on Cygwin fails

Because default GCC in Cygwin is 4.5.3, I tried to install GCC 4.7.2. I have dowloaded tar.bz archive from here, put it to cygwin\usr\gcc-4.7.2 and proceed the following sequence:

tar xvf gcc-4.7.2.tar.bz2
cd gcc-4.7.2
./contrib/download_prerequisites
mkdir build
cd build
../configure --build=x86_64-linux-gnu --prefix=/usr/gcc-4.7.2 --enable-checking=release --enable-languages=c,c++ --disable-multilib --program-suffix=-4.7
make
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
sudo make install

I stucked at make with the following error: (after more than one hour)

make[3]: Leaving directory `/usr/gcc-4.7.2/build/gcc'
mkdir -p -- x86_64-linux-gnu/libgcc
Checking multilib configuration for libgcc...
Configuring stage 1 in x86_64-linux-gnu/libgcc
configure: creating cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking for x86_64-linux-gnu-ar... ar
checking for x86_64-linux-gnu-lipo... lipo
checking for x86_64-linux-gnu-nm... /usr/gcc-4.7.2/build/./gcc/nm
checking for x86_64-linux-gnu-ranlib... ranlib
checking for x86_64-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for x86_64-linux-gnu-gcc... /usr/gcc-4.7.2/build/./gcc/xgcc -B/usr/gcc-4.7.2/build/./gcc/ -B/usr/gcc-4.7.2/x86_64-linux-gnu/bin/ -B/usr/gcc-4.7.2/x86_64-linux-gnu/lib/ -isystem /usr/gcc-4.7.2/x86_64-linux-gnu/include -isystem /usr/gcc-4.7.2/x86_64-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/usr/gcc-4.7.2/build/x86_64-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Makefile:15654: recipe for target `configure-stage1-target-libgcc' failed
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/usr/gcc-4.7.2/build'
Makefile:19334: recipe for target `stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/gcc-4.7.2/build'
Makefile:903: recipe for target `all' failed
make: *** [all] Error 2

Does this log contain enoung information, to say what went wrong?

The full log is much more bigger so I allowed myself to put only the part of him. The instruction that I used, I found on Pastebin: http://pastebin.com/1MBaAikB

Could anyone give me a tip how could I solve this problem?

EDIT 1: I trieid to achieve it in annother way. I found an installation description on http://matpack.de/cygwin/index.html

tar -xf gcc-4.7.2.tar.bz2
mkdir gcc-build
cd gcc-build
../gcc-4.7.2/configure --enable-languages=c,c++
make -j 4
make install
make clean          (OPTIONAL)
cd ..

The error that I got, is connected now with 'permission denided'. Error log: http://pastebin.com/0stdpFKf

How this is possible?

Upvotes: 2

Views: 4458

Answers (2)

Alvin
Alvin

Reputation: 950

I had come across the same problem. Just I have exported the library path of mpc, mpfr and gmp libraries to the LD_LIBRARY_PATH environment variable, then it is working.

Upvotes: 1

Yaakov
Yaakov

Reputation: 1703

GCC 4.7.2 is now available as a test release. In setup.exe, toggle the version numbers for all the gcc4-* packages, as well as libgcc1, libstdc++6, etc., until a 4.7 version is shown. Just keep in mind that you will have to elect to Keep each of these again during subsequent runs of setup.exe, until such time that they are declared stable.

Upvotes: 0

Related Questions