Can't build e1000e-dkms driver - Error! Bad return status for module build

i am trying to install e1000e-dkms driver.

the

sudo dksm build -m e1000e -v 3.8.7

command return:

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.15.7-zen1-1-zen -C /usr/lib/modules/5.15.7-zen1-1-zen/build M=/var/lib/dkms/e1000e/3.8.7/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.7-zen1-1-zen (x86_64)
Consult /var/lib/dkms/e1000e/3.8.7/build/make.log for more information.

how can i fix it?
I really appreciate your time.

the make.log file:

DKMS make.log for e1000e-3.8.7 for kernel 5.15.7-zen1-1-zen (x86_64)
Thu Dec 23 10:15:51 PM +0330 2021
make: Entering directory '/usr/lib/modules/5.15.7-zen1-1-zen/build'
  CC [M]  /var/lib/dkms/e1000e/3.8.7/build/netdev.o
  CC [M]  /var/lib/dkms/e1000e/3.8.7/build/ethtool.o
  CC [M]  /var/lib/dkms/e1000e/3.8.7/build/ich8lan.o
  CC [M]  /var/lib/dkms/e1000e/3.8.7/build/mac.o
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2838:35: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types]
 2838 |         .get_coalesce           = e1000_get_coalesce,
      |                                   ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2838:35: note: (near initialization for ‘e1000_ethtool_ops.get_coalesce’)
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2839:35: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types]
 2839 |         .set_coalesce           = e1000_set_coalesce,
      |                                   ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2839:35: note: (near initialization for ‘e1000_ethtool_ops.set_coalesce’)
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c: In function ‘e1000_get_rxnfc’:
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2580:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2580 |                         if (mrqc & E1000_MRQC_RSS_FIELD_IPV4_TCP)
      |                            ^
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2583:17: note: here
 2583 |                 case UDP_V4_FLOW:
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2591:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2591 |                         if (mrqc & E1000_MRQC_RSS_FIELD_IPV6_TCP)
      |                            ^
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:2594:17: note: here
 2594 |                 case UDP_V6_FLOW:
      |                 ^~~~
In file included from /var/lib/dkms/e1000e/3.8.7/build/ethtool.c:15:
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c: In function ‘e1000_loopback_cleanup’:
/var/lib/dkms/e1000e/3.8.7/build/e1000.h:672:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
  672 | #define ew32(reg, val)  __ew32(hw, E1000_##reg, (val))
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:1931:17: note: in expansion of macro ‘ew32’
 1931 |                 ew32(TARC(0), tarc0);
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:1933:9: note: here
 1933 |         case e1000_80003es2lan:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:1934:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1934 |                 if (hw->phy.media_type == e1000_media_type_fiber ||
      |                    ^
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:1941:9: note: here
 1941 |         case e1000_82571:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:1943:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1943 |                 if (hw->phy.media_type == e1000_media_type_fiber ||
      |                    ^
/var/lib/dkms/e1000e/3.8.7/build/ethtool.c:1951:9: note: here
 1951 |         default:
      |         ^~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c: In function ‘e1000_init_phy_workarounds_pchlan’:
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:320:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
  320 |                 msleep(50);
      |                 ^~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:323:9: note: here
  323 |         case e1000_pch2lan:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:324:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
  324 |                 if (e1000_phy_is_accessible_pchlan(hw))
      |                    ^
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:328:9: note: here
  328 |         case e1000_pchlan:
      |         ^~~~
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from ./include/linux/list.h:9,
                 from ./include/linux/timer.h:5,
                 from ./include/linux/netdevice.h:24,
                 from /var/lib/dkms/e1000e/3.8.7/build/e1000.h:11,
                 from /var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:41:
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c: In function ‘e1000_valid_nvm_bank_detect_ich8lan’:
./include/linux/dynamic_debug.h:131:52: warning: this statement may fall through [-Wimplicit-fallthrough=]
  131 | #define __dynamic_func_call(id, fmt, func, ...) do {    \
      |                                                    ^
./include/linux/dynamic_debug.h:152:9: note: in expansion of macro ‘__dynamic_func_call’
  152 |         __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:170:9: note: in expansion of macro ‘_dynamic_func_call’
  170 |         _dynamic_func_call(fmt, __dynamic_netdev_dbg,           \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/netdevice.h:5332:9: note: in expansion of macro ‘dynamic_netdev_dbg’
 5332 |         dynamic_netdev_dbg(__dev, format, ##args);              \
      |         ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/e1000.h:36:9: note: in expansion of macro ‘netdev_dbg’
   36 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |         ^~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:3224:17: note: in expansion of macro ‘e_dbg’
 3224 |                 e_dbg("Unable to determine valid NVM bank via EEC - reading flash signature\n");
      |                 ^~~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:3226:9: note: here
 3226 |         default:
      |         ^~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c: In function ‘e1000_sw_lcd_config_ich8lan’:
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:2128:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2128 |                 if ((hw->adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_AMT) ||
      |                    ^
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:2134:9: note: here
 2134 |         case e1000_pchlan:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c: In function ‘e1000_check_for_copper_link_ich8lan’:
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:1596:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1596 |                 if (ret_val)
      |                    ^
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:1599:9: note: here
 1599 |         case e1000_pchlan:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c: In function ‘e1000_init_mac_params_ich8lan’:
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:688:34: warning: this statement may fall through [-Wimplicit-fallthrough=]
  688 |                 mac->ops.rar_set = e1000_rar_set_pch2lan;
      |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:690:9: note: here
  690 |         case e1000_pch_lpt:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c: In function ‘e1000_init_phy_params_pchlan’:
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:441:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
  441 |                         if ((phy->id != 0) && (phy->id != PHY_REVISION_MASK))
      |                            ^
/var/lib/dkms/e1000e/3.8.7/build/ich8lan.c:444:17: note: here
  444 |                 case e1000_pch2lan:
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/netdev.c: In function ‘e1000e_set_interrupt_capability’:
/var/lib/dkms/e1000e/3.8.7/build/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/netdev.c:2317:9: note: here
 2317 |         case E1000E_INT_MODE_MSI:
      |         ^~~~
/var/lib/dkms/e1000e/3.8.7/build/netdev.c: In function ‘e1000e_reset’:
/var/lib/dkms/e1000e/3.8.7/build/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/netdev.c:4551:9: note: here
 4551 |         default:
      |         ^~~~~~~
/var/lib/dkms/e1000e/3.8.7/build/netdev.c: In function ‘e1000_setup_rctl’:
/var/lib/dkms/e1000e/3.8.7/build/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/netdev.c:3568:17: note: here
 3568 |                 case 2:
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/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/netdev.c:3571:17: note: here
 3571 |                 case 1:
      |                 ^~~~
/var/lib/dkms/e1000e/3.8.7/build/netdev.c: In function ‘__e1000e_disable_aspm’:
/var/lib/dkms/e1000e/3.8.7/build/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/netdev.c:7578:9: note: here
 7578 |         case PCIE_LINK_STATE_L1:
      |         ^~~~
  CC [M]  /var/lib/dkms/e1000e/3.8.7/build/nvm.o
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:277: /var/lib/dkms/e1000e/3.8.7/build/ethtool.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1863: /var/lib/dkms/e1000e/3.8.7/build] Error 2
make: Leaving directory '/usr/lib/modules/5.15.7-zen1-1-zen/build'

The dkms.conf file:

PACKAGE_NAME="e1000e"
PACKAGE_VERSION="3.8.7"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="e1000e"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/intel/e1000e/"
AUTOINSTALL="yes"

and the inxi -Faz

System:
Kernel: 5.15.7-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=72e94341-668a-424d-8830-c9832204de7a rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 xhci_hcd.quirks=270336 loglevel=3
Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: CDM product: CDM-001 v: N/A
serial: <superuser required>
Mobo: AAEON model: LIQ77A v: Rev X.0x serial: <superuser required>
UEFI: American Megatrends v: 9901 date: 07/23/2013
CPU:
Info: model: Intel Core i5-2500 bits: 64 type: MCP arch: Sandy Bridge
family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
desc: 1x6 MiB
Speed (MHz): avg: 2011 high: 2685 min/max: 1600/3700 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 1688 2: 2685 3: 2075
4: 1596 bogomips: 26340
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
Type: mds mitigation: Clear CPU buffers; SMT disabled
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
IBRS_FW, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: AMD Baffin [Radeon RX 460/560D / Pro
450/455/460/555/555X/560/560X]
vendor: Gigabyte driver: amdgpu v: kernel bus-ID: 01:00.0
chip-ID: 1002:67ef class-ID: 0300
Display: x11 server: X.Org 1.21.1.2 compositor: kwin_x11 driver:
loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
s-diag: 582mm (22.9")
Monitor-1: HDMI-A-0 res: 1920x1080 hz: 60 dpi: 69
size: 708x398mm (27.9x15.7") diag: 812mm (32")
OpenGL: renderer: AMD Radeon RX 460 Graphics (POLARIS11 DRM 3.42.0
5.15.7-zen1-1-zen LLVM 13.0.0)
v: 4.6 Mesa 21.3.1 direct render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio
vendor: ASUSTeK P8Z77-V LX driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:1e20 class-ID: 0403
Device-2: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 01:00.1
chip-ID: 1002:aae0 class-ID: 0403
Sound Server-1: ALSA v: k5.15.7-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
Device-1: Intel 82579LM Gigabit Network vendor: ASUSTeK driver: e1000e
v: kernel port: f040 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200
IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter>
IF-ID-1: vpn0 state: up speed: 10 Mbps duplex: full mac: N/A
Drives:
Local Storage: total: 1.2 TiB used: 29.58 GiB (2.4%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 EVO 500GB
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: 2B6Q scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST3500413AS
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: HDD rpm: 7200 serial: <filter> rev: JC4B scheme: GPT
ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital
model: WD3200AVJS-63B6A0 size: 298.09 GiB block-size: physical: 512 B
logical: 512 B speed: 3.0 Gb/s type: N/A serial: <filter> rev: 3A02
scheme: GPT
Partition:
ID-1: / raw-size: 72.53 GiB size: 72.53 GiB (100.00%)
used: 29.55 GiB (40.7%) fs: btrfs dev: /dev/sda4 maj-min: 8:4
ID-2: /boot/efi raw-size: 100 MiB size: 98.4 MiB (98.42%)
used: 27.4 MiB (27.9%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 72.53 GiB size: 72.53 GiB (100.00%)
used: 29.55 GiB (40.7%) fs: btrfs dev: /dev/sda4 maj-min: 8:4
ID-4: /var/log raw-size: 72.53 GiB size: 72.53 GiB (100.00%)
used: 29.55 GiB (40.7%) fs: btrfs dev: /dev/sda4 maj-min: 8:4
ID-5: /var/tmp raw-size: 72.53 GiB size: 72.53 GiB (100.00%)
used: 29.55 GiB (40.7%) fs: btrfs dev: /dev/sda4 maj-min: 8:4
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.7 GiB used: 159.8 MiB (2.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: amdgpu temp: 45.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 1723
Info:
Processes: 278 Uptime: 2h 42m wakeups: 0 Memory: 7.7 GiB
used: 2.91 GiB (37.8%) Init: systemd v: 249 tool: systemctl Compilers:
gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 2107 lib: 471 Shell: fish
v: 3.3.1 default: Bash v: 5.1.12 running-in: konsole inxi: 3.3.11

There is nothing wrong with using dkms to build the driver, but the better way for a new user to do this is with an AUR helper.

Garuda comes with the AUR helper paru preinstalled.

Try this command:

paru e1000e-dkms

You may want to test installing the linux-lts kernel first and then try building the driver on the LTS kernel. Garuda has a GUI utility for managing kernel versions. You do not have to build a kernel manually either.

4 Likes

i also got the build error while trying with 'paru' or 'yaourt'. but i where using it on a test temporary kernel. in other kernels they worked! i still don't know what was the problem there. but yes using a helper is much better specially for new users :smiley:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.