2016年7月29日 星期五

[GCC] How to compile GCC-6.1.0

Download GCC-6.1.0
Start to compile the package.
Edit so library path to /etc/ld.so.conf.d/xxx.conf
Add /usr/local/lib into xxx.conf.
Execute ldconfig to reload



Q:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
A:
When compile gcc-6.1.0 meet above error, please compile following package.
GMP
MPFR
MPC


Q:
error: cannot compute suffix of object files: cannot compile
A:
Add GMP, MPFR, MPC library path.
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
Reference:
- Cannot compute suffix of object files : gcc 4.4.x and > : installation problem solved





Glibc need latest gcc to compile it.
The following error is compiling glibc-2.23 will appear.
Q:
configure: error: you must configure in a separate build directory
A:
glibc-2.23
create another folder..
mkdir /tmp/glibc-build
cd /tmp/glibc-build
cd into that folder and configure from there …
/tmp/glibc-./configure
Reference:
- Configuring glibc



Q:
checking for as… as
checking version of as… 2.20.1, bad
checking for ld… ld
checking version of ld… 2.20.1, bad
missing or too old: as ld compiler
A:
as ld is include into binutils.
binutils
compiler is include into gcc.

0 意見:

張貼留言