Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678118 - sys-fs/zfs-kmod-0.7.9 - .../work/zfs-0.7.9/module/zfs/metaslab.c:1052:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
Summary: sys-fs/zfs-kmod-0.7.9 - .../work/zfs-0.7.9/module/zfs/metaslab.c:1052:2: erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-16 08:01 UTC by ykla
Modified: 2019-02-20 20:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,51.77 KB, text/plain)
2019-02-16 08:01 UTC, ykla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ykla 2019-02-16 08:01:54 UTC
Created attachment 565510 [details]
build.log

ERROR: sys-fs/zfs-kmod-0.7.9::gentoo failed (compile phase):
 *   emake failed

with sys-kernel/gentoo-sources-4.14.83
Comment 1 ykla 2019-02-16 08:02:53 UTC
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1052:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  metaslab_rt_create,
  ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1052:2: note: (near initialization for 'metaslab_rt_ops')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1052:2: error: invalid initializer
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1052:2: note: (near initialization for 'metaslab_rt_ops.<anonymous>')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1053:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  metaslab_rt_destroy,
  ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1053:2: note: (near initialization for 'metaslab_rt_ops')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1054:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  metaslab_rt_add,
  ^~~~~~~~~~~~~~~
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1054:2: note: (near initialization for 'metaslab_rt_ops')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1054:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1054:2: note: (near initialization for 'metaslab_rt_ops.rtop_vacate')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1055:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  metaslab_rt_remove,
  ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1055:2: note: (near initialization for 'metaslab_rt_ops')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1056:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  metaslab_rt_vacate
  ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1056:2: note: (near initialization for 'metaslab_rt_ops')
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1056:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.c:1056:2: note: (near initialization for 'metaslab_rt_ops.rtop_add')
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:328: /var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs/metaslab.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:587: /var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module/zfs] Error 2
make[3]: *** [Makefile:1527: _module_/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module] Error 2
make[3]: Leaving directory '/usr/src/linux-4.14.83-gentoo'
make[2]: *** [Makefile:27: modules] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9/module'
make[1]: *** [Makefile:630: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9'
make: *** [Makefile:499: all] Error 2
 * ERROR: sys-fs/zfs-kmod-0.7.9::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-fs/zfs-kmod-0.7.9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-fs/zfs-kmod-0.7.9::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9'
 * S: '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9'

>>> Failed to emerge sys-fs/zfs-kmod-0.7.9, Log file:

>>>  '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/temp/build.log'

 * Messages for package sys-fs/zfs-kmod-0.7.9:

 * ERROR: sys-fs/zfs-kmod-0.7.9::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-fs/zfs-kmod-0.7.9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-fs/zfs-kmod-0.7.9::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9'
 * S: '/var/tmp/portage/sys-fs/zfs-kmod-0.7.9/work/zfs-0.7.9'

 * GNU info directory index is up-to-date.

 * IMPORTANT: 14 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2019-02-16 21:21:19 UTC
this was fixed by me in 
https://github.com/zfsonlinux/zfs/commit/30d8b8570243fe5b944f26a964cf5204cb1e71e0

you can use that patch for 0.7.9 or simply install  0.7.10 or later.

alternatively you can disable CONFIG_GCC_PLUGIN_RANDSTRUCT in your kernel.


since 4.19 kernel is being stabilized soon we'll stabilize new compatible version of zfs as well and it'll include the fix.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2019-02-20 20:33:28 UTC
I've stabilized  0.7.12, it should build with CONFIG_GCC_PLUGIN_RANDSTRUCT