Kernel Build errors

David O'Brien obrien at freebsd.org
Thu Dec 2 16:53:31 PST 2004


On Thu, Dec 02, 2004 at 03:38:35PM -0500, Egor Dmitrenkov wrote:
> > Something is very weird -- you're trying to compile a 'i386' platform
> > file and not the proper 'amd64' platform file.
> > 
> > You show you're trying to build a 64-bit kernel (vs. 32-bit), but let me
> > ask that this is true just to be perfectly clear.
> > 
> Yes, I'm trying to build a 64-bit kernel.

Ok, so now I'm going to assume you're trying to do this on a 32-bit
FreeBSD/i386 5.3 system; since there aren't any other details otherwise.
First question is why don't you just don't download and install
FreeBSD/amd64 5.3 onto your Athlon64 system?

However, if you want to build an amd64 kernel on an i386 system (ie, a
cross build):

    # cd /usr/src
    # rm -rf /usr/obj/*
    # make cleandir ; make cleandir
    # make TARGET_ARCH=amd64 buildworld
    # make KERNCONF=GENERIC TARGET_ARCH=amd64 buildkernel

note that the 2nd and 3rd steps aren't typically needed, but I have no
idea the state of your /usr/src and /usr/obj dirs.

> > On Thu, Dec 02, 2004 at 12:34:05PM -0600, nmeverde at np.k12.mn.us wrote:
> > Geez, could you *please* trim some of the uneeded _1030_ lines in the
> > original post when you follow up?!?
.. 
> Sorry for flooding, I thought that this info can be useful...

>From you it was useful.  From nmeverde at np.k12.mn.us it wasn't.


> Result(last command and errmsg):
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -Wall
..
> /src/sys/amd64/amd64/genassym.c
> /usr/src/sys/amd64/amd64/genassym.c:1: error: code model `kernel' not supported
> in the 32 bit mode
> *** Error code 1 

You're still using the i386 32-bit kernel to build an AMD64 kernel.  The
32-bit i386 compiler doesn't understand the AMD64-specific compiler
switches.

-- 
-- David  (obrien at FreeBSD.org)


More information about the freebsd-amd64 mailing list