Can not build either kernel nor 'world'

Scot Hetzel swhetzel at
Wed Nov 24 07:58:54 UTC 2010

On Tue, Nov 23, 2010 at 9:40 PM, Zhihao Yuan <lichray at> wrote:
> OK, I know what happened. The version that I used to buildworld happens to
> have a bug in gcc, which just crashes and crashes. Then I tried to use the
> external gcc42 to build the kernel, but I got the error message:
> cc1: error: unrecognized command line option: -fformat-extension
> So what, where can I get a working build tools that work for the kernel &
> world, or how can I downgrade the world so I can get a working gcc and devd?
The following may help in getting your system running, but hasn't been tested:

1. Either update or downgrade your sources to get past the gcc bug.
2. Boot the FreeBSD livefs CD/memstick
3. mount your partions

mkdir /mnt
mount -t ufs /dev/ad0s1a /mnt
mount -t ufs /dev/ad0s1d /mnt/usr
mount -t ufs /dev/ad0s1e /mnt/var

4. link /mnt/usr/obj directory

ln -s /mnt/usr/obj /usr/obj

5. Build world and kernel

cd /mnt/usr/src/
make buildworld
make buildkernel KERNCONF=MYKERNEL

6. Install the new world and kernel

make installworld DESTDIR=/mnt
make installkernel DESTDIR=/mnt KERNCONF=MYKERNEL
mergemaster -i -C -D /mnt

7.  Reboot the computer and remove the fixit CD


More information about the freebsd-stable mailing list