作者whisp1222 ()
看板Linux
標題[問題] 安裝舊版gcc的問題
時間Thu Mar 11 23:29:37 2010
我現在想要安裝舊版的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)
推 chiouss:yum install compat-gcc-34 compat-gcc-34-c++ 03/12 01:29
抱歉 這邊我不太了解
你的意思應該是說我缺少了某些套件 或是套件有問題(版本....)
但是make bootstrap不就是用在系統沒有任何compiler的情況下???
只要有source code 他應該就可以獨立建立出gcc
照理來說應該不會有pacjage depend的問題阿
→ whisp1222:這兩個原本都已經裝了 03/12 01:34
→ bob770717:想用rpm的話,去rpm search找找 03/12 10:20
※ 編輯: whisp1222 來自: 140.116.245.6 (03/12 19:52)
推 Adama:1F是說要用舊版gcc的話直接裝那兩個,不用自己編了 03/12 20:00
→ whisp1222:喔喔 了解 03/12 20:30