You are not logged in.

#1 2021-01-05 00:07:15

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Missing Kconfig when building nvidia-390xx-dkms

In the thread on the nvidia-390xx-dkms I asked about the Kconfig somehow missing when trying to build the module. [user]seth[/user] suggested to open a new thread for this and said I might be missing the linux-headers package.

The linux-headers package is installed, and I am using rua to update nvidia-390xx-dkms:

Here is what happens:

$ rua install nvidia-390xx-dkms
WARNING: your AUR repo is up-to-date.
If you continue, the build directory will be removed and the build will be re-run.
If you don't want that, consider resolving the situation manually,
for example:    rua builddir '~/.cache/rua/build/nvidia-390xx'


Reviewing "~/.config/rua/pkg/nvidia-390xx".
[S]=run shellcheck on PKGBUILD, [D]=(identical to upstream, empty diff), [T]=run shell to edit/inspect, [O]=ok, use package. o
==> Making package: nvidia-390xx 390.138-10 (Tue 05 Jan 2021 12:45:20 AM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading NVIDIA-Linux-x86_64-390.138-no-compat32.run...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 46.2M  100 46.2M    0     0   101M      0 --:--:-- --:--:-- --:--:--  100M
  -> Found kernel-4.16.patch
  -> Found kernel-5.8.patch
  -> Found kernel-5.9.patch
  -> Downloading kernel-5.10.patch...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5296    0  5296    0     0  19050      0 --:--:-- --:--:-- --:--:-- 19050
  -> Found uvm_common-415.18.c
==> Validating source files with b2sums...
    NVIDIA-Linux-x86_64-390.138-no-compat32.run ... Passed
    kernel-4.16.patch ... Passed
    kernel-5.8.patch ... Passed
    kernel-5.9.patch ... Passed
    kernel-5.10.patch ... Passed
    uvm_common-415.18.c ... Passed
==> Extracting sources...
==> Starting prepare()...
Creating directory NVIDIA-Linux-x86_64-390.138-no-compat32
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 390.138....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
patching file kernel/common/inc/nv-linux.h
patching file kernel/conftest.sh
Hunk #1 succeeded at 2045 (offset 139 lines).
patching file kernel/common/inc/nv-linux.h
Hunk #1 succeeded at 535 (offset 4 lines).
patching file kernel/common/inc/nv-mm.h
patching file kernel/conftest.sh
Hunk #1 succeeded at 4072 (offset 5 lines).
patching file kernel/nvidia/nvidia.Kbuild
patching file kernel/common/inc/nv-linux.h
patching file kernel/common/inc/nv-mm.h
patching file kernel/conftest.sh
patching file kernel/nvidia-drm/nvidia-drm-drv.c
patching file kernel/nvidia-drm/nvidia-drm-gem.h
patching file kernel/nvidia-drm/nvidia-drm-utils.c
patching file kernel/nvidia-uvm/uvm8_tools.c
patching file kernel/nvidia-uvm/uvm8_va_range.h
patching file kernel/nvidia/nv.c
patching file kernel/common/inc/nv-linux.h
patching file kernel/conftest.sh
Hunk #8 succeeded at 3940 (offset -43 lines).
patching file kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
==> Starting build()...
make[1]: Entering directory '/usr/lib/modules/5.10.4-arch2-1/build'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: *** [Makefile:718: include/config/auto.conf] Error 1
make[1]: Leaving directory '/usr/lib/modules/5.10.4-arch2-1/build'
make: *** [Makefile:81: modules] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
Build failed with exit code 4 in /home/gk772/.cache/rua/build/nvidia-390xx

The PKGBUILD runs

make SYSSRC=/usr/src/linux module

which comes up with the above complaint.
So I tried the suggested measure to fix the config in

/usr/lib/modules/5.10.4-arch2-1/build

(which contains a .config file):

# make oldconfig
lib/Kconfig.debug:2449: can't open file "Documentation/Kconfig"
make[1]: *** [scripts/kconfig/Makefile:71: oldconfig] Error 1
make: *** [Makefile:602: oldconfig] Error 2

Indeed, there is no Documentation subdirectory, though there is a Kconfig file in this directory itself. So, I am wondering, why I am missing the Documentation subdirectory and how best I could fix that problem.

Here is the info on the installed linux-headers package:

# pacman -Qi linux-headers
Name            : linux-headers
Version         : 5.10.4.arch2-1
Description     : Headers and scripts for building modules for the Linux kernel
Architecture    : x86_64
URL             : https://git.archlinux.org/linux.git/log/?h=v5.10.4-arch2
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : dkms
Conflicts With  : None
Replaces        : None
Installed Size  : 128.42 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 01 Jan 2021 06:29:53 AM CET
Install Date    : Tue 05 Jan 2021 12:42:58 AM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Thanks for any hints!

Offline

#2 2021-01-05 00:13:51

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,197

Re: Missing Kconfig when building nvidia-390xx-dkms

Both of the files mentioned are in the linux-headers package. Do you not have them?

Online

#3 2021-01-05 00:14:02

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

OK, I found it, the file is found in package linux-docs. Sorry for the noise.

Offline

#4 2021-01-05 00:16:39

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

Scimmia wrote:

Both of the files mentioned are in the linux-headers package. Do you not have them?

No, I needed /usr/lib/modules/5.10.4-arch2-1/build/Documentation/Kconfig, and I found it in linux-docs:

$ pacman -Fy /usr/lib/modules/5.10.4-arch2-1/build/Documentation/Kconfig

usr/lib/modules/5.10.4-arch2-1/build/Documentation/Kconfig is owned by core/linux-docs 5.10.4.arch2-1

Offline

#5 2021-01-05 00:18:24

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,197

Re: Missing Kconfig when building nvidia-390xx-dkms

No, you don't. You've gone off on a tangent. Look back at the original error.

Online

#6 2021-01-05 00:23:23

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

include/generated/autoconf.h is missing, include/config/auto.conf is there. After installing the docs, make prepare now fails with:

# make prepare
scripts/Makefile.build:44: arch/x86/entry/syscalls/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make: *** [arch/x86/Makefile:220: archheaders] Error 2

(while the original problem persists)

Thanks!

Offline

#7 2021-01-05 00:24:06

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,197

Re: Missing Kconfig when building nvidia-390xx-dkms

haraldkl wrote:

include/generated/autoconf.h is missing

And as I said, it's in the linux-headers package, so you have something wrong with your installation.

Online

#8 2021-01-05 00:29:05

loqs
Member
Registered: 2014-03-06
Posts: 12,556

Re: Missing Kconfig when building nvidia-390xx-dkms

What is the output of

pacman -Qikk linux-headers

Offline

#9 2021-01-05 00:30:36

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

# pacman -Qikk linux-headers
Name            : linux-headers
Version         : 5.10.4.arch2-1
Description     : Headers and scripts for building modules for the Linux kernel
Architecture    : x86_64
URL             : https://git.archlinux.org/linux.git/log/?h=v5.10.4-arch2
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : dkms
Conflicts With  : None
Replaces        : None
Installed Size  : 128.42 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 01 Jan 2021 06:29:53 AM CET
Install Date    : Tue 05 Jan 2021 12:42:58 AM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/generated/autoconf.h (No such file or directory)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/scripts/kconfig/.conf.cmd (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/scripts/kconfig/conf (Modification time mismatch)

Offline

#10 2021-01-05 00:35:09

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

Reinstallation gives me:

# pacman -S linux-headers
warning: linux-headers-5.10.4.arch2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-headers-5.10.4.arch2-1

Total Installed Size:  128.42 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                                          [########################################################################] 100%
(1/1) checking package integrity                                                                                        [########################################################################] 100%
(1/1) loading package files                                                                                             [########################################################################] 100%
(1/1) checking for file conflicts                                                                                       [########################################################################] 100%
(1/1) checking available disk space                                                                                     [########################################################################] 100%
warning: could not get file information for usr/lib/modules/5.10.4-arch2-1/build/include/generated/autoconf.h
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
==> Unable to remove module nvidia/310.40 for kernel 5.10.4-arch2-1: Not found in dkms status output.
:: Processing package changes...
(1/1) reinstalling linux-headers                                                                                        [########################################################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> dkms install --no-depmod -m nvidia -v 310.40 -k 5.10.4-arch2-1
Error! Bad return status for module build on kernel: 5.10.4-arch2-1 (x86_64)
Consult /var/lib/dkms/nvidia/310.40/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m nvidia -v 310.40 -k 5.10.4-arch2-1' returned 10
==> depmod 5.10.4-arch2-1


# pacman -Qikk linux-headers
Name            : linux-headers
Version         : 5.10.4.arch2-1
Description     : Headers and scripts for building modules for the Linux kernel
Architecture    : x86_64
URL             : https://git.archlinux.org/linux.git/log/?h=v5.10.4-arch2
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : dkms
Conflicts With  : None
Replaces        : None
Installed Size  : 128.42 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 01 Jan 2021 06:29:53 AM CET
Install Date    : Tue 05 Jan 2021 01:31:44 AM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/.config (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/.config (Size mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/auto.conf (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/auto.conf (Size mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/auto.conf.cmd (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/auto.conf.cmd (Size mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/cc/is/gcc.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/cc/version/text.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/gcc/plugins.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/gcc/version.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/gcc/plugin/structleak.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/config/gcc/plugin/structleak/byref/all.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/generated/autoconf.h (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/include/generated/autoconf.h (Size mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/scripts/kconfig/.conf.cmd (Modification time mismatch)
warning: linux-headers: /usr/lib/modules/5.10.4-arch2-1/build/scripts/kconfig/conf (Modification time mismatch)
linux-headers: 20870 total files, 12 altered files

Maybe it was an issue from the DKMS.

Offline

#11 2021-01-05 00:39:06

loqs
Member
Registered: 2014-03-06
Posts: 12,556

Re: Missing Kconfig when building nvidia-390xx-dkms

What was the contents of the mentioned log file /var/lib/dkms/nvidia/310.40/build/make.log
Edit:
Never mind cross post.

Last edited by loqs (2021-01-05 00:40:03)

Offline

#12 2021-01-05 00:39:20

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

OK, reinstalling the linux-headers resolved my problem. Thanks again!

Offline

#13 2021-01-05 00:40:52

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

$ cat /var/lib/dkms/nvidia/310.40/build/make.log
DKMS make.log for nvidia-310.40 for kernel 5.10.4-arch2-1 (x86_64)
Tue Jan  5 01:31:53 AM CET 2021
NVIDIA: calling KBUILD...
  make -f ./Makefile syncconfig
make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.build obj=scripts/kconfig syncconfig
  gcc   -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kconfig/lexer.lex.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/kconfig/symbol.o scripts/kconfig/util.o
scripts/kconfig/conf  --syncconfig Kconfig
make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all
make -f ./scripts/Makefile.build obj=scripts/basic
set -e; mkdir -p include/config/; trap "rm -f include/config/.kernel.release.tmp" EXIT; { echo "5.10.4-arch2$(sh ./scripts/setlocalversion .)"; } > include/config/.kernel.release.tmp; if [ ! -r include/config/kernel.release ] || ! cmp -s include/config/kernel.release include/config/.kernel.release.tmp; then : '  UPD     include/config/kernel.release'; mv -f include/config/.kernel.release.tmp include/config/kernel.release; fi
make -f ./scripts/Makefile.asm-generic obj=arch/x86/include/generated/uapi/asm \
generic=include/uapi/asm-generic
set -e; mkdir -p include/generated/uapi/linux/; trap "rm -f include/generated/uapi/linux/.version.h.tmp" EXIT; { 	echo \#define LINUX_VERSION_CODE 330244; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; } > include/generated/uapi/linux/.version.h.tmp; if [ ! -r include/generated/uapi/linux/version.h ] || ! cmp -s include/generated/uapi/linux/version.h include/generated/uapi/linux/.version.h.tmp; then : '  UPD     include/generated/uapi/linux/version.h'; mv -f include/generated/uapi/linux/.version.h.tmp include/generated/uapi/linux/version.h; fi
make -f ./scripts/Makefile.asm-generic obj=arch/x86/include/generated/asm \
generic=include/asm-generic
scripts/Makefile.build:44: arch/x86/entry/syscalls/Makefile: No such file or directory
make[3]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make[2]: *** [arch/x86/Makefile:220: archheaders] Error 2
make[2]: *** Waiting for unfinished jobs....
rm -f .tmp_quiet_recordmcount
rm -f include/linux/version.h
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [Makefile:243: module] Error 1
make: *** [makefile:59: module] Error 2

Offline

#14 2021-01-05 00:43:00

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: Missing Kconfig when building nvidia-390xx-dkms

That was after I installed the linux-docs package. Previously it complained about the missing Documentation/Kconfig.

Offline

Board footer

Powered by FluxBB