[LITMUS^RT] Litmus RT building problem

Alfred Zhong alfchung02 at gmail.com
Fri Feb 17 00:10:13 CET 2012


Hi dear Litmus RT developers,

Question Summary:
I tried to build Litmus RT following this tutorial
https://wiki.litmus-rt.org/litmus/InstallationInstructions

 I encountered an compiling error after typing, I found a hack to get
around it and built the kernel successfully. However, I would like to know
the standard way to do it.



Here is the detail:

At the stage of
$ make bzImage

I got this error
litmus/sched_plugin.c:85:4: error: implicit declaration of function
‘request_exit_np_atomic’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

So I search where this function is declared
$ grep -r "request_exit_np_atomic" *

and found
include/litmus/litmus.h:inline int request_exit_np_atomic(struct
task_struct *t)

then I discovered that this declaration in litmus.h is inside
#ifdef CONFIG_NP_SECTION
...
#else
...

and I search for CONFIG_NP_SECTION and found it is not defined anywhere, so
the function 'request_exit_np_atomic' is never declared.

then I added
#define CONFIG_NP_SECTION
before
#include <litmus/litmus.h> in sched_plugin.c

Then I got another error.
include/litmus/litmus.h: In function ‘is_kernel_np’:
include/litmus/litmus.h:135:18: error: ‘struct rt_param’ has no member
named ‘kernel_np’
include/litmus/litmus.h: In function ‘make_np’:
include/litmus/litmus.h:157:11: error: ‘struct rt_param’ has no member
named ‘kernel_np’
include/litmus/litmus.h: In function ‘take_np’:
include/litmus/litmus.h:165:20: error: ‘struct rt_param’ has no member
named ‘kernel_np’
In file included from litmus/sched_plugin.c:16:0:
include/litmus/sched_plugin.h: At top level:
include/litmus/sched_plugin.h:59:6: warning: ‘struct litmus_lock’ declared
inside parameter list [enabled by default]
include/litmus/sched_plugin.h:59:6: warning: its scope is only this
definition or declaration, which is probably not what you want [enabled by
default]
litmus/sched_plugin.c: In function ‘is_kernel_np’:
include/litmus/litmus.h:136:1: warning: control reaches end of non-void
function [-Wreturn-type]
make[1]: *** [litmus/sched_plugin.o] Error 1
make: *** [litmus] Error 2

And here is my hack to get around. I copied the whole function of
'request_exit_np' to the beginning of sched_plugin.c, and this time it
builds the whole kernel successfully.

I am wondering if there is anything else I need to configure that the
tutorial doesn't mention to make this go in a standard way?


Thanks!
Alfred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120216/41c5e6a1/attachment.html>


More information about the litmus-dev mailing list