I tried to install gcc 4.7.2 on RHEL 6. I have downloaded tar.gz archive from here, and performed following steps.
tar zxvf gcc-4.7.2.tar.gz
cd gcc-4.7.2
./configure --prefix=/usr/local/gcc-4.7.2/ --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-tune=generic --with-gmp=/usr/local/gimp-4.3.2/ --with-mpfr=/usr/local/mpfr-2.4.2/ --with-mpc=/usr/local/mpc-0.8.1/ --with-ppl=/usr/local/ppl-0.11 --with-cloog=/usr/local/cloog-ppl-0.15/
make
Whenever I'm executing make, it is throwing following error:
cp ../.././gcc/../fixincludes/README-fixinc include-fixed/README
chmod a+r include-fixed/README
echo timestamp > stmp-int-hdrs
make[3]: Leaving directory `/temp/gcc-4.7.2/host-x86_64-redhat-linux/gcc'
Checking multilib configuration for libgcc...
Configuring stage 1 in x86_64-redhat-linux/libgcc
configure: loading cache ./config.cache
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-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-redhat-linux-ar... ar
checking for x86_64-redhat-linux-lipo... lipo
checking for x86_64-redhat-linux-nm... /temp/gcc-4.7.2/host-x86_64-redhat-linux/gcc/nm
checking for x86_64-redhat-linux-ranlib... ranlib
checking for x86_64-redhat-linux-strip... strip
checking whether ln -s works... yes
checking for x86_64-redhat-linux-gcc... /temp/gcc-4.7.2/host-x86_64-redhat-linux/gcc/xgcc -B/temp/gcc-4.7.2/host-x86_64-redhat-linux/gcc/ -B/usr/local/gcc-4.7.2/x86_64-redhat-linux/bin/ -B/usr/local/gcc-4.7.2/x86_64-redhat-linux/lib/ -isystem /usr/local/gcc-4.7.2/x86_64-redhat-linux/include -isystem /usr/local/gcc-4.7.2/x86_64-redhat-linux/sys-include
checking for suffix of object files... configure: error: in `/temp/gcc-4.7.2/x86_64-redhat-linux/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/temp/gcc-4.7.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/temp/gcc-4.7.2'
make: *** [all] Error 2
How to resolve this error?
I have solved my problem. Just I have exported path for gmp, mpc, mpfr, ppl libraries to environment variable LD_LIBRARY_PATH.
Related
I have a really strange problem. I am trying to compile a source (telegram-cli) which has dependency on openssl, libevent and other libraries.
The system is centos 6.9
and "Development Tools" and libevent-devel and openssl-devel are installed via yum. By the way, ./configure results in this output:
Using this repo (Telegram-CLI):
git clone --recursive https://github.com/vysheng/tg.git && cd tg
./configure :
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing clock_gettime... no
checking for library containing backtrace... no
checking for event_base_new in -levent... no
configure: error: no libevent found
gcc -v -N :
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
I also added this to /etc/ld.so.conf.d/ :
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/lib
/lib64
/usr/lib64/openssl/engines
/usr/lib64/libevent-1.4.so.2.1.3
/usr/lib64/libgcrypt.so
/usr/lib64/libevent.so
The strange point is all these configs are the same on another centos system and everything just works fine. :(
I guess the libraries exist on the system but gcc or linker could not find them. Can anyone help?
Thanks
You need libevent-devel
yum install libevent-devel
Im having trouble to compile gcc 4.5.0 in red hat 7.
Im following the instructions from here ("The hard way", without libelf).
I use following versions:
# rpm -qa | grep -e libelf -e gmp -e mpfr -e mpc
mpfr-3.1.1-4.el7.x86_64
mpfr-devel-3.1.1-4.el7.x86_64
elfutils-libelf-0.170-4.el7.x86_64
elfutils-libelf-devel-0.170-4.el7.x86_64
gmp-6.0.0-15.el7.x86_64
libmpc-1.0.1-3.el7.x86_64
gmp-devel-6.0.0-15.el7.x86_64
While compiling, he doesnt find mpc.h:
checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
So I compiled it.
Here is the working configure:
/opt/app/gcc/gcc-4.5.0_SOURCE/configure
--prefix=/opt/app/gcc-4.5.0
--enable-languages=c,c++,fortran
--enable-bootstrap
--enable-shared
--enable-threads=posix
--enable-checking=release
--with-system-zlib
--enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-gnu-unique-object
--with-mpc=/opt/app/gcc/tmp/
At the end of make I get this:
...
ar rc libgcc.a $objects
ranlib libgcc.a
make[5]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD'
make: *** [all] Error 2
After some research I found out, that texinfo was missing. Install texinfo got me to a new failure:
...
make[3]: *** [doc/gccint.info] Error 1
rm gcc.pod
make[3]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/opt/app/gcc/gcc-4.5.0_BUILD'
make: *** [all] Error 2
After some research I found here that texinfo has a bug. Now Im trying to compile texinfo 4.13a but again, I get into trouble with no clear error message.
Did anyone achieve to compile gcc 4.5.0 in redhat 7?
UPDATE
I can compile gcc 4.5.4, but ONLY IF texinfo is NOT installed ...
kind regards
Your errors 1. GCC requires a build directory outside the gcc-source/ https://gcc.gnu.org/install/configure.html
gcc-4.5.x cannot use the EL7 texinfo. Please install a texinfo from "the gcc-4.5 days" :
yum remove texinfo
yum install Downloads/texinfo-4.13a-10.fc14.x86_64.rpm
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/x86_64/os/Packages/texinfo-4.13a-10.fc14.x86_64.rpm
GCC-4.5 : The bugfix version is 4.5.4 .
Note: The default build directory is $HOME/tmp/ (Or other dir. in $HOME). ... My build example :
cd gcc-4.5.4/
tar xvf mpfr-3.0.1.tar.xz
mv mpfr-3.0.1/ mpfr
tar xvf gmp-5.0.5.tar.xz
mv gmp-5.0.5/ gmp
tar xvf mpc-0.8.2.tar.gz
mv mpc-0.8.2/ mpc
cd ../
mkdir build-gcc45
cd build-gcc45/
../gcc-4.5.4/configure --prefix=/usr/local/gcc45 --program-suffix=45 --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++,fortran --disable-libstdcxx-pch --disable-multilib --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
make
# make install
cd /usr/bin/
# ln -s /usr/local/gcc45/bin/gcc45
# ln -s /usr/local/gcc45/bin/g++45
# ln -s /usr/local/gcc45/bin/gfortran45
Using, examples : $ export CC=gcc45 CXX=g++45 FC=gfortran45 && ./configure .... .... $ CC=gcc45 CXX=g++45 FC=gfortran45 cmake ../
Result : "gcc45-c++-4.5.4-1.el7.x86_64.rpm" https://drive.google.com/file/d/15aRg-BPhuyaEyZA9Jy-iAyC21_pwN7nD/view?usp=sharing
Example with the older gcc-4.5.0 :
$ cd build-gcc450/
$ ../gcc-4.5.0/configure --prefix=/opt/app/gcc-4.5.0 --program-suffix=450 --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++,fortran --disable-libstdcxx-pch --disable-multilib --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
$ make -j4
# make install ( No errors at all )
https://www.dropbox.com/s/45kfetdjj9lif66/gcc450-configure-opt.txt?dl=0
... More examples → https://drive.google.com/drive/folders/1j7qE9YKTT313B5VBg3kevzCNiykGkonO?usp=sharing
Problem
I am trying to build a cross compiler on a BeagleBone Black to compile from ARM to x86. The intent of this is to use the low power consuming BeagleBone Black that I had on hand as a build server. It can already compile for windows through mingw-w64, but I need it to also compile the code for Linux x86 systems.
However, when I try to compile gcc on the BeagleBone Black I get the following errors:
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../gcc-4.6.3/gmp -D__GMP_WITHIN_GMP -g -O2 -c -o mpn/div_qr_1n_pi1.lo mpn/div_qr_1n_pi1.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../gcc-4.6.3/gmp -D__GMP_WITHIN_GMP -g -O2 -c mpn/div_qr_1n_pi1.c -o mpn/div_qr_1n_pi1.o
/tmp/cckCXg2a.s: Assembler messages:
/tmp/cckCXg2a.s:194: Error: thumb conditional instruction should be in IT block -- `movcc r4,#0'
/tmp/cckCXg2a.s:195: Error: thumb conditional instruction should be in IT block -- `movcs r4,#-1'
/tmp/cckCXg2a.s:452: Error: thumb conditional instruction should be in IT block -- `movcc r4,#0'
/tmp/cckCXg2a.s:453: Error: thumb conditional instruction should be in IT block -- `movcs r4,#-1'
make[4]: *** [mpn/div_qr_1n_pi1.lo] Error 1
make[4]: Leaving directory `$HOME/builds/gcc/gmp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `$HOME/builds/gcc/gmp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `$HOME/builds/gcc/gmp'
make[1]: *** [all-gmp] Error 2
make[1]: Leaving directory `$HOME/builds/gcc'
make: *** [all] Error 2
I know thumbs have something to do with ARM, but I'm mostly at a loss for why this isn't working. What did I do wrong?
Below are the steps I took in trying to create the cross-compiler. This is my first attempt at trying to make a cross-compiler, so most of this information was gleaned from several webpages and manuals.
Steps Taken
To create the cross compiler I downloaded the following packages:
binutils-2.24
gmp-6.0.0a
mpfr-3.1.2
mpc-1.0.2
gcc-4.6.3
linux-3.15.3
glibc-2.19
These were all unpacked into the directory $HOME.
From there I set the following bash environment variables.
export PREFIX="$HOME/cross_compiler/x86_64"
export TARGET="x86_64-linux-gnu"
export PATH="$PREFIX/bin:$PATH"
I then proceeded to configure, build, and install the binutils.
mkdir -p $HOME/builds/binutils
cd $HOME/builds/binutils
../../binutils-2.24/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-werror
make
make install
Binutils built without any errors, so I proceeded to build gcc. First I moved all the extras into the gcc directory.
mv $HOME/gmp-6.0.0a $HOME/gcc-4.6.3/gmp
mv $HOME/mpfr-3.1.2 $HOME/gcc-4.6.3/mpfr
mv $HOME/mpc-1.0.2 $HOME/gcc-4.6.3/mpc
I then configured, without any errors, and tried to build gcc.
mkdir -p $HOME/builds/gcc
cd $HOME/builds/gcc
../../gcc-4.6.3/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --enable-shared --with-multilib-list=m32,m64 --enable-threads=posix --enable-tls --without-headers
make
This generated the following errors:
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../gcc-4.6.3/gmp -D__GMP_WITHIN_GMP -g -O2 -c -o mpn/div_qr_1n_pi1.lo mpn/div_qr_1n_pi1.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../gcc-4.6.3/gmp -D__GMP_WITHIN_GMP -g -O2 -c mpn/div_qr_1n_pi1.c -o mpn/div_qr_1n_pi1.o
/tmp/cckCXg2a.s: Assembler messages:
/tmp/cckCXg2a.s:194: Error: thumb conditional instruction should be in IT block -- `movcc r4,#0'
/tmp/cckCXg2a.s:195: Error: thumb conditional instruction should be in IT block -- `movcs r4,#-1'
/tmp/cckCXg2a.s:452: Error: thumb conditional instruction should be in IT block -- `movcc r4,#0'
/tmp/cckCXg2a.s:453: Error: thumb conditional instruction should be in IT block -- `movcs r4,#-1'
make[4]: *** [mpn/div_qr_1n_pi1.lo] Error 1
make[4]: Leaving directory `$HOME/builds/gcc/gmp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `$HOME/builds/gcc/gmp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `$HOME/builds/gcc/gmp'
make[1]: *** [all-gmp] Error 2
make[1]: Leaving directory `$HOME/builds/gcc'
make: *** [all] Error 2
BeagleBone Black
Linux version 3.14.1-bone2 (root#imx6q-wandboard-2gb-0) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Sun Apr 20 09:56:48 UTC 2014
"gcc -v" output
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14)
Desktop
This is the computer I am trying to get the code to run on in the end.
Linux version 3.2.0-65-generic (buildd#brownie) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #98-Ubuntu SMP Wed Jun 11 20:27:07 UTC 2014
"gcc -v" output:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Instead of trying to manually build a cross-compiler, I would advise to use one of the existing toolchain generation frameworks: buildroot or crosstool-NG. You need to install some dependencies on your BBB using apt-get, but otherwise it's just a matter of configure; make.
I am using MacPorts to set up a universal build of GCC 4.7.2. One of its dependencies is a subport called libstdcxx, which it builds and then deletes.
I have edited the libstdcxx entry in the gcc47 portfile to keep from deleting the static libstdc++.a library, after rebuilding.
However, the static library is a 64-bit (x86_64) file:
$ sudo port -n upgrade --force libstdcxx +universal
---> Computing dependencies for libstdcxx
...
$ lipo -info /opt/local/lib/libstdc++.a
input file /opt/local/lib/libstdc++.a is not a fat file
Non-fat file: /opt/local/lib/libstdc++.a is architecture: x86_64
I would also like to add support to this file for the i386 architecture.
What additional steps should I follow to build a fat, static libstdc++ library? Or is this not possible with MacPorts? Is the only other option to redistribute and compile the entirety of GCC 4.7.2 twice (to get both i386 and x86_64 architecture support), along with the source to my application, just to link in this one static library?
Addition - 27 Mar 2013
Brett Hale's suggestion did not appear to work. The build process failed. Here is a snippet of the error log:
:notice:configure ---> Configuring libstdcxx
:debug:configure Using compiler 'Mac OS X clang'
:debug:configure Executing proc-pre-org.macports.configure-configure-0
:debug:configure Executing org.macports.configure (libstdcxx)
:debug:configure Environment: CPATH='/opt/local/include' CXXFLAGS='-pipe -O2' CPPFLAGS='-I/opt/local/include' CFLAGS='-pipe -O2' AS_FOR_TARGET='/opt/local/bin/as' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.8' CXX='g++ -arch x86_64 i386' CPP='gcc -arch x86_64 i386 -E\
' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/.CC_PRINT_OPTIONS' F90FLAGS='-pipe -O2' LD_FOR_TARGET='/opt/local/bin/ld' RANLIB_FOR_TARGET='/opt/local/bin/ranlib' LDFLAGS='-L\
/opt/local/lib' OBJDUMP_FOR_TARGET='/opt/local/bin/objdump' OTOOL='/opt/local/bin/otool' FCFLAGS='-pipe -O2' OBJC='/usr/bin/clang' INSTALL='/usr/bin/install -c' AR_FOR_TARGET='/opt/local/bin/ar' NM_FOR_TARGET='/opt/local/bin/nm' FFLAGS='-pipe -O2' OBJCFLAGS='-pipe -O2' CC_PRINT_OPT\
IONS='YES' STRIP_FOR_TARGET='/opt/local/bin/strip' CC='gcc -arch x86_64 i386' OTOOL64='/opt/local/bin/otool'
:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build" && ../gcc-4.7.2/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --includedir=/opt/local/incl\
ude/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/\
c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/lo\
cal/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --enable-languages=c++ --disable-bootstrap --with-pkgversion="MacPorts gcc47 4.7.2_2+universal"'
:debug:configure Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build" && ../gcc-4.7.2/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --includedir=/opt/local\
/include/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/g\
cc47/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/o\
pt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --enable-languages=c++ --disable-bootstrap --with-pkgversion="MacPorts gcc47 4.7.2_2+universal"
:info:configure checking build system type... x86_64-apple-darwin12
:info:configure checking host system type... x86_64-apple-darwin12
:info:configure checking target system type... x86_64-apple-darwin12
:info:configure checking for a BSD-compatible install... /usr/bin/install -c
:info:configure checking whether ln works... yes
:info:configure checking whether ln -s works... yes
:info:configure checking for a sed that does not truncate output... /usr/bin/sed
:info:configure checking for gawk... no
:info:configure checking for mawk... no
:info:configure checking for nawk... no
:info:configure checking for awk... awk
:info:configure checking for libitm support... yes
:info:configure checking for gcc... gcc -arch x86_64 i386
:info:configure checking for C compiler default output file name...
:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build':
:info:configure configure: error: C compiler cannot create executables
:info:configure See `config.log' for more details.
:info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build" && ../gcc-4.7.2/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --includedir=/opt/local/include/\
gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/\
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/\
bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --enable-languages=c++ --disable-bootstrap --with-pkgversion="MacPorts gcc47 4.7.2_2+universal"
:info:configure Exit code: 77
:error:configure org.macports.configure for port libstdcxx returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
while executing
"$procedure $targetname"
:info:configure Warning: targets not executed for libstdcxx: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Please see the log file for port libstdcxx for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/main.log
If you're building gcc with the gcc compiler, you could try to produce universal objects / libraries with the -arch option:
sudo port -n upgrade --force libstdcxx +universal \
configure.cc="gcc -arch x86_64 i386" configure.cxx="g++ -arch x86_64 i386"
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?
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.
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.