Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed for kernel 3.8.13 #257

Closed
eko999 opened this issue Jun 20, 2014 · 3 comments · Fixed by #311
Closed

build failed for kernel 3.8.13 #257

eko999 opened this issue Jun 20, 2014 · 3 comments · Fixed by #311

Comments

@eko999
Copy link

eko999 commented Jun 20, 2014

I tried to build the kpatch source code on kernel 3.8.13, but it's failed, the error message as following:
make -C kpatch-build
make[1]: Entering directory /data/kpatch/kpatch-0.1.5/kpatch-build' make[1]: Nothing to be done forall'.
make[1]: Leaving directory /data/kpatch/kpatch-0.1.5/kpatch-build' make -C kpatch make[1]: Entering directory/data/kpatch/kpatch-0.1.5/kpatch'
make[1]: Nothing to be done for all'. make[1]: Leaving directory/data/kpatch/kpatch-0.1.5/kpatch'
make -C kmod
make[1]: Entering directory /data/kpatch/kpatch-0.1.5/kmod' make -C core clean make[2]: Entering directory/data/kpatch/kpatch-0.1.5/kmod/core'
rm -f -Rf ..o.cmd ..ko.cmd .tmp_versions _.o *.ko *.mod.c
Module.symvers
make[2]: Leaving directory /data/kpatch/kpatch-0.1.5/kmod/core' make -C core make[2]: Entering directory/data/kpatch/kpatch-0.1.5/kmod/core'
make -C /lib/modules/3.8.13-35.1.1.el6uek.x86_64/build M=/data/kpatch/kpatch-0.1.5/kmod/core kpatch.ko
make[3]: Entering directory /usr/src/kernels/3.8.13-35.1.1.el6uek.x86_64' CC [M] /data/kpatch/kpatch-0.1.5/kmod/core/core.o /data/kpatch/kpatch-0.1.5/kmod/core/core.c:158:58: error: macro "hash_for_each_possible_rcu" requires 5 arguments, but only 4 given /data/kpatch/kpatch-0.1.5/kmod/core/core.c: In function ‘kpatch_get_func’: /data/kpatch/kpatch-0.1.5/kmod/core/core.c:158: error: ‘hash_for_each_possible_rcu’ undeclared (first use in this function) /data/kpatch/kpatch-0.1.5/kmod/core/core.c:158: error: (Each undeclared identifier is reported only once /data/kpatch/kpatch-0.1.5/kmod/core/core.c:158: error: for each function it appears in.) /data/kpatch/kpatch-0.1.5/kmod/core/core.c:159: error: expected ‘;’ before ‘if’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:155: warning: unused variable ‘f’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:167:43: error: macro "hlist_for_each_entry_continue_rcu" requires 3 arguments, but only 2 given /data/kpatch/kpatch-0.1.5/kmod/core/core.c: In function ‘kpatch_get_prev_func’: /data/kpatch/kpatch-0.1.5/kmod/core/core.c:167: error: ‘hlist_for_each_entry_continue_rcu’ undeclared (first use in this function) /data/kpatch/kpatch-0.1.5/kmod/core/core.c:168: error: expected ‘;’ before ‘if’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:227:51: error: macro "hash_for_each_rcu" requires 5 arguments, but only 4 given /data/kpatch/kpatch-0.1.5/kmod/core/core.c: In function ‘kpatch_backtrace_address_verify’: /data/kpatch/kpatch-0.1.5/kmod/core/core.c:227: error: ‘hash_for_each_rcu’ undeclared (first use in this function) /data/kpatch/kpatch-0.1.5/kmod/core/core.c:227: error: expected ‘;’ before ‘{’ token /data/kpatch/kpatch-0.1.5/kmod/core/core.c:196: warning: unused variable ‘i’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:769:52: error: macro "hash_for_each_rcu" requires 5 arguments, but only 4 given /data/kpatch/kpatch-0.1.5/kmod/core/core.c: In function ‘kpatch_register’: /data/kpatch/kpatch-0.1.5/kmod/core/core.c:769: error: ‘hash_for_each_rcu’ undeclared (first use in this function) /data/kpatch/kpatch-0.1.5/kmod/core/core.c:770: error: expected ‘;’ before ‘func’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:791:52: error: macro "hash_for_each_rcu" requires 5 arguments, but only 4 given /data/kpatch/kpatch-0.1.5/kmod/core/core.c:791: error: expected ‘;’ before ‘{’ token /data/kpatch/kpatch-0.1.5/kmod/core/core.c:789: warning: unused variable ‘safe’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:789: warning: unused variable ‘kpmod2’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:835: error: ‘LOCKDEP_STILL_OK’ undeclared (first use in this function) /data/kpatch/kpatch-0.1.5/kmod/core/core.c:835: error: too many arguments to function ‘add_taint’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:846:52: error: macro "hash_for_each_rcu" requires 5 arguments, but only 4 given /data/kpatch/kpatch-0.1.5/kmod/core/core.c:847: error: expected ‘;’ before ‘func’ /data/kpatch/kpatch-0.1.5/kmod/core/core.c:733: warning: unused variable ‘i’ make[4]: *_\* [/data/kpatch/kpatch-0.1.5/kmod/core/core.o] Error 1 make[3]: **\* [kpatch.ko] Error 2 make[3]: Leaving directory /usr/src/kernels/3.8.13-35.1.1.el6uek.x86_64'
make[2]: *** [kpatch.ko] Error 2
make[2]: Leaving directory/data/kpatch/kpatch-0.1.5/kmod/core' make[1]: **\* [all] Error 2 make[1]: Leaving directory /data/kpatch/kpatch-0.1.5/kmod'
make: *** [build-kmod] Error 2

@ryanmiao
Copy link
Contributor

Oops, a lot of changes between linux-3.1X and linux-3.8.

@jpoimboe The FAQ part of README said kpatch supports Linux >= 3.7, so this problem should be counted, right?

@jpoimboe
Copy link
Member

While we haven't tested with 3.8, in theory it should work. Looks like some of the interfaces used by our core module have changed since then.

@sjenning
Copy link
Contributor

There are quite a few incompatibilities with 3.8:

/kmod/core/core.c:161:58: error: macro "hash_for_each_possible_rcu" requires 5 arguments, but only 4 given
kmod/core/core.c:836:52: error: macro "hash_for_each_rcu" requires 5 arguments, but only 4 given
kmod/core/core.c:170:43: error: macro "hlist_for_each_entry_continue_rcu" requires 3 arguments, but only 2 given
kmod/core/core.c:911:24: error: ‘LOCKDEP_STILL_OK’ undeclared (first use in this function)
kmod/core/core.c:911:2: error: too many arguments to function ‘add_taint’

Looks like the hash table API and add_taint() changed from 3.8 to 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants