tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't compile NetBSD kernel in Virtual Box due to assym.h error



On Mon, Jul 03, 2017 at 01:17:26PM -0400, Devin Steffler wrote:
> NetBSD kernel:
> https://www.netbsd.org/docs/guide/en/chap-kernel.html
> and section 30.3.1 from https://www.netbsd.org/docs/guide/en/chap-fetch.html
> to get the syssrc.tgz file.

Which one is that? The 7.1 release?

The version you installed in virtual box is 7.1 as well?

> cp GENERIC MYKERNEL
> config MYKERNEL
> cd ../compile/MYKERNEL
> make depend

Are you sure you did not modify MYKERNEL in between?

> ../../../../sys/ucontext.h:114:1: note: in expansion of macro '__CTASSERT'
>  __CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
>  ^

This is the error: the declaration of ucontext_t does not create a structure
of the expected size.

This means: something is wrong in your compilation environment. Either the
wrong headers are used (or headers for the wrong architecture), or the build
system is broken.

The latte is possible, not very many people compile kernels only, and in
the usual cross-build setup, everything is handled automatically.

However, what you did (and what is described in the guide) should work - so
let us find out what went wrong where.

I tried it on a system running NetBSD/i386 from the netbsd-7 branch with
an i386 GENERIC copied to MYKERNEL and it works for me.

Martin


Home | Main Index | Thread Index | Old Index