This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Need help to complile gcc-5.1.0
- From: "Rai, Raj (CSSA)" <Raj dot Rai at abglobal dot com>
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 7 Jul 2015 06:42:29 +0000
- Subject: Need help to complile gcc-5.1.0
- Authentication-results: sourceware.org; auth=none
- References: <D0EE465C9FF33A488E5577AD35D5212652D904DA at W01P0100 dot ac dot lp dot acml dot com> <D0EE465C9FF33A488E5577AD35D5212652D904FA at W01P0100 dot ac dot lp dot acml dot com>
Hi Experts
Facing hard time to compile and install 5.1.0.Currently our system is already having gcc-4.4.7/g+-4.4.7 and need to upgrade it to 5.1.0 on rhel6.2.I have used below action plan but it,s failing with below errors.I tried multiple options with configuring gcc5.1.0 everytime same error.
Any help is highly appreciated.
Current System Info
(rraiop)@dc2nix2d118>gcc -v
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-11) (GCC)
(rraiop)@dc2nix2d118>
(rraiop)@dc2nix2d118>g++ -v
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-11) (GCC)
Action Plan
Compile and Install gcc-5.1.0 on Linux server
1. Download all pre-requsite libraries and install them under /usr/local/<name>
1. Here they are
1. using yum: install gcc-c++ if it hasn.t been installed
2. download gmp: https://ftp.gnu.org/gnu/gmp/ get version 6.0.0
3. download mpfr http://www.mpfr.org/ get version 3.1.3
4. downlaod mpc http://www.multiprecision.org/. get version 1.0.3
5. download gcc http://gcc.gnu.org/releases.html get version 5.1.0
6. using yum install :yum install libstdc++-devel.i686 glibc-devel-i686; yum install zlib.i686;yum install zlib-devel.i686 zlib-devel*
7. Compile gmp
- Uncompress and untar ( from #2)
- Switch to dir
./configure --prefix=/usr/local/gmp6.0.0
make;make install ( if configure above returns no errors)
8. Compile mpfr
- Uncompress and untar ( from #3)
- Switch to dir
./configure --prefix=/usr/local/mpfr3.1.3 --with-gmp-include=/usr/local/gmp6.0.0/include --with-gmp-lib=/usr/local/gmp6.0.0/lib
make;make install ( if configure above returns no errors)
9. Compile mpc
- Uncompress and untar ( from #4)
- Switch to dir
./configure --prefix=/usr/local/mpc1.0.3 --with-gmp-include=/usr/local/gmp6.0.0/include --with-gmp-lib=/usr/local/gmp6.0.0/lib --with-mpfr-include=/usr/local/mpfr3.1.3/include/ --with-mpfr-lib=/usr/local/mpfr3.1.3/lib/
make;make install ( if configure above returns no errors)
10. Export LD-LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/gmp6.0.0/lib:/usr/local/mpc1.0.3/lib:/usr/local/mpfr3.1.3/lib:/usr/local/isl0.14/lib:/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64
11. Configure gcc
./configure --prefix=/usr/local/gcc5.1.0 --with-isl-include=/usr/local/isl0.14/include --with-isl-lib=/usr/local/isl0.14/lib --with-gmp-include=/usr/local/gmp6.0.0/include --with-gmp-lib=/usr/local/gmp6.0.0/lib --with-mpfr-include=/usr/local/mpfr3.1.3/include --with-mpfr-lib=/usr/local/mpfr3.1.3/lib --with-mpc-include=/usr/local/mpc1.0.3/include --with-mpc-lib=/usr/local/mpc1.0.3/lib --disable-multilib --with-system-zlib --disable-bootstrap
make;make install
Error
Truncated
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:71,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42,
from ../.././gcc/system.h:201,
from ../.././gcc/genmddeps.c:19:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/debug/debug.h: At global scope:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/debug/debug.h:47: error: expected constructor, destructor, or type conversion before ânamespaceâ
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream_insert.h:36,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:46,
from ../.././gcc/system.h:201,
from ../.././gcc/genmddeps.c:19:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cxxabi-forced.h:29: error: expected declaration before end of line
make[2]: *** [build/genmddeps.o] Error 1
make[2]: Leaving directory `/gcc/gcc-5.1.0/host-x86_64-unknown-linux-gnu/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/gcc/gcc-5.1.0'
make: *** [all] Error 2
............................................................................
For further important information about AllianceBernstein please click here
http://www.abglobal.com/disclaimer/email/disclaimer.html