Build & Install GCC4.6.3 in CentOS (5.2 & 6.3)
来源:互联网 发布:收快递的软件 编辑:程序博客网 时间:2024/06/04 00:25
I did not know if you have already installed gmp, mpfr, mpc before build gcc4.6.3, if you did not, please refer to these to build GCC4.6.3:
and you could download all of the packages from my Share_Point or gcc mirror
And you could get all of these scripts(including gcc.4.6.3.conf) from HERE
1. build & install gmp:
tar jxf gmp-4.3.2.tar.bz2 &&cd gmp-4.3.2/
./configure --prefix=/usr/local/gmp
make &&make install
cd ..
2. build & install mpfr:
tar jxf mpfr-2.4.2.tar.bz2 ;cd mpfr-2.4.2/
./configure --prefix=/usr/local/mpfr -with-gmp=/usr/local/gmp
make &&make install
cd ..
3. build & install mpc:
tar xzf mpc-0.8.1.tar.gz ;cd mpc-0.8.1
./configure --prefix=/usr/local/mpc -with-mpfr=/usr/local/mpfr -with-gmp=/usr/local/gmp
make &&make install
cd ..
After build & install these libs, you could start to build & Install gcc4.6.3:
4. build & install gcc4.6.3
tar jxf gcc-4.6.3.tar.bz2 ;cd gcc-4.6.3
./configure --prefix=/usr/local/gcc -enable-threads=posix -disable-checking -disable-multilib -enable-languages=c,c++ -with-gmp=/usr/local/gmp -with-mpfr=/usr/local/mpfr/ -with-mpc=/usr/local/mpc/
if
[ $? -eq 0 ];then
echo "this gcc configure is success"
else
echo "this gcc configure is failed"
fi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
make && make install
[ $? -eq 0 ] && echo install success
5. set up the gcc env:
-- this is really important. or even you successfully built the GCC, you could not build hhvm successfully. the gcc.4.6.3.conf(find it in share point above).
cp gcc.4.6.3.conf /etc/ld.so.conf.d/gcc.4.6.3.conf
ldconfig
mv /usr/bin/gcc /usr/bin/gcc_old
mv /usr/bin/g++ /usr/bin/g++_old
mv /usr/bin/c++ /usr/bin/c++_old
ln -s -f /usr/local/gcc/bin/gcc /usr/bin/gcc
ln -s -f /usr/local/gcc/bin/g++ /usr/bin/g++
ln -s -f /usr/local/gcc/bin/c++ /usr/bin/c++
cp /usr/local/gcc/lib64/libstdc++.so.6.0.16 /usr/lib64/.
mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak
ln -s -f /usr/lib64/libstdc++.so.6.0.16 /usr/lib64/libstdc++.so.6
6. finished.
you could run gcc --version to check if the current gcc version is gcc4.6.3, and also need to check g++, to see if the version is changed to g++4.6.3 too.
and then you could make your hhvm.
- Build & Install GCC4.6.3 in CentOS (5.2 & 6.3)
- CentOS install GCC4.8.1
- CentOS install GCC4.8.1
- centos gcc4.9.2 install
- gcc4.9.3 install in linux
- 在CentOS 6.3编译gcc4.7.2
- centos 6.3 & redis install
- install nginx in centos
- install nginx in centos
- gcc install in CentOS
- CentOS 6.3 下build tesseract
- install mysql in centos 6
- telnet install in centos 6
- install salt in centos 6.5
- Install terminator in CentOS 7
- Install NextCloud in CentOS 7
- [centos]install python3.5 in centos
- centos 安装gcc4.8
- JAVA中主数据类型的过载问题
- Java 面向切面编程(Aspect Oriented Programming,AOP)
- ubuntu 10.10不再提供支持后的source list 更新
- HDU 3389 Game(nim博弈)
- 使用 Adobe Acrobat 裁剪 PDF 白边及其他操作
- Build & Install GCC4.6.3 in CentOS (5.2 & 6.3)
- linux 修改IP
- Java中System类
- Linux C 文件操作
- Netty线程模型
- 金融风控-->客户流失预警模型-->金融数据分析
- 【Spring】Spring整合Struts2
- Spring Boot 快速入门教程
- 嵌入式linux--电子相册