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

If build with no dkms, breaks build even after install dkms #58

Open
dtgriscom opened this issue Feb 29, 2020 · 5 comments
Open

If build with no dkms, breaks build even after install dkms #58

dtgriscom opened this issue Feb 29, 2020 · 5 comments

Comments

@dtgriscom
Copy link

I'm using Ubuntu 18.04.4. I cloned this repository, and tried

sudo make dkms

But, got an error:

make: dkms: Command not found
Makefile:91: recipe for target 'dkms' failed
make: *** [dkms] Error 127

I installed dkms, and then tried to make this again, but got a different error:

mkdir: cannot create directory ‘/usr/src/asus-wmi-sensors-b6c25d2’: File exists
Makefile:91: recipe for target 'dkms' failed
make: *** [dkms] Error 1

So, the first failed make had created the directory, but subsequent makes fail if the directory exists. I tried make clean, but it didn't remove the created directory. I finally hand-deleted the directory, and the sudo make dkms got a lot further (it ended up failing, but that'll be a different report).

Suggestions:

  • Have sudo make clean remove the source directory
  • Check for dkms (and other prerequisites?) before creating the source directory
@KeithMyers
Copy link

I've fallen into this Catch-22 myself a few times. Always had to remove the flubbed original try at the dkms install before being successful.

@TeamFahQ
Copy link

Try sudo make dkms -i

The -i flag will ignore the file exists error

@dtgriscom
Copy link
Author

Telling make to ignore all errors wouldn't feel safe to me as an end-user; it would be far better to have the Makefile itself be more robust.

Given that the directory name is built using git describe --long --always, there's virtually no chance that automatically deleting the directory would cause harm, right?

@TeamFahQ
Copy link

TeamFahQ commented Feb 29, 2020

I see your point. But it was just a suggestion.

So, the commands:

To make the module
sudo make dkms

To clean the build directory
sudo make clean

To uninstall the module
sudo make dkms_clean

@electrified
Copy link
Owner

I will add a check to the makefile to ensure DKMS is installed.

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

No branches or pull requests

4 participants