Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 824086 - sys-fs/zfs-kmod-2.0.6 fails at configure "error: 'iov' may be used uninitialized"
Summary: sys-fs/zfs-kmod-2.0.6 fails at configure "error: 'iov' may be used uninitiali...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-17 03:08 UTC by Anthony Lieuallen
Modified: 2022-04-27 03:40 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge-info.txt,5.46 KB, text/plain)
2021-11-17 03:08 UTC, Anthony Lieuallen
Details
build log (sys-fs:zfs-kmod-2.0.6:20211117-030549.log,22.75 KB, text/plain)
2021-11-17 14:27 UTC, Anthony Lieuallen
Details
config log (config.log,78.38 KB, text/x-log)
2021-11-17 15:29 UTC, Anthony Lieuallen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Lieuallen 2021-11-17 03:08:31 UTC
Created attachment 751738 [details]
emerge --info

Emerge of sys-fs/zfs-kmod-2.0.6 fails at the configure step, saying:

checking whether iov_iter_init() is available... configure: error: 
        *** None of the expected "iov_iter_init()" interfaces were detected.
        *** This may be because your kernel version is newer than what is
        *** supported, or you are using a patched custom kernel with
        *** incompatible modifications.
        ***
        *** ZFS Version: zfs-2.0.6-r0-gentoo
        *** Compatible Kernels: 3.10 - 5.14

The work directory remains so I can reproduce as:

# make modules -C /usr/src/linux-5.4.28-gentoo  M=/var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init
make: Entering directory '/usr/src/linux-5.4.28-gentoo'
  CC [M]  /var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init/iov_iter_init.o
/var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init/iov_iter_init.c: In function 'main':
/var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init/iov_iter_init.c:89:17: error: 'iov' may be used uninitialized [-Werror=maybe-uninitialized]
   89 |                 iov_iter_init(&iter, WRITE, &iov, nr_segs, count);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init/iov_iter_init.c:77:
./include/linux/uio.h:216:6: note: by argument 3 of type 'const struct iovec *' to 'iov_iter_init' declared here
  216 | void iov_iter_init(struct iov_iter *i, unsigned int direction, const struct iovec *iov,
      |      ^~~~~~~~~~~~~
/var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init/iov_iter_init.c:85:30: note: 'iov' declared here
   85 |                 struct iovec iov;
      |                              ^~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:266: /var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init/iov_iter_init.o] Error 1
make: *** [Makefile:1691: /var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/build/iov_iter_init] Error 2
make: Leaving directory '/usr/src/linux-5.4.28-gentoo'

This seems to be fully inside the zfs-kmod package, which generates this file via the configure script.  If I edit it (the failing line to be `struct iovec iov = {};`) it works fine.

I think this is upstream but that seems surprising.  Do I have some (non-default?) compiler mode (just upgraded to GCC 11) enabled that turns this warning into a fatal error?
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-17 03:09:48 UTC
Can you please attach the full build.log too please? Thanks.

(That said, I'd really upgrade to a newer 5.4.x kernel -- 5.4.28 is rather old at this point. It's still LTS but you need a newer patch version.)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-17 03:10:13 UTC
Oh, and you may want to select a newer Binutils (and depclean).
Comment 3 Anthony Lieuallen 2021-11-17 14:27:57 UTC
Created attachment 751898 [details]
build log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-17 14:40:32 UTC
(In reply to Anthony Lieuallen from comment #3)
> Created attachment 751898 [details]
> build log

hm, /var/tmp/portage/sys-fs/zfs-kmod-2.0.6/work/zfs-2.0.6/config.log too?
Comment 5 Anthony Lieuallen 2021-11-17 15:29:19 UTC
Created attachment 751902 [details]
config log
Comment 6 Anthony Lieuallen 2021-12-11 22:57:18 UTC
I've finally found time to upgrade my kernel.  To my great surprise, zfs-kmod-2.0.6 compiles now.  (The error message claims kernels back to 3.10 are supported!  That's clearly not /quite/ right.)