用户工具

站点工具


zh:notes:update_gcc

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
zh:notes:update_gcc [2020/08/28 15:55]
pzczxs [Redirect Link]
zh:notes:update_gcc [2022/06/30 11:28] (当前版本)
pzczxs 讨论状态变化了
行 1: 行 1:
-====== Update ​g++ ======+====== Update ​gcc ======
 ===== Operation System ===== ===== Operation System =====
 CentOS 6.8 (64 bits), CentOS 7.6 (64 bits) CentOS 6.8 (64 bits), CentOS 7.6 (64 bits)
行 7: 行 7:
 > wget http://​ftp.gnu.org/​gnu/​gcc/​gcc-10.2.0/​gcc-10.2.0.tar.gz > wget http://​ftp.gnu.org/​gnu/​gcc/​gcc-10.2.0/​gcc-10.2.0.tar.gz
 > tar -zxvf gcc-10.2.0.tgz > tar -zxvf gcc-10.2.0.tgz
 +> rm -f gcc-10.2.0.tgz
 </​code>​ </​code>​
  
行 22: 行 23:
 > make -j4 # for multi-core optimization > make -j4 # for multi-core optimization
 > make install > make install
-> ls /​usr/​local/​bin |grep gcc # check whether it is installed successfully or not+> ls /​usr/​local/​bin | grep gcc # check whether it is installed successfully or not
  
 #To restart the operation system,and then check the version. ​ #To restart the operation system,and then check the version. ​
行 33: 行 34:
 # If "​GLIBCXX_3.4.28"​ is not shown in the list, please run the following commands. ​ # If "​GLIBCXX_3.4.28"​ is not shown in the list, please run the following commands. ​
 > find / -name "​libstdc++.so"​ > find / -name "​libstdc++.so"​
 +> find / -name "​libgomp.so"​
  
 # copy the latest library # copy the latest library
 > cd /usr/lib64 > cd /usr/lib64
 > cp /​root/​xushuo/​gcc-10.2.0/​gcc-build-10.2.0/​stage1-x86_64-pc-linux-gnu/​libstdc++-v3/​src/​.libs/​libstdc++.so ./ > cp /​root/​xushuo/​gcc-10.2.0/​gcc-build-10.2.0/​stage1-x86_64-pc-linux-gnu/​libstdc++-v3/​src/​.libs/​libstdc++.so ./
 +> cp /​root/​xushuo/​gcc-10.2.0/​gcc-build-10.2.0/​stage1-x86_64-pc-linux-gnu/​libgomp/​.libs/​libgomp.so ./
  
 # delete the old soft link and then create the new one # delete the old soft link and then create the new one
 > rm -rf libstdc++.so.6 > rm -rf libstdc++.so.6
 +> rm -rf libgomp.so.1
 > ln -s libstdc++.so libstdc++.so.6 > ln -s libstdc++.so libstdc++.so.6
 +> ln -s libgomp.so libgomp.so.1
  
 # In this time, "​GLIBCXX_3.4.28"​ should appear. # In this time, "​GLIBCXX_3.4.28"​ should appear.
行 46: 行 51:
 </​code>​ </​code>​
  
-~~DISCUSSION~~+~~DISCUSSION:closed~~
zh/notes/update_gcc.1598601355.txt.gz · 最后更改: 2020/08/28 15:55 由 pzczxs