Build Failure -- batman-adv with debug enabled

This one caught me off guard, as it seemed to be working a week or so ago, and I didn't immediately see any changes in the code.

Has anyone else seen this?

Edit: Workaround of setting CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y or ""enable debugfs support" in make menuconfig.

To replicate:

Debian 9.5 (stretch) build host, which successfully builds ath79 and ar71xx for Archer C7 v2 with a wide range of packages.

master branch, configure ath79, Archer C7 v2, add batman-adv, enable its debug log

make V=s clean download world
/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/log.c:220:17: error: 'struct batadv_priv' has no member named 'debug_dir'; did you mean 'debug_log'?
  if (!bat_priv->debug_dir)
                 ^~~~~~~~~
                 debug_log
/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/log.c:230:49: error: 'struct batadv_priv' has no member named 'debug_dir'; did you mean 'debug_log'?
  d = debugfs_create_file("log", 0400, bat_priv->debug_dir, bat_priv,
                                                 ^~~~~~~~~
                                                 debug_log

Edit: Looks like it may be related to CONFIG_BATMAN_ADV_DEBUGFS from examination of openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/types.h#218 et seq


~/devel/openwrt$ ./scripts/diffconfig.sh | fgrep -v ar71xx
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_TARGET_ath79_generic_DEVICE_tplink_archer-c7-v2=y
CONFIG_KMOD_BATMAN_ADV_BATMAN_V=y
CONFIG_KMOD_BATMAN_ADV_BLA=y
CONFIG_KMOD_BATMAN_ADV_DAT=y
CONFIG_KMOD_BATMAN_ADV_DEBUG_LOG=y
CONFIG_KMOD_BATMAN_ADV_MCAST=y
CONFIG_PACKAGE_kmod-batman-adv=y
CONFIG_PACKAGE_kmod-crypto-crc32c=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-lib-crc32c=y

Fuller error messages:

make[3]: Entering directory '/home/jeff/devel/openwrt/feeds/routing/batman-adv'
rm -f /home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/.built
touch /home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/.built_check
cat /dev/null > /home/jeff/devel/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/batman-adv.symvers; for subdir in .; do cat /home/jeff/devel/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/*.symvers 2>/dev/null > /home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/$subdir/Module.symvers; done
env "batman-adv-y=../../compat-sources/net/core/skbuff.o ../../compat-sources/net/ipv4/igmp.o ../../compat-sources/net/ipv6/mcast_snoop.o " make -j1 -C "/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.14.67" ARCH="mips" CROSS_COMPILE="mips-openwrt-linux-musl-" SUBDIRS="/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv" CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_BATMAN_V=y  EXTRA_CFLAGS=" -DCONFIG_BATMAN_ADV=1  -DCONFIG_BATMAN_ADV_DEBUG=1  -DCONFIG_BATMAN_ADV_BLA=1  -DCONFIG_BATMAN_ADV_DAT=1  -DCONFIG_BATMAN_ADV_MCAST=1  -DCONFIG_BATMAN_ADV_BATMAN_V=1 " NOSTDINC_FLAGS="-I/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv -I/home/jeff/devel/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211-backport -I/home/jeff/devel/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211-backport/uapi -I/home/jeff/devel/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211 -I/home/jeff/devel/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211/uapi -I/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/include/ -include backport/backport.h -include /home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/compat-hacks.h" modules
make[4]: Entering directory '/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.14.67'
  CC [M]  /home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/log.o
/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/log.c: In function 'batadv_debug_log_setup':
/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/log.c:220:17: error: 'struct batadv_priv' has no member named 'debug_dir'; did you mean 'debug_log'?
  if (!bat_priv->debug_dir)
                 ^~~~~~~~~
                 debug_log
/home/jeff/devel/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/batman-adv-2018.2/net/batman-adv/log.c:230:49: error: 'struct batadv_priv' has no member named 'debug_dir'; did you mean 'debug_log'?
  d = debugfs_create_file("log", 0400, bat_priv->debug_dir, bat_priv,
                                                 ^~~~~~~~~
                                                 debug_log

Bumped into those as well building ath79 from master. First time in a awhile I actually built it though, so cannot comment on any regressions.

Might be a Makefile-dependency problem, as

-# CONFIG_KMOD_BATMAN_ADV_DEBUGFS is not set
+CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y

allows the compilation to complete. I'm not sure that's the "right" answer without looking into the code more deeply.