05 March, 2008

make buildworld from 6.3-STABLE to 7.0-RELEASE

$ uname -r
6.3-STABLE
I am updating from FreeBSD 6.3-STABLE to 7.0-RELEASE. First I ran cvsup to synchronize my source with RELENG_7_0. When I started through the steps of rebuilding world, I had problems when running make buildworld.
cc1: out of memory allocating 97582896 bytes

Stop in /usr/src/gnu/usr.bin/cc/cc_int.
*** Error code 1

Stop in /usr/src/gnu/usr.bin/cc.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
I fixed it by installing ccache and editing /etc/make.conf (see ccache-howto-freebsd.txt).
cd /usr/ports/devel/ccache
make install clean

vim /etc/make.conf
.if !defined(NOCCACHE)
CC=/usr/local/libexec/ccache/world-cc
CXX=/usr/local/libexec/ccache/world-c++
.endif
:wq
Now I can run make cleandir and then make buildworld in /usr/src and don't get errors. I finish up the steps for rebuilding world after that.
$ uname -r
7.0-RELEASE

No comments:

Post a Comment