Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626678 - >=x11-drivers/nvidia-drivers-381.22-r1 fails to compile with KERNELRELEASE envvar
Summary: >=x11-drivers/nvidia-drivers-381.22-r1 fails to compile with KERNELRELEASE en...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 02:49 UTC by Corin Lawson
Modified: 2019-01-16 10:48 UTC (History)
1 user (show)

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


Attachments
emerge --info x11-drivers/nvidia-drivers (file_626678.txt,7.36 KB, text/plain)
2017-07-31 02:49 UTC, Corin Lawson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Corin Lawson 2017-07-31 02:49:42 UTC
Created attachment 487424 [details]
emerge --info x11-drivers/nvidia-drivers

My typical kernel upgrade flow involves exporting a value for KERNELRELEASE into my environment e.g. `export KERNELRELEASE=$(make kernelrelease)`

However when it comes time to `emerge @module-rebuild`, nvidia-drivers fails with the following message:

     * abi_x86_32.x86: running multilib-minimal_abi_src_configure
     * abi_x86_64.amd64: running multilib-minimal_abi_src_configure
     * Preparing nvidia module
    Makefile:19: /Kbuild: No such file or directory
    make: *** No rule to make target '/Kbuild'.  Stop.
     * ERROR: x11-drivers/nvidia-drivers-378.13-r1::gentoo failed (compile phase):
     *   emake failed

Digging into /var/tmp/portage/x11-drivers/nvidia-drivers-381.22/work/kernel/Makefile, I discovered that I am following this code path:

    18  ifneq ($(KERNELRELEASE),)
    19    include $(src)/Kbuild

And it appears that $(src) is not defined anyplace.

My workaround is to simply unset KERNELRELEASE:

    env KERNELRELEASE= emerge @module-rebuild

But I'm not sure if there's a better fix(?)
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-01-16 10:48:27 UTC
Looks like this was accidentally fixed when the build system was adapted for parallel make.