Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualBox dkms makefile fails compilation on aura, but not on pacman #584

Closed
Nicholas-Baron opened this issue Apr 16, 2020 · 15 comments · Fixed by #616
Closed

VirtualBox dkms makefile fails compilation on aura, but not on pacman #584

Nicholas-Baron opened this issue Apr 16, 2020 · 15 comments · Fixed by #616
Labels

Comments

@Nicholas-Baron
Copy link

When I install virtualbox and virtualbox-host-dkms (sudo aura -S ...), aura gives this error:

==> dkms install vboxhost/6.1.6_OSE -k 5.4.32-1-lts
Error! Bad return status for module build on kernel: 5.4.32-1-lts (x86_64)
Consult /var/lib/dkms/vboxhost/6.1.6_OSE/build/make.log for more information.

Error Log from the specified file:

DKMS make.log for vboxhost-6.1.4_OSE for kernel 5.4.32-1-lts (x86_64)
Tue Apr 14 17:24:54 PDT 2020
make: Entering directory '/usr/lib/modules/5.4.32-1-lts/build'
make: uname: No such file or directory
make: gcc: No such file or directory
make: make: No such file or directory
make: *** [Makefile:1691: /var/lib/dkms/vboxhost/6.1.4_OSE/build] Error 127
make: Leaving directory '/usr/lib/modules/5.4.32-1-lts/build'

The most insteresting part of this issue is that pacman (sudo pacman -S ...) is fine and compiles the modules.

@fosskers
Copy link
Owner

fosskers commented Apr 16, 2020

I've actually had these exact problems recently when installing vmware-workstation. And it seemed not to have anything to do with Aura, since it would happen when I built it myself with makepkg!

For reference, check out the flood of complaints here: https://aur.archlinux.org/packages/vmware-workstation/

If there is something that Aura can do to address this (there seem to be an environment/PATH problem?) then I'm more than happy to help fix it.

@fosskers
Copy link
Owner

Hi there, were you able to figure anything out?

@fosskers fosskers added the bug? label May 14, 2020
@fosskers
Copy link
Owner

fosskers commented Jun 2, 2020

Any luck?

@JackCuthbert
Copy link

JackCuthbert commented Jun 8, 2020

I'm also getting this with any -dkms package via aura. Using PKGBUILD files directly with makepkg --install or pacman alone both work without issue. (Kernel 5.6.15-arch1-1)

@fosskers
Copy link
Owner

Can you try again with the version of Aura that I just released (3.1.2)? It fixed a big regression that may-or-may-not be related to this.

@JackCuthbert
Copy link

JackCuthbert commented Jun 11, 2020

This appears to fix #613 for me, but dkms packages from AUR (I haven't tried official, I already had Vbox installed) seem to fail still.

Here's what happened when I attempted to install xpadneo.

$ aura --version
 __ _ _  _ _ _ __ _    Pacman v5.2.1 - libalpm v12.0.1
/ _` | || | '_/ _` |   Copyright (C) 2006-2019 Pacman Development Team
\__,_|\_,_|_| \__,_|   Copyright (C) 2002-2006 Judd Vinet
AURA Version 3.1.2
$ sudo aura -Aa xpadneo-dkms-git
# .... snip some logging ...
==> dkms install hid-xpadneo/0.7 -k 5.6.15-arch1-1
Error! Bad return status for module build on kernel: 5.6.15-arch1-1 (x86_64)
Consult /var/lib/dkms/hid-xpadneo/0.7/build/make.log for more information.
==> Warning, `dkms install hid-xpadneo/0.7 -k 5.6.15-arch1-1' returned 10

and the make.log

$ cat /var/lib/dkms/hid-xpadneo/0.7/build/make.log
DKMS make.log for hid-xpadneo-0.7 for kernel 5.6.15-arch1-1 (x86_64)
Thu Jun 11 20:59:32 AEST 2020
make: Entering directory '/usr/lib/modules/5.6.15-arch1-1/build'
make: uname: No such file or directory
make: gcc: No such file or directory
make: make: No such file or directory
make: *** [Makefile:1695: /var/lib/dkms/hid-xpadneo/0.7/build/src] Error 127
make: Leaving directory '/usr/lib/modules/5.6.15-arch1-1/build'

@fosskers
Copy link
Owner

You know what... I bet when Aura does sudo -u <you> makepkg to build the package, your PATH variable isn't brought through. So make here can't see any of those usual tools.

@fosskers
Copy link
Owner

False alarm - the PATH is indeed there.

@fosskers
Copy link
Owner

fosskers commented Jun 11, 2020

Whoa. Building xpadneo-dkms-git myself with makepkg, then installing with pacman -U, works.
However, trying aura -U fails! This is very mysterious to me, given that -U is handed right down to pacman when invoked from Aura.

@fosskers
Copy link
Owner

fosskers commented Jun 11, 2020

htop output when using aura -U.

2020-06-11-093341_958x538_scrot

I'm starting to get paranoid about environment variables.

@fosskers
Copy link
Owner

From the comments on the vmware-workstation AUR package:

For people with the DKMS problem: I don't have any idea what can explain this problem. It seems that your PATH is removed somewhere during the installation. Can you try to install another package using DKMS (for example virtualbox-host-dkms) to see if the problem still exists? If yes you should ask some help on Arch forum, else tell me and I will try to investigate why this problem appears only on my package.

@fosskers
Copy link
Owner

fosskers commented Jun 11, 2020

Oh... the smoking gun!

pacmanProc :: [String] -> ProcessConfig () () ()
pacmanProc args = setEnv [("LC_ALL", "C")] $ proc "pacman" args

Set the environment variables of the child process.

... so I'm nuking most of the environment that gets passed to pacman here, including the PATH. Should be an easy enough fix, one moment.

@fosskers fosskers linked a pull request Jun 11, 2020 that will close this issue
@fosskers
Copy link
Owner

Yup, that fixes it.

@fosskers
Copy link
Owner

I just released Aura 3.1.3 that includes the fix.

@JackCuthbert
Copy link

Legend! Works for me 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants