[問題] 安裝舊版gcc的問題

看板Linux作者時間16年前 (2010/03/11 23:29), 編輯推噓2(203)
留言5則, 4人參與, 最新討論串1/1
我現在想要安裝舊版的gcc-3.2.2 (OS:CentOS 5.4, gcc版本 4.1.2) 指令: ../gcc-3.2.2/configure --enable-languages=c,c++ \ --prefix=~shinchun/util/gcc-3.2.2 make bootstrap 原本一開始會有以下錯誤 =================================================================== make[3]: *** [ada.o] Error 1 make[3]: Leaving directory `/opt/opt/nfs_home/shinchun/opt/install/gcc-3.2.2/gcc/ada' make[2]: *** [gnat1] Error 2 make[2]: Leaving directory `/opt/opt/nfs_home/shinchun/opt/install/gcc-3.2.2/gcc' make[1]: *** [stage1_build] Error 2 make[1]: Leaving directory `/opt/opt/nfs_home/shinchun/opt/install/gcc-3.2.2/gcc' make: *** [bootstrap] Error 2 ==================================================================== 後來google找到以下的解答 ==================================================================== Edit the file include/obstack.h in the gcc-3.2.2 source package. Go to line 423 and change it from: *((void **)__o->next_free)++ = ((void *)datum); \ to: *((void **)__o->next_free) = ((void *)datum); \ and add the line __o->next_free += sizeof(void *); \ ==================================================================== 但是make clean make bootstrap以後卻又發生另一個錯誤 這下google也沒用了 ||orz(還是沒打對關鍵字?) ===================================================================== make[4]: *** [libstdc++.la] Error 1 make[4]: Leaving directory `/home/shinchun/install/gcc-3.2.2/i686-pc-linux-gnu/libstdc++-v3/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/shinchun/install/gcc-3.2.2/i686-pc-linux-gnu/libstdc++-v3' make[2]: *** [all-recursive-am] Error 2 make[2]: Leaving directory `/home/shinchun/install/gcc-3.2.2/i686-pc-linux-gnu/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/home/shinchun/install/gcc-3.2.2' make: *** [bootstrap] Error 2 ====================================================================== 麻煩高手解惑 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.116.245.6 ※ 編輯: whisp1222 來自: 140.116.245.6 (03/11 23:33)

03/12 01:29, , 1F
yum install compat-gcc-34 compat-gcc-34-c++
03/12 01:29, 1F
抱歉 這邊我不太了解 你的意思應該是說我缺少了某些套件 或是套件有問題(版本....) 但是make bootstrap不就是用在系統沒有任何compiler的情況下??? 只要有source code 他應該就可以獨立建立出gcc 照理來說應該不會有pacjage depend的問題阿

03/12 01:34, , 2F
這兩個原本都已經裝了
03/12 01:34, 2F

03/12 10:20, , 3F
想用rpm的話,去rpm search找找
03/12 10:20, 3F
※ 編輯: whisp1222 來自: 140.116.245.6 (03/12 19:52)

03/12 20:00, , 4F
1F是說要用舊版gcc的話直接裝那兩個,不用自己編了
03/12 20:00, 4F

03/12 20:30, , 5F
喔喔 了解
03/12 20:30, 5F
文章代碼(AID): #1BcGnZQF (Linux)
文章代碼(AID): #1BcGnZQF (Linux)