[sheepdog-users] sbd compilation error: error: unknown field ‘bus_attrs’ specified in initializer, .bus_attrs = sbd_bus_attrs
Liu Yuan
namei.unix at gmail.com
Fri May 30 11:27:03 CEST 2014
On Fri, May 30, 2014 at 05:25:56PM +0800, Liu Yuan wrote:
> On Fri, May 30, 2014 at 10:53:39AM +0200, Marcin Mirosław wrote:
> > Hi!
> > I've got compilation error:
> >
> > # make V=1
> > make -C /lib/modules/`uname -r`/build M=$PWD modules
> > make[1]: Entering directory `/usr/src/linux-3.14.2-hardened-r1'
> > test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
> > \
> > echo >&2; \
> > echo >&2 " ERROR: Kernel configuration is invalid."; \
> > echo >&2 " include/generated/autoconf.h or
> > include/config/auto.conf are missing.";\
> > echo >&2 " Run 'make oldconfig && make prepare' on kernel src to
> > fix it."; \
> > echo >&2 ; \
> > /bin/false)
> > mkdir -p
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/.tmp_versions
> > ; rm -f
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/.tmp_versions/*
> > make -f scripts/Makefile.build
> > obj=/var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd
> > gcc
> > -Wp,-MD,/var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/.sheep_block_device.o.d
> > -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include
> > -I/usr/src/linux-3.14.2-hardened-r1/arch/x86/include
> > -Iarch/x86/include/generated -Iinclude
> > -I/usr/src/linux-3.14.2-hardened-r1/arch/x86/include/uapi
> > -Iarch/x86/include/generated/uapi
> > -I/usr/src/linux-3.14.2-hardened-r1/include/uapi
> > -Iinclude/generated/uapi -include
> > /usr/src/linux-3.14.2-hardened-r1/include/linux/kconfig.h -D__KERNEL__
> > -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
> > -fno-common -Werror-implicit-function-declaration -Wno-format-security
> > -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse
> > -mpreferred-stack-boundary=3 -march=core2 -mno-red-zone -mcmodel=kernel
> > -funit-at-a-time -maccumulate-outgoing-args -ffreestanding
> > -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
> > -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1
> > -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare
> > -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
> > -mno-avx -Wframe-larger-than=2048 -fstack-protector
> > -Wno-unused-but-set-variable -fno-omit-frame-pointer
> > -fno-optimize-sibling-calls -g -femit-struct-debug-baseonly
> > -fno-var-tracking -Wdeclaration-after-statement -Wno-pointer-sign
> > -fno-strict-overflow -fconserve-stack -Werror=implicit-int
> > -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO
> > -fplugin=/usr/src/linux-3.14.2-hardened-r1/tools/gcc/constify_plugin.so
> > -DCONSTIFY_PLUGIN
> > -fplugin=/usr/src/linux-3.14.2-hardened-r1/tools/gcc/kernexec_plugin.so
> > -fplugin-arg-kernexec_plugin-method="bts" -DKERNEXEC_PLUGIN
> > -fplugin=/usr/src/linux-3.14.2-hardened-r1/tools/gcc/colorize_plugin.so
> > -fplugin=/usr/src/linux-3.14.2-hardened-r1/tools/gcc/size_overflow_plugin.so
> > -DSIZE_OVERFLOW_PLUGIN
> > -fplugin=/usr/src/linux-3.14.2-hardened-r1/tools/gcc/latent_entropy_plugin.so
> > -DLATENT_ENTROPY_PLUGIN
> > -I/var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/../include
> > -DMODULE -D"KBUILD_STR(s)=#s"
> > -D"KBUILD_BASENAME=KBUILD_STR(sheep_block_device)"
> > -D"KBUILD_MODNAME=KBUILD_STR(sbd)" -c -o
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/sheep_block_device.o
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/sheep_block_device.c
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/sheep_block_device.c:350:2:
> > error: unknown field ‘bus_attrs’ specified in initializer
> > .bus_attrs = sbd_bus_attrs,
> > ^
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/sheep_block_device.c:350:2:
> > warning: initialization from incompatible pointer type [enabled by default]
> > /var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/sheep_block_device.c:350:2:
> > warning: (near initialization for ‘sbd_bus_type.dev_name’) [enabled by
> > default]
> > make[2]: ***
> > [/var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd/sheep_block_device.o]
> > Error 1
> > make[1]: ***
> > [_module_/var/tmp/portage/net-fs/sheepdog-9999/work/sheepdog-9999/sbd]
> > Error 2
> > make[1]: Leaving directory `/usr/src/linux-3.14.2-hardened-r1'
> > make: *** [default] Error 2
> >
> >
> > # gcc -v
> > Using built-in specs.
> > COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc
> > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper
> > Target: x86_64-pc-linux-gnu
> > Configured with:
> > /var/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/configure
> > --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
> > --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2
> > --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include
> > --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2
> > --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man
> > --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info
> > --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4
> > --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python
> > --enable-languages=c,c++ --enable-obsolete --enable-secureplt
> > --disable-werror --with-system-zlib --enable-nls
> > --without-included-gettext --enable-checking=release
> > --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
> > Hardened 4.8.2 p1.3r1, pie-0.5.8r1' --enable-esp --enable-libstdcxx-time
> > --enable-shared --enable-threads=posix --enable-__cxa_atexit
> > --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
> > --disable-altivec --disable-fixed-point --enable-targets=all
> > --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp
> > --disable-libquadmath --enable-lto --with-cloog --disable-isl-version-check
> > Thread model: posix
> > gcc version 4.8.2 (Gentoo Hardened 4.8.2 p1.3r1, pie-0.5.8r1)
> >
>
> It's because kernel with version 3.12+ don't support old bus registration.
>
> I've pushed the fix to origin/sbd. Could you please try it? If is okay, I'll
> post the patch to the list.
>
Try following command to switch to new code
$ git pull
$ git checkout -b sbd origin/sbd
Thanks
Yuan
More information about the sheepdog-users
mailing list