我构建了 gcc 4.6.1,当我运行ldconfig
它时,它会返回以下结果:
ldconfig: /usr/local/mpc/lib/libmpc.so.2 is not a symbolic link
ldconfig: /usr/local/gmp/lib/libgmp.so.3 is not a symbolic link
ldconfig: /usr/local/mpfr/lib/libmpfr.so.1 is not a symbolic link
这是我使用库构建 gcc 的方式:
tar jxf gmp-4.3.2.tar.bz2
cd gmp-4.3.2/
./configure --prefix=/usr/local/gmp
make
make install
cd ..
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 ..
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 ..
tar jxf gcc-4.6.1.tar.bz2
cd gcc-4.6.1
./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/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
make
make install
cp gcc.4.6.1.conf /etc/ld.so.conf.d/gcc.4.6.1.conf
ldconfig
mv /usr/bin/gcc /usr/bin/gcc_old
mv /usr/bin/g++ /usr/bin/g++_old
ln -s -f /usr/local/gcc/bin/gcc /usr/bin/gcc
ln -s -f /usr/local/gcc/bin/g++ /usr/bin/g++
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
请说我不需要重建 gcc!这个符号链接问题真的会影响程序吗?或者它不会有任何区别,它会时不时地弹出,例如当我也是yum install
某些事情的时候。提前致谢。