Closed surangamh closed 2 years ago
I'm not sure how to advise on this. I've tried compiling on multiple machines without issues. The closest machine to your configuration that I've tried is the following, which worked for me just now: Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Would it be possible to test compiling the driver on another Linux machine that you might have access to as a sanity check?
Best regards, --Chris
Thanks for the reply! I tried on another machine and ran into the same issue. However, after commenting this out, I could compile without getting any error (I know this is not the best way to solve the issue, but it worked for me.). Then I tested the driver by sending/receiving packets between two U280s and it worked.
I get the following error when I try to run make.
make -C /lib/modules/4.15.0-166-generic/build M=/home/suranga/open-nic-driver modules make[1]: Entering directory '/usr/src/linux-headers-4.15.0-166-generic' CC [M] /home/suranga/open-nic-driver/onic_main.o CC [M] /home/suranga/open-nic-driver/onic_sysfs.o CC [M] /home/suranga/open-nic-driver/onic_ethtool.o CC [M] /home/suranga/open-nic-driver/onic_hardware.o CC [M] /home/suranga/open-nic-driver/onic_lib.o CC [M] /home/suranga/open-nic-driver/onic_netdev.o /home/suranga/open-nic-driver/onic_netdev.c: In function ‘onic_xmit_frame’: /home/suranga/open-nic-driver/onic_netdev.c:731:79: error: missing binary operator before token "("
elif defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))
scripts/Makefile.build:333: recipe for target '/home/suranga/open-nic-driver/onic_netdev.o' failed make[2]: [/home/suranga/open-nic-driver/onic_netdev.o] Error 1 Makefile:1590: recipe for target 'module/home/suranga/open-nic-driver' failed make[1]: [module/home/suranga/open-nic-driver] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-166-generic' Makefile:24: recipe for target 'all' failed make: *** [all] Error 2
I am using Ubuntu 18.04. The kernel version is: 4.15.0-166.
How to fix this? Any help would be greatly appreciated.
-Suranga