Hailo 8 on raspberry-pi on ubuntu 24 Error

Hello, i have no idear of why DKMs tree not work.

(base) root@raspberrypi:/home/pi# sudo apt-get install build-essential linux-headers-$(uname -r) dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.10ubuntu1).
linux-headers-6.8.0-1011-raspi is already the newest version (6.8.0-1011.12).
dkms is already the newest version (3.0.11-1ubuntu13).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up hailort-pcie-driver (4.18.0) ...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

build-essential/noble,now 12.10ubuntu1 arm64 [installed]
Do you wish to use DKMS? [Y/n]:y

Failed to install PCIe driver to the DKMS tree. Trying to install PCIe driver without DKMS
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
dpkg: error processing package hailort-pcie-driver (--configure):
 installed hailort-pcie-driver package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 hailort-pcie-driver
needrestart is being skipped since dpkg has failed
(base) root@raspberrypi:/home/pi# uname -r
6.8.0-1011-raspi

Hey @Anywhere,

Welcome to the Hailo Community! We’re glad to have you join us.

I have a couple of questions to help us better assist you:

  1. Are you using the Raspberry Pi AI Kit?

If you are, we recommend using the following command to install all the necessary requirements:

sudo apt install hailo-all

This will make it much easier to work with our tools.

  1. If you’re not using the official Raspberry Pi OS, are you encountering any issues?

In case you’re using a different OS and experiencing problems, it might be related to the kernel version. We suggest trying to work with kernel version 6.5.0, as this has shown good compatibility with our software.

If you need any further clarification or assistance, please don’t hesitate to ask. We’re here to help you get up and running smoothly with our platform.

Thanks. I remove all the package and install again it works. But, a new error comesout.

(base) root@raspberrypi:/home/pi# dpkg --install hailort-pcie-driver_4.18.0_all.deb
Selecting previously unselected package hailort-pcie-driver.
(Reading database ... 161474 files and directories currently installed.)
Preparing to unpack hailort-pcie-driver_4.18.0_all.deb ...
Could not test for SecureBoot, assuming SecureBoot is disabled on this machine.
Unpacking hailort-pcie-driver (4.18.0) ...
Setting up hailort-pcie-driver (4.18.0) ...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

build-essential/noble,now 12.10ubuntu1 arm64 [installed]
Do you wish to use DKMS? [Y/n]:
Failed to install PCIe driver to the DKMS tree. Trying to install PCIe driver without DKMS
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
dpkg: error processing package hailort-pcie-driver (--install):
 installed hailort-pcie-driver package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 hailort-pcie-driver

Here’s the report

Thu Sep 26 09:21:29 CST 2024
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-1011-raspi'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: aarch64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  You are using:           gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pcie.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/fops.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/utils.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/sysfs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_validation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_operation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/vdma_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/hailo_resource.o
/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../utils/logs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/vdma.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/memory.o
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-6.8.0-1011-raspi/Makefile:1925: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-1011-raspi'
make: *** [Makefile:131: install_dkms] Error 1
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-1011-raspi'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-1011-raspi'
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-1011-raspi'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: aarch64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  You are using:           gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  CC [M]  /share/opt/hailo/linux/pcie/src/pcie.o
  CC [M]  /share/opt/hailo/linux/pcie/src/fops.o
  CC [M]  /share/opt/hailo/linux/pcie/src/utils.o
  CC [M]  /share/opt/hailo/linux/pcie/src/sysfs.o
  CC [M]  /share/opt/hailo/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_validation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_operation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/pcie_common.o
/share/opt/hailo/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /share/opt/hailo/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-1011-raspi/Makefile:1925: /share/opt/hailo/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-1011-raspi'
make: *** [Makefile:93: all] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 49
   46
   47   function compile_and_install_pcie_driver_without_dkms() {
   48       make clean &>> $LOG
   49       make all &>> $LOG
   50       make install &>> $LOG
   51   }
   52

Hey @Anywhere

I suggest trying a different kernel version. Specifically:

  1. Change the kernel to version 6.5 instead of 6.8
  2. After changing the kernel, attempt a complete reinstallation of everything

Let me know if this helps resolve the issue or if you need any further assistance with the process.