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

Add missing function definition #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpm-canonical
Copy link

@jpm-canonical jpm-canonical commented Jul 11, 2024

Compiling v4.18.0 from source ends in an error because of a missing function definition in pcie_common.h. This PR adds the missing define.

jpmeijers@jpmeijers-desktop:~/hailort-drivers$ git checkout master
Previous HEAD position was f840b62 v4.17.0 (#14)
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
jpmeijers@jpmeijers-desktop:~/hailort-drivers$ git pull
Already up to date.
jpmeijers@jpmeijers-desktop:~/hailort-drivers/linux/pcie$ git describe --exact-match --tags
v4.18.0
jpmeijers@jpmeijers-desktop:~/hailort-drivers$ cd linux/pcie/
jpmeijers@jpmeijers-desktop:~/hailort-drivers/linux/pcie$ make all
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-1004-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]  /home/jpmeijers/hailort-drivers/linux/pcie/src/pcie.o
  CC [M]  /home/jpmeijers/hailort-drivers/linux/pcie/src/fops.o
  CC [M]  /home/jpmeijers/hailort-drivers/linux/pcie/src/utils.o
  CC [M]  /home/jpmeijers/hailort-drivers/linux/pcie/src/sysfs.o
  CC [M]  /home/jpmeijers/hailort-drivers/linux/pcie/../../common/fw_validation.o
  CC [M]  /home/jpmeijers/hailort-drivers/linux/pcie/../../common/fw_operation.o
  CC [M]  /home/jpmeijers/hailort-drivers/linux/pcie/../../common/pcie_common.o
/home/jpmeijers/hailort-drivers/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: /home/jpmeijers/hailort-drivers/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-1004-raspi/Makefile:1926: /home/jpmeijers/hailort-drivers/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-1004-raspi'
make: *** [Makefile:93: all] Error 2

Also mentioned on the forum: https://community.hailo.ai/t/cant-install-hailo-rt-pcie-driver-4-17-0-all-deb/1697/8?u=hailo1

@afaerber
Copy link

afaerber commented Sep 6, 2024

FTR since this function is only used directly after in the same file, my simpler fix was to just add static.

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

Successfully merging this pull request may close these issues.

2 participants