Created attachment 864662 [details] emerge --info Hi, I'm investigating my script for automatically updating kernel with ZFS build into source tree, that broke some time ago. Part of my building process is: >make oldconfig >make modules_prepare >env EXTRA_ECONF='--enable-linux-builtin' ebuild … >make all install modules_install Right now this isn't working any more (testing with zfs-kmod-9999), during pkg_setup I get: > *'/usr/src/linux/Module.symvers' was not found implying that the > * linux-6.4.0-gentoo tree at that location has not been built. > * > * Please verify that this is the intended kernel version, then perform > * a full build[1] (i.e. make && make modules_install && make install). Which implying that I need to build and install kernel, then build ZFS into it, and then again build and install it. Which doesn't make sense and also building kernel for the second time doesn't do anything: >lapek ~ # make all -j6 -C /usr/src/linux > DESCEND objtool > CALL scripts/checksyscalls.sh >make[3]: 'install_headers' is up to date. >Kernel: arch/x86/boot/bzImage is ready (#1)
You can set EXTRA_ECONF via /etc/portage/env, fwiw.
For some backstory on the check... Without Module.symvers, it cannot verify if symbols used by the modules are available in the kernel and then it could fail at runtime (which I feel is especially unsafe with zfs). Furthermore, without that file the kernel will typically also abort the build unless the user sets KBUILD_MODPOST_WARN=1 to change errors into warnings making this a predictable failure that the eclass is trying to explain. Some packages also probe that file for their configuration and could be misconfigured without it (nvidia for one). zfs-kmod would *also* normally fail given it looks for Module.symvers *unless* --enable-linux-builtin In other words I see this as an unsupported configuration using EXTRA_ECONF, but that aside there's two possible solutions I see to this without removing the IMO justified check: 1. touch Module.symvers at the top of the linux tree (hack) 2. Unsure how many people need this, but I could consider adding a variable to cleanly bypass the check in the eclass and inform about it in the error message.
(In reply to Ionen Wolkens from comment #2) > 1. touch Module.symvers at the top of the linux tree (hack) > > 2. Unsure how many people need this, but I could consider adding a variable > to cleanly bypass the check in the eclass and inform about it in the error > message. Guess you could also consider: 3. don't use the ebuild I'm not sure if using the ebuild to add builtin modules to the kernel make much sense.
>Without Module.symvers, it cannot verify if symbols used by the modules are available in the kernel and then it could fail at runtime Wouldn't it fail at build time? >2. Unsure how many people need this, but I could consider adding a variable to cleanly bypass the check in the eclass and inform about it in the error message. Sounds okay, but would be possible to bypass check if sys-fs/zfs has kernel-builtin flag set?