我現在想要安裝舊版的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
======================================================================
麻煩高手解惑
--
(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
======================================================================
麻煩高手解惑
--
All Comments