Skip to contentSkip to conversation

Compilation fails

DISCUSSION Iratxo Pichel Ortiz 3 participants 3 messages Jun 20, 2012 – Jun 21, 2012

lore
Share & tools
lore
#0 lore raw

Hi all!

We have detected a compilation error in the following scenario:

1. kernel linux-3.4.3
2. patch-3.4.3-rt11.patch
3. make mpc85xx_defconfig
4. Select full preemption.

After make you get:

$ make
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      arch/powerpc/kernel/asm-offsets.s
In file included from include/linux/spinlock.h:273:0,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/powerpc/kernel/asm-offsets.c:17:
include/linux/spinlock_rt.h: In function 'assert_spin_locked':
include/linux/spinlock_rt.h:161:2: error: implicit declaration of function 'BUG_ON' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

A quick and dirt solution is to add the line:

#include <asm/bug.h>

just before the definition of the function:

static inline void assert_spin_locked(spinlock_t *lock)

in the file: include/linux/spinlock_rt.h

I assume that there is a missing include somewhere in the include path, but I cannot find it so far. I hope this information helps.

Regards,

Iratxo.

Signature · 17 lines
Iratxo Pichel Ortiz
CTO

Albentia Systems S.A.
http://www.albentia.com

Mobile: +34 658588745
C\Margarita Salas 22
Parque Tecnológico de Leganés
Leganés (28918)
Madrid
Spain

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

Hi

I had the same problem with
* Kernel 3.4.2
* Patch 3.4.2 rt 10
* make for a mpc8xx custom board

As far as I remember I added an #include to <asm/bug.h> in include/linux/spinlock.h and it worked

Regards
Christophe

Quoted 37 lines · Iratxo Pichel Ortiz

Hi all!

We have detected a compilation error in the following scenario:

1. kernel linux-3.4.3
2. patch-3.4.3-rt11.patch
3. make mpc85xx_defconfig
4. Select full preemption.

After make you get:

$ make
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      arch/powerpc/kernel/asm-offsets.s
In file included from include/linux/spinlock.h:273:0,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/powerpc/kernel/asm-offsets.c:17:
include/linux/spinlock_rt.h: In function 'assert_spin_locked':
include/linux/spinlock_rt.h:161:2: error: implicit declaration of function 'BUG_ON' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

A quick and dirt solution is to add the line:

#include <asm/bug.h>

just before the definition of the function:

static inline void assert_spin_locked(spinlock_t *lock)

Quoted 8 lines

in the file: include/linux/spinlock_rt.h

I assume that there is a missing include somewhere in the include path, but I cannot find it so far. I hope this information helps.

Regards,

Iratxo.

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 9 lines · leroy christophe

Hi

I had the same problem with
* Kernel 3.4.2
* Patch 3.4.2 rt 10
* make for a mpc8xx custom board

As far as I remember I added an #include to <asm/bug.h> in include/linux/spinlock.h and it worked

Either should work, but since only spinlock_rt.h references BUG(), it should go in that file.

-- Steve