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

dkms make fails under sudo #436

Closed
ampledata opened this issue Aug 28, 2024 · 1 comment
Closed

dkms make fails under sudo #436

ampledata opened this issue Aug 28, 2024 · 1 comment
Labels

Comments

@ampledata
Copy link

When building a dkms module with sudo, I get the following error: sudo: argv[2] mismatch

I can reproduce this error with two different dkms modules.

I cannot reproduce this error if login directly as root.

I'm not 100% sure this is a dkms issue.

Steps to Reproduce

git clone https://github.com/fastoe/RTL8811CU.git
cd RTL8811CU
sudo make

N.B.:

  1. Alternative dkms module for testing: https://github.com/morrownr/8821cu-20210916
  2. sudo su followed by make can be substituted for sudo make

Expected Result

The RTL8811CU dkms module should build.

Actual Result

Some variation of:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.1.0-23-amd64/build M=/usr/src/RTL8811CU  modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-23-amd64'
sudo: argv[2] mismatch, expected "set -e;     trap 'rm -f /usr/src/RTL8811CU/8821cu.mod; trap - HUP; kill -s HUP $$' HUP;  trap 'rm -f /usr/src/RTL8811CU/8821cu.mod; trap - INT; kill -s INT $$' INT;  trap 'rm -f /usr/src/RTL8811CU/8821cu.mod; trap - QUIT; kill -s QUIT $$' QUIT;  trap 'rm -f /usr/src/RTL8811CU/8821cu.mod; trap - TERM; kill -s TERM $$' TERM;  trap 'rm -f /usr/src/RTL8811CU/8821cu.mod; trap - PIPE; kill -s PIPE $$' PIPE; printf '%s\n'   core/rtw_cmd.o core/rtw_security.o core/rtw_debug.o core/rtw_io.o core/rtw_ioctl_query.o core/rtw_ioctl_set.o core/rtw_ieee80211.o core/rtw_mlme.o core/rtw_mlme_ext.o core/rtw_mi.o core/rtw_wlan_util.o core/rtw_vht.o core/rtw_pwrctrl.o core/rtw_rf.o core/rtw_recv.o core/rtw_sta_mgt.o 

Debug

Linux aryaaio 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm
ii  linux-compiler-gcc-12-x86               6.1.99-1                       amd64        Compiler for Linux on x86 (meta-package)
ii  linux-headers-6.1.0-23-amd64            6.1.99-1                       amd64        Header files for Linux 6.1.0-23-amd64
ii  linux-headers-6.1.0-23-common           6.1.99-1                       all          Common header files for Linux 6.1.0-23
ii  linux-headers-amd64                     6.1.99-1                       amd64        Header files for Linux amd64 configuration (meta-package)
ii  linux-image-6.1.0-23-amd64              6.1.99-1                       amd64        Linux 6.1 for 64-bit PCs (signed)
ii  linux-image-amd64                       6.1.99-1                       amd64        Linux for 64-bit PCs (meta-package)
ii  linux-kbuild-6.1                        6.1.99-1                       amd64        Kbuild infrastructure for Linux 6.1
ii  linux-libc-dev:amd64                    6.1.99-1                       amd64        Linux support headers for userspace development
@ampledata ampledata changed the title dkms make files under sudo dkms make failes under sudo Aug 28, 2024
@ampledata ampledata changed the title dkms make failes under sudo dkms make fails under sudo Aug 28, 2024
@xuzhen
Copy link
Collaborator

xuzhen commented Sep 8, 2024

git clone https://github.com/fastoe/RTL8811CU.git
cd RTL8811CU
sudo make

Even though those modules support DKMS, you didn't use DKMS for compilation, which means this error isn't related to DKMS.

If you're curious about the reason behind this error, edit /etc/sudo.conf and enable debug logs.

@xuzhen xuzhen closed this as completed Sep 8, 2024
@xuzhen xuzhen added the invalid label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants