Matrixio-kernel-modules Installation Fails

On a Raspberry Pi 3 Model B with Raspbian Buster the matrixio-kernel-modules installation fails (for Matrix Voice):

$ uname -a
Linux exp 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
$ sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
...
$ curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list
...
$ sudo apt-get update
...
$ sudo apt-get upgrade
...
$ sudo reboot
...
$ sudo apt install matrixio-kernel-modules
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdrm-etnaviv1 libllvm6.0 python3-pyperclip python3-thonny rpi.gpio-common
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  matrixio-kernel-modules
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/17.8 kB of archives.
After this operation, 108 kB of additional disk space will be used.
Selecting previously unselected package matrixio-kernel-modules.
(Reading database ... 232100 files and directories currently installed.)
Preparing to unpack .../matrixio-kernel-modules_0.1.9_armhf.deb ...
Unpacking matrixio-kernel-modules (0.1.9) ...
Setting up matrixio-kernel-modules (0.1.9) ...
Enabling firmware loading at startup

Creating symlink /var/lib/dkms/matrixio/0.1/source ->
                 /usr/src/matrixio-0.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make -j4 KERNELRELEASE=4.19.75-v7+ -C /lib/modules/4.19.75-v7+/build M=/var/lib/dkms/matrixio/0.1/build......(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.75-v7+ (armv7l)
Consult /var/lib/dkms/matrixio/0.1/build/make.log for more information.
dpkg: error processing package matrixio-kernel-modules (--configure):
 installed matrixio-kernel-modules package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 matrixio-kernel-modules
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ cat /var/lib/dkms/matrixio/0.1/build/make.log 
DKMS make.log for matrixio-0.1 for kernel 4.19.75-v7+ (armv7l)
Thu 10 Oct 2019 11:01:34 PM PDT
make: Entering directory '/usr/src/linux-headers-4.19.75-v7+'
  CC [M]  /var/lib/dkms/matrixio/0.1/build/matrixio-core.o
  CC [M]  /var/lib/dkms/matrixio/0.1/build/matrixio-uart.o
  CC [M]  /var/lib/dkms/matrixio/0.1/build/matrixio-everloop.o
  CC [M]  /var/lib/dkms/matrixio/0.1/build/matrixio-codec.o
/bin/sh: 1: ./scripts/recordmcount: Exec format error
make[1]: *** [scripts/Makefile.build:309: /var/lib/dkms/matrixio/0.1/build/matrixio-everloop.o] Error 2
make[1]: *** Deleting file '/var/lib/dkms/matrixio/0.1/build/matrixio-everloop.o'
make[1]: *** Waiting for unfinished jobs....
/bin/sh: 1: ./scripts/recordmcount: Exec format error
make[1]: *** [scripts/Makefile.build:309: /var/lib/dkms/matrixio/0.1/build/matrixio-codec.o] Error 2
make[1]: *** Deleting file '/var/lib/dkms/matrixio/0.1/build/matrixio-codec.o'
/bin/sh: 1: scripts/genksyms/genksyms: Exec format error
make[1]: *** [scripts/Makefile.build:309: /var/lib/dkms/matrixio/0.1/build/matrixio-core.o] Error 2
/bin/sh: 1: ./scripts/recordmcount: Exec format error
make[1]: *** [scripts/Makefile.build:309: /var/lib/dkms/matrixio/0.1/build/matrixio-uart.o] Error 2
make[1]: *** Deleting file '/var/lib/dkms/matrixio/0.1/build/matrixio-uart.o'
make: *** [Makefile:1519: _module_/var/lib/dkms/matrixio/0.1/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.19.75-v7+'

Any ideas on how to troubleshot this?

Thanks.

Kind Regards,
hev

Hey @hev,
The most straightforward approach would be to flash a new Raspbian image and test if all the MATRIX packages install correctly. Another alternative would be to uninstall all MATRIX packages, reboot, and reinstall them again.

The kernel packages installed for me on my Pi 4 with Buster, but I’ll try again on a Pi 3B to make sure everything is okay.

Let us know how it goes!

1 Like

@Carlos: Very good suggestions!

I now tried the installation of the Matrixio-kernel-modules on a new Raspbian image with a different SD card. This results in the same error traces as above. I then tried to reinstall the MATRIX packages by doing:

$ sudo apt purge matrixio-kernel-modules
$ sudo apt autoremove  # Remove dependencies
$ sudo reboot
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install matrixio-kernel-modules

In this way the installation completes successfully without any errors.

I then tested the microphone array with:

$ sudo reboot
$ arecord recording.wav -f S16_LE -r 1600 -d 5

Subsequently I played back the recorded audio on a computer with a speakers (via aplay recording.wav) and could confirm that it is working as it played back the sound.

It would be good to resolve why a first install on this particular setup results in a failed installation.

Thank you very much!

1 Like

Glad it worked! No clue why that’s happening though. :sweat_smile:
I’ll test on my own Pi and ask if anyone on the team has any ideas.

1 Like