Skip to contentSkip to conversation

build failure

4.1.2-rt1 Grygorii Strashko 2 participants 2 messages Jul 17, 2015 – Jul 20, 2015

lore
Share & tools
lore
#0 lore raw

Hi All,

I've just tried v4.1.2-rt1 RT-patch set and got below build failure:

CC kernel/pid_namespace.o
In file included from kernel/pid_namespace.c:11:0:
include/linux/pid.h: In function 'get_pid':
include/linux/pid.h:78:3: error: implicit declaration of function 'atomic_inc' [-Werror=implicit-function-declaration]
atomic_inc(&pid->count);
^
CC drivers/base/regmap/regcache-flat.o
CC fs/lockd/xdr4.o
cc1: some warnings being treated as errors
CC drivers/base/regmap/regmap-debugfs.o
make[1]: *** [kernel/pid_namespace.o] Error 1
make: *** [kernel] Error 2
make: *** Waiting for unfinished jobs....

I identified that it's reproduced in case
CONFIG_PROVE_LOCKING=n
CONFIG_DEBUG_SPINLOCK=n
CONFIG_DEBUG_MUTEXES=n
CONFIG_DEBUG_LOCK_ALLOC=n

The same is not reproduced without RT-patch set.

The below diff fixes an issue for me:

include/linux/pid.h +1 -0
index 23705a53..2cc64b7 100644
@@ -2,6 +2,7 @@
 #define _LINUX_PID_H
 
 #include <linux/rcupdate.h>
+#include <linux/atomic.h>
 
 enum pid_type
 {

[1] https://lkml.org/lkml/2015/7/14/389

Signature · 2 lines
regards,
-grygorii
#1 lore raw
Quoted 6 lines · * Grygorii Strashko | 2015-07-17 19:47:30 [+0300]:

CC kernel/pid_namespace.o
In file included from kernel/pid_namespace.c:11:0:
include/linux/pid.h: In function 'get_pid':
include/linux/pid.h:78:3: error: implicit declaration of function 'atomic_inc' [-Werror=implicit-function-declaration]
atomic_inc(&pid->count);
^

this is one of the patches I've thrown away because it looked not needed. On vanilla this header gets sucked in via include/linux/spinlock.h but on -RT we don't need it and we get this.

Quoted 11 lines

The below diff fixes an issue for me:

include/linux/pid.h +1 -0
index 23705a53..2cc64b7 100644
@@ -2,6 +2,7 @@
 #define _LINUX_PID_H
 
 #include <linux/rcupdate.h>
+#include <linux/atomic.h>
 
Quoted 2 lines

enum pid_type
{

If you manage so send me this as a proper patch then I could include it into the patchset.

Sebastian