Drumfix / motu-avb-usb

Linux USB driver for the MOTU AVB series interfaces
GNU General Public License v2.0
66 stars 9 forks source link

Make error #7

Open MartyME91 opened 2 years ago

MartyME91 commented 2 years ago

Hi Drumfix,

Thanks for providing this code! I have a MOTU 24Ao in the lab and am trying to control it from a PC running Ubuntu 20.04. I am also experiencing some issues with it suddenly stopping in the middle of playback and channels switching (especially when using an USB extension cable between sound card and PC) and I was hoping this driver would fix that. However, I have some problems compiling and installing the driver and was hoping you could help. I have only a little programming experience, so sorry if this is a trivial question.

So, I installed the kernel source code by downloading it from https://github.com/zen-kernel/zen-kernel/tags and extracting them into/lib/modules/uname -r/source as @ozel suggested. But when I try to run make I get the following: Copying required header files from kernel sources... '/lib/modules/5.11.0-41-generic/source/sound/usb/usbaudio.h' -> '/home/audiologie/Documents/motu-avb-usb-main/usbaudio.h' '/lib/modules/5.11.0-41-generic/source/sound/usb/midi.h' -> '/home/audiologie/Documents/motu-avb-usb-main/midi.h' make -C ""/lib/modules/5.11.0-41-generic/build"" M="/home/audiologie/Documents/motu-avb-usb-main" modules make[1]: Entering directory '/usr/src/linux-headers-5.11.0-41-generic' CC [M] /home/audiologie/Documents/motu-avb-usb-main/motu.o MODPOST /home/audiologie/Documents/motu-avb-usb-main/Module.symvers LD [M] /home/audiologie/Documents/motu-avb-usb-main/motu.ko BTF [M] /home/audiologie/Documents/motu-avb-usb-main/motu.ko Skipping BTF generation for /home/audiologie/Documents/motu-avb-usb-main/motu.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-41-generic'

I don't know if this is an error or just a warning that can be ignored, but if I then try to do sudo make install I get the following errors: _make -C ""/lib/modules/5.11.0-41-generic/build"" M="/home/audiologie/Documents/motu-avb-usb-main" modules_install make[1]: Entering directory '/usr/src/linux-headers-5.11.0-41-generic' INSTALL /home/audiologie/Documents/motu-avb-usb-main/motu.ko At main.c:160:

I really have no clue how to fix this, could you please help?

Best, Maartje

Drumfix commented 2 years ago

Apparently your system allows only signed modules to be added.

 

Can you load it by:

 

sudo modprobe snd-usbmidi-lib

sudo insmod ./motu.ko

 

from the directory the motu.ko was built?

 

Guess i have to make a dkms module.

 

Gesendet: Dienstag, 30. November 2021 um 12:40 Uhr Von: "MartyME91" @.> An: "Drumfix/motu-avb-usb" @.> Cc: "Subscribed" @.***> Betreff: [Drumfix/motu-avb-usb] Make error (Issue #7)

 

Hi Drumfix,

Thanks for providing this code! I have a MOTU 24Ao in the lab and am trying to control it from a PC running Ubuntu 20.04. I am also experiencing some issues with it suddenly stopping in the middle of playback and channels switching (especially when using an USB extension cable between sound card and PC) and I was hoping this driver would fix that. However, I have some problems compiling and installing the driver and was hoping you could help. I have only a little programming experience, so sorry if this is a trivial question.

So, I installed the kernel source code by downloading it from https://github.com/zen-kernel/zen-kernel/tags and extracting them into/lib/modules/uname -r/source as @ozel suggested. But when I try to run make I get the following: Copying required header files from kernel sources... '/lib/modules/5.11.0-41-generic/source/sound/usb/usbaudio.h' -> '/home/audiologie/Documents/motu-avb-usb-main/usbaudio.h' '/lib/modules/5.11.0-41-generic/source/sound/usb/midi.h' -> '/home/audiologie/Documents/motu-avb-usb-main/midi.h' make -C ""/lib/modules/5.11.0-41-generic/build"" M="/home/audiologie/Documents/motu-avb-usb-main" modules make[1]: Entering directory '/usr/src/linux-headers-5.11.0-41-generic' CC [M] /home/audiologie/Documents/motu-avb-usb-main/motu.o MODPOST /home/audiologie/Documents/motu-avb-usb-main/Module.symvers LD [M] /home/audiologie/Documents/motu-avb-usb-main/motu.ko BTF [M] /home/audiologie/Documents/motu-avb-usb-main/motu.ko Skipping BTF generation for /home/audiologie/Documents/motu-avb-usb-main/motu.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-41-generic'

I don't know if this is an error or just a warning that can be ignored, but if I then try to do sudo make install I get the following errors: _make -C ""/lib/modules/5.11.0-41-generic/build"" M="/home/audiologie/Documents/motu-avb-usb-main" modules_install make[1]: Entering directory '/usr/src/linux-headers-5.11.0-41-generic' INSTALL /home/audiologie/Documents/motu-avb-usb-main/motu.ko At main.c:160:

SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
sign-file: certs/signing_key.pem: No such file or directory
DEPMOD 5.11.0-41-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-41-generic'
depmod -A
_

I really have no clue how to fix this, could you please help?

Best, Maartje

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

MartyME91 commented 2 years ago

Can you load it by: sudo modprobe snd-usbmidi-lib sudo insmod ./motu.ko

No, unfortunately the second command gives the error "ERROR: could not insert module ./motu.ko: Operation not permitted". It would be great if you could make a dkms module! Is that a lot of work?

Drumfix commented 2 years ago

Are you using a dual boot with windows ? In that case make sure to temporarily disable secure boot in the BIOS for the installation to succeed.

MartyME91 commented 2 years ago

Thank you for your advice. I disabled the secure boot and still can't do the normal sudo make install, but doing sudo modprobe snd-usbmidi-lib and sudo insmod ./motu.ko do not result in errors now. When I do lsusb -t it says "Driver=snd-motu-avb", so it seems to work! Unfortunately the issues with playback stopping and wrong channel order are still present though :-( so maybe the problem was the usb extension cable after all.

MartyME91 commented 2 years ago

Issues also occur without the usb extension cable, only less often. So it's not that, it only makes it worse. I don't know.