Re: VirtualBox module build breakage since commit 39808e451fdf

From: Larry Finger
Date: Tue Dec 17 2019 - 10:19:56 EST


On 12/15/19 11:11 PM, Masahiro Yamada wrote:
Hi.

On Mon, Dec 16, 2019 at 11:48 AM Larry Finger <Larry.Finger@xxxxxxxxxxxx> wrote:

Hi,

Since commit 39808e451fdf ("kbuild: do not read
$(KBUILD_EXTMOD)/Module.symvers"), some of the modules for VirtualBox have
failed to build. There are at least 3 such modules, namely vboxdrv, vboxnetflt,
and vboxnetadp.

As the section 6.3 of Documentation/kbuild/modules.rst says,
the best practice is to put the related modules into the same source
tree, and then do like this:

obj-m := vboxdrv/ vboxnetfit/ vboxnetadp/



If you want to maintain the three separately,
as 39808e451fdf mentions, you can useKBUILD_EXTRA_SYMBOLS.
KBUILD_EXTRA_SYMBOLS was added more than a decade.
So, you should be able to use it for your modules.

I think it is a cleaner solution than
copying around Module.symvers in your build tree.

Masahiro,

Thank you for your prompt reply. Once I got it right, the KBUILD_EXTRA_SYMBOLS method works. The debugging was slow due to the problem area happening near the end of a 45-minute build, but I now have a solution that works for all kernels.

Thanks again,

Larry