You are not logged in.

#1 2020-09-18 08:16:19

lugge
Member
Registered: 2017-03-17
Posts: 33

Need kernel sources for building nvidia?

Hi there,

trying to run Arch on an older PC which has an Nvidia GTX460.
According wiki, I need nvidia 390xx driver for this GPU, which means I have to build and install https://aur.archlinux.org/packages/nvidia-390xx-dkms/ package.

Running makepkg -si gets me end up with a build error message:

==> 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).
(Stripping trailing CRs from patch; use --binary to disable.)
patching file kernel/common/inc/nv-linux.h
Hunk #1 succeeded at 535 (offset 4 lines).
(Stripping trailing CRs from patch; use --binary to disable.)
patching file kernel/common/inc/nv-mm.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file kernel/conftest.sh
Hunk #1 succeeded at 4072 (offset 5 lines).
(Stripping trailing CRs from patch; use --binary to disable.)
patching file kernel/nvidia/nvidia.Kbuild
==> Starting build()...
make[1]: *** /usr/src/linux: No such file or directory.  Stop.
make: *** [Makefile:81: modules] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

/usr/src/linux is empty, thus, build fails.
dkms and kernel-headers are installed.

However, my questions:
1) Which package do I need to get to have the proper sources in /usr/src/linux?
2) All dependencies of the AUR package are met, why am I missing build requirements?
3) To prevent these issues in the future, how can I check which packages have files in /usr/src/linux so I can get these information by myself in the future?

Regards,
lugge

Last edited by lugge (2020-09-18 08:17:39)

Offline

#2 2020-09-18 08:29:50

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: Need kernel sources for building nvidia?

Beyond your problem, this package seems to be a split package of nvidia-390xx. Are you sure -si is the makepkg switch you want to use here?

Offline

#3 2020-09-18 08:35:36

lugge
Member
Registered: 2017-03-17
Posts: 33

Re: Need kernel sources for building nvidia?

I'm not sure, but this is the switch I use most of the time.
Instead of asking these kind of questions, just tell me, is this switch wrong, and, if so, why and whats the correct one?

Offline

#4 2020-09-18 08:41:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,740

Re: Need kernel sources for building nvidia?

linux-headers should contain that (... and the PKGBUILD hardcodes that for at least the initial build https://aur.archlinux.org/cgit/aur.git/ … -390xx#n70 ), which you claim to have installed, so...

pacman -Qkk linux-headers

if you use a different kernel without having that installed at all that could explain this.

for the 3rd question in a general sense: https://wiki.archlinux.org/index.php/Pa … cific_file

Edit: To elaborate on what awebb aludes to here, the -i switch in particular would lead to both -dkms and non dkms to get installed while you only really want the former. it shouldn't have a relevant effect at the point of which the build is currently failing though

Last edited by V1del (2020-09-18 08:44:38)

Offline

#5 2020-09-18 11:27:04

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: Need kernel sources for building nvidia?

I've tried to build the package and it worked. The linux-headers package populates my /usr/src/linux. Maybe try building it in a clean chroot (see the wiki about that).

And yes, V1del is right, this is a split package. The -i flag installs the package after you've built it, but I'm not sure you'd want both packages at the same time. This isn't the source of your problem, obviously, just a general consideration.

Offline

Board footer

Powered by FluxBB