zfs module error in kernel compilation

I am trying to compile my own kernel from source, but i get this error:
Code:
/usr/src/sys/modules/zfs/../../cddl/compat/opensolaris/kern/opensolaris_taskq.c:43: error: redefinition of 'struct ostask'
I'm on 8-0 RELASE, i cannot even compile GENERIC kernel, getting the same error. What am I doing wrong? I type "make buildkernel" in /usr/src and get this message.
 
First make sure you are able to build world and the GENERIC kernel.
 
vrachil said:
is the kernel src up to date?
I used the src from instalation cd, then did freebsd-update and tried compilation again, but getting the same error.
vrachil said:
have you tried compiling only the zfs module? (it's in sys/modules/zfs)
Yes, I get the same message.

SirDice said:
First make sure you are able to build world and the GENERIC kernel.
Is it necessary to build world? I did just "make buildkernel".
 
If the sources under /usr/src are a different version from the version of the binaries on the system, then yes, you must run buildworld first.

You can only skip the buildworld step if the world, kernel, and source trees are in sync.
 
How do I check if they are in sync?

Did "make buildworld" but get lots of errors:
Code:
/usr/src/lib/libc/gen/sem.c: In function 'sem_check_validity':
/usr/src/lib/libc/gen/sem.c:95: error: invalid type argument of '->'
/usr/src/lib/libc/gen/sem.c: In function 'sem_free':
/usr/src/lib/libc/gen/sem.c:107: error: invalid type argument of '->'
/usr/src/lib/libc/gen/sem.c:108: error: invalid type argument of '->'
/usr/src/lib/libc/gen/sem.c:109: error: invalid type argument of '->'
/usr/src/lib/libc/gen/sem.c:110: error: incompatible type for argument 1 of 'free'
http://pastebin.com/7QT2F6Eh here is full output. What am I doing wrong?
 
Ok, I deleted all the /usr/src, downloaded new one from FTP and did all the stuff described in handbook and now it seems fine. Thank you for help.
 
Back
Top