Need help to complile gcc-5.1.0
Jonathan Wakely
jwakely.gcc@gmail.com
Tue Jul 7 09:01:00 GMT 2015
On 7 July 2015 at 07:42, Rai, Raj (CSSA) wrote:
> 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
You're making this far too complicated.
See https://gcc.gnu.org/wiki/InstallingGCC for a much easier approach
that replaces steps 1-10 with a single command.
> 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
Don't build GCC in the source directory. Again, see the link above.
> 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
These errors don't make any sense unless you're doing something
strange, but please try following the steps at the link above (after
removing the entire GCC source tree and untarring it again into an
empty directory).
More information about the Gcc-help
mailing list