koljah-de / e1000e-dkms-debian

Intel e1000e ethernet adapter driver (DKMS version) for Debian
https://sourceforge.net/projects/e1000/
GNU General Public License v2.0
71 stars 14 forks source link

Compile error under ubuntu linux kernel 6.8.0-45-generic #15

Open rokj opened 1 month ago

rokj commented 1 month ago

When I try to compile under Ubuntu 24.04.1 LTS with kernel 6.8.0-45-generic I get following error

make[1]: Entering directory '/usr/src/linux-headers-6.8.0-45-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-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/e1000e/3.8.7/build/src/netdev.o
In file included from ./include/linux/string.h:292,
                 from ./include/linux/bitmap.h:12,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/paravirt.h:21,
                 from ./arch/x86/include/asm/cpuid.h:62,
                 from ./arch/x86/include/asm/processor.h:19,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:6:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000_set_mac’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:5381:22: warning: passing argument 1 of ‘__builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5381 |         memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
      |                ~~~~~~^~~~~~~~~~
./include/linux/fortify-string.h:607:27: note: in definition of macro ‘__fortify_memcpy_chk’
  607 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:5381:9: note: in expansion of macro ‘memcpy’
 5381 |         memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
      |         ^~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:5381:22: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
 5381 |         memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
      |                ~~~~~~^~~~~~~~~~
./include/linux/fortify-string.h:607:27: note: in definition of macro ‘__fortify_memcpy_chk’
  607 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:5381:9: note: in expansion of macro ‘memcpy’
 5381 |         memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
      |         ^~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000_ioctl’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:7043:24: error: implicit declaration of function ‘e1000e_hwtstamp_get’ [-Werror=implicit-function-declaration]
 7043 |                 return e1000e_hwtstamp_get(netdev, ifr);
      |                        ^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000_print_device_info’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8172:17: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]
 8172 |                 strlcpy((char *)pba_str, "Unknown", sizeof(pba_str));
      |                 ^~~~~~~
      |                 strscpy
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000_probe’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8378:9: error: implicit declaration of function ‘pci_enable_pcie_error_reporting’ [-Werror=implicit-function-declaration]
 8378 |         pci_enable_pcie_error_reporting(pdev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8485:9: error: too many arguments to function ‘netif_napi_add’
 8485 |         netif_napi_add(netdev, &adapter->napi, e1000e_poll, 64);
      |         ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:13:
./include/linux/netdevice.h:2707:1: note: declared here
 2707 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8639:22: warning: passing argument 1 of ‘__builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 8639 |         memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
      |                ~~~~~~^~~~~~~~~~
./include/linux/fortify-string.h:607:27: note: in definition of macro ‘__fortify_memcpy_chk’
  607 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8639:9: note: in expansion of macro ‘memcpy’
 8639 |         memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
      |         ^~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8639:22: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
 8639 |         memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
      |                ~~~~~~^~~~~~~~~~
./include/linux/fortify-string.h:607:27: note: in definition of macro ‘__fortify_memcpy_chk’
  607 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8639:9: note: in expansion of macro ‘memcpy’
 8639 |         memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
      |         ^~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000_remove’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:8864:9: error: implicit declaration of function ‘pci_disable_pcie_error_reporting’ [-Werror=implicit-function-declaration]
 8864 |         pci_disable_pcie_error_reporting(pdev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000e_set_interrupt_capability’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:2315:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2315 |                 adapter->int_mode = E1000E_INT_MODE_MSI;
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:2317:9: note: here
 2317 |         case E1000E_INT_MODE_MSI:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000e_reset’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:4543:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 4543 |                 if (adapter->netdev->mtu > ETH_DATA_LEN) {
      |                    ^
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:4551:9: note: here
 4551 |         default:
      |         ^~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘e1000_setup_rctl’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:3566:32: warning: this statement may fall through [-Wimplicit-fallthrough=]
 3566 |                         psrctl |= PAGE_SIZE << E1000_PSRCTL_BSIZE3_SHIFT;
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:3568:17: note: here
 3568 |                 case 2:
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:3569:32: warning: this statement may fall through [-Wimplicit-fallthrough=]
 3569 |                         psrctl |= PAGE_SIZE << E1000_PSRCTL_BSIZE2_SHIFT;
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:3571:17: note: here
 3571 |                 case 1:
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c: In function ‘__e1000e_disable_aspm’:
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:7576:31: warning: this statement may fall through [-Wimplicit-fallthrough=]
 7576 |                 aspm_dis_mask |= PCI_EXP_LNKCTL_ASPM_L0S;
/var/lib/dkms/e1000e/3.8.7/build/src/netdev.c:7578:9: note: here
 7578 |         case PCIE_LINK_STATE_L1:
      |         ^~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/e1000e/3.8.7/build/src/netdev.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-45-generic/Makefile:1925: /var/lib/dkms/e1000e/3.8.7/build/src] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-45-generic'
make: *** [Makefile:73: default] Error 2
rokj commented 1 month ago

I get similar error with driver version 3.8.4.

smiba commented 4 weeks ago

Yeah hasn't been working for me for a while now, I think e1000e may have been included in the kernel for a while now though? As I believe e1000e.ko exists in my kernel module folder for 6.8.12