Project

General

Profile

Bug #303

compat-patches/0002-genl-const.cocci fails with a 4.8-rc7 kernel

Added by Linus Lüssing almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
10/31/2016
Due date:
% Done:

0%

Estimated time:

Description

I'm getting the following error when trying to compile the current batman-adv master branch for a 4.8-rc7 kernel:

EXTRA_CFLAGS="-Werror -D__CHECK_ENDIAN__ -DDEBUG -g -O0" /usr/bin/make CONFIG_BATMAN_ADV_DEBUG=y CHECK="sparse -Wsparse-all -Wno-ptr-subtraction-blows -Werror -D__CHECK_ENDIAN__ -DDEBUG" CC=cgcc KERNELPATH=/home/tux/mesh-node/usr/src/linux-headers-4.8.0-rc7+ CONFIG_BATMAN_ADV_BATMAN_V=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_MCAST=y
/home/tux/dev/batman-adv-t_x/gen-compat-autoconf.sh /home/tux/dev/batman-adv-t_x/compat-autoconf.h
mkdir -p /home/tux/dev/batman-adv-t_x/build/net/batman-adv/
  COMPAT_PATCH 0001-netlink-portid.cocci
0001-netlink-portid.cocci
/home/tux/dev/batman-adv-t_x
init_defs_builtins: /usr/share/coccinelle/standard.h
HANDLING: /home/tux/dev/batman-adv-t_x/build/net/batman-adv/netlink.c
diff = 
HANDLING: /home/tux/dev/batman-adv-t_x/build/net/batman-adv/bat_algo.c
diff = 
HANDLING: /home/tux/dev/batman-adv-t_x/build/net/batman-adv/bat_iv_ogm.c
diff = 
HANDLING: /home/tux/dev/batman-adv-t_x/build/net/batman-adv/translation-table.c
diff = 
HANDLING: /home/tux/dev/batman-adv-t_x/build/net/batman-adv/bridge_loop_avoidance.c
diff = 
HANDLING: /home/tux/dev/batman-adv-t_x/build/net/batman-adv/bat_v.c
diff = 
  COMPAT_PATCH 0002-genl-const.cocci
0002-genl-const.cocci
/home/tux/dev/batman-adv-t_x
init_defs_builtins: /usr/share/coccinelle/standard.h
Fatal error: exception Failure("plus: parse error: 
 = File "compat-patches/0002-genl-const.cocci", line 6, column 14,  charpos = 81
    around = 'struct', whole content = +__genl_const struct genl_multicast_group
")
Makefile:111: recipe for target '/home/tux/dev/batman-adv-t_x/build/net/batman-adv/.compat-prepared' failed
make: *** [/home/tux/dev/batman-adv-t_x/build/net/batman-adv/.compat-prepared] Error 2

Bisecting leads me to this commit 2f9f52d1dfc417201028cc65f91aaddc5eaf493a ("batman-adv: compat: Move netlink const compat to coccinelle").

EDIT: coccinelle version is from Debian stable: 1.0.0~rc22.deb-1

EDIT2: Trying to compile for a 4.9-rc3 kernel does not help. Compiling on a Debian Sid with a newer coccinelle (1.0.4.deb-3+b1) seems to apply the .cocci files fine, though.

History

#1

Updated by Linus Lüssing almost 5 years ago

  • Description updated (diff)
#2

Updated by Linus Lüssing almost 5 years ago

  • Description updated (diff)
#3

Updated by Sven Eckelmann almost 5 years ago

  • Assignee set to Linus Lüssing
  • Status changed from New to Feedback

Seems to be a bug in the debian package which was fixed with coccinelle 1.0.3.deb-2. Any ideas how to deal with it? Do you think we should revert the coccinelle patches again?

#5

Updated by Jean-Jacques Sarton almost 5 years ago

With coccinelle-1.0.5-2.fc24 (Fedora) I have the same problems

#6

Updated by Linus Lüssing almost 5 years ago

Jean-Jacques Sarton wrote:

With coccinelle-1.0.5-2.fc24 (Fedora) I have the same problems

Hm, okay, that's weird. That's even newer than the Debian unstable one which works for me. Need to investigate further, I guess.

#7

Updated by Linus Lüssing over 4 years ago

I've built coccinelle 1.0.6 from the according github tag. I further added a "ln -s ./spatch.opt ./spatch" in the build directory. Then I tried compiling batman-adv with a preceding PATH variable to the coccinelle build directory.

Now this fails for me both on Debian Sid and Stretch.

So it seems it's not the coccinelle version exactly, but probably some build option? Or something is different with a more recent Debian package version?

#8

Updated by Sven Eckelmann over 4 years ago

Yes, this sounds plausible. My guess was that either some build option or dependency was different. I think I've read that some important dependency was first shipped as part of coccinelle because the actual upstream was not working as expected. This was later fixed upstream and then coccinelle switched back to upstream. But I cannot find the mails anymore - so maybe I am remembering incorrectly. But at least this sounds like a possible reason why the behavior is sometimes different.

#9

Updated by Sven Eckelmann over 4 years ago

  • Status changed from Feedback to Closed

Simon has now reverted the patches. I will mark this patch now as closed - but if anyone has a good idea then please just pingme.

#10

Updated by Sven Eckelmann over 4 years ago

  • Target version set to 2016.5

Also available in: Atom PDF