Ethercat installation from repositories - how to step by step

More
16 Jun 2026 04:27 #347104 by awallin
with the latest linuxcnc 2.9.8 ISO-install on a Lenovo M720Q I get compile errors. Any ideas?

more /var/lib/dkms/ethercat-dkms/1.6.9/build/make.log

  CC [M]  /var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.o
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c: In function ‘intel_mgbe_common_data’:
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c:615:15: error: ‘struct plat_stmmacenet_data’ has no member named ‘msi_lpi_vec’; did you mean ‘msi_mac_vec’?
  615 |         plat->msi_lpi_vec = 28;
      |               ^~~~~~~~~~~
      |               msi_mac_vec
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c: In function ‘stmmac_config_multi_msi’:
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c:1001:19: error: ‘struct plat_stmmacenet_data’ has no member named ‘msi_lpi_vec’; did you mean ‘msi_mac_vec’?
 1001 |         if (plat->msi_lpi_vec < STMMAC_MSI_VEC_MAX)
      |                   ^~~~~~~~~~~
      |                   msi_mac_vec
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c:1002:59: error: ‘struct plat_stmmacenet_data’ has no member named ‘msi_lpi_vec’; did you mean ‘msi_mac_vec’?
 1002 |                 res->lpi_irq = pci_irq_vector(pdev, plat->msi_lpi_vec);
      |                                                           ^~~~~~~~~~~
      |                                                           msi_mac_vec
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c: In function ‘intel_eth_pci_probe’:
/var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.c:1084:15: error: ‘struct plat_stmmacenet_data’ has no member named ‘msi_lpi_vec’; did you mean ‘msi_mac_vec’?
 1084 |         plat->msi_lpi_vec = STMMAC_MSI_VEC_MAX;
      |               ^~~~~~~~~~~
      |               msi_mac_vec
make[5]: *** [/usr/src/linux-headers-6.12.86+deb13-common-rt/scripts/Makefile.build:234: /var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac/dwmac-intel-6.12-ethercat.o] Error 1
make[4]: *** [/usr/src/linux-headers-6.12.86+deb13-common-rt/scripts/Makefile.build:471: /var/lib/dkms/ethercat-dkms/1.6.9/build/devices/stmmac] Error 2
make[3]: *** [/usr/src/linux-headers-6.12.86+deb13-common-rt/scripts/Makefile.build:471: /var/lib/dkms/ethercat-dkms/1.6.9/build/devices] Error 2
make[2]: *** [/usr/src/linux-headers-6.12.86+deb13-common-rt/Makefile:1981: /var/lib/dkms/ethercat-dkms/1.6.9/build] Error 2
make[1]: *** [/usr/src/linux-headers-6.12.86+deb13-common-rt/Makefile:236: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.12.86+deb13-rt-amd64'
make: *** [Makefile:963: modules] Error 2

# exit code: 2
# elapsed time: 00:03:42 

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
16 Jun 2026 07:55 #347110 by rodw
You could try deleting the igH.sources (name might be a  bit wrong) from /etc/apt/sources.list.d

And follow this process which I have tested with 2.98 in the last week or so.
github.com/linuxcnc-ethercat/apt

This is going to become the official repository and Ethercat version to use for linuxcnc

Please Log in or Create an account to join the conversation.

More
16 Jun 2026 13:33 #347112 by GFC
Im fairly new to linux cnc, trying to do a clean install in a mini pc of the 2.9.8 iso but im encoutering these errors when trying to install ethercat the way this thread discribes, can someone help?


Failed command:
./configure --enable-sii-assign --disable-rt-syslog --disable-tool --disable-userlib --enable-generic --enable-ccat --disable-tty --with-linux-dir=/lib/modules/6.12.86+deb13-rt-amd64/build --enable-e1000 --enable-igb --disable-igbvf --disable-ixgbevf --enable-igc --enable-e1000e --enable-8139too --enable-e100 --enable-r8169 --disable-stmmac-pci --enable-dwmac-intel --disable-genet && make modules

Error! Bad return status for module build on kernel: 6.12.86+deb13-rt-amd64 (x86_64)
Consult /var/lib/dkms/ethercat-dkms/1.6.9/build/make.log for more information.
dpkg: error processing package ethercat-dkms (--configure):
 installed ethercat-dkms package post-installation script subprocess returned error exit status 10
Setting up libltdl-dev:amd64 (2.5.4-4) ...
dpkg: dependency problems prevent configuration of ethercat-master:
 ethercat-master depends on ethercat-dkms; however:
  Package ethercat-dkms is not configured yet.

dpkg: error processing package ethercat-master (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linuxcnc-ethercat:
 linuxcnc-ethercat depends on etherlabmaster | ethercat-master; however:
  Package etherlabmaster is not installed.
  Package ethercat-master is not configured yet.

dpkg: error processing package linuxcnc-ethercat (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.13.1-1) ...
Processing triggers for libc-bin (2.41-12+deb13u3) ...
Errors were encountered while processing:
 ethercat-dkms
 ethercat-master
 linuxcnc-ethercat
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please Log in or Create an account to join the conversation.

More
16 Jun 2026 16:16 #347118 by awallin

And follow this process which I have tested with 2.98 in the last week or so.
github.com/linuxcnc-ethercat/apt

 

Thanks, this repo works for me on 2.9.8 (the default is in the file /etc/apt/sources.list.d/science_EtherLab.list and gives errors)
 
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
17 Jun 2026 15:29 #347138 by GFC
after looking through the logs a bit more, I figured that the solution that rodw recommended to awallin also fixes my errors, thanks anyways
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
18 Jun 2026 10:18 #347146 by rodw
I will update the first post so wish me luck!

There was some talk of publishing a new 2.9.x version to fix some bugs. If that is the case, I will send in a PR to update the repos in the installer based on the link above.

Please Log in or Create an account to join the conversation.

More
18 Jun 2026 20:24 #347154 by SoloRev
The issue seems to be DKMS failing with the latest debian kernel. I couldn’t figure out how to uninstall the kernel but I was able to stop it from being installed on a new system. Before you do a 
sudo apt upgrade
. stop any kernel update with 
sudo apt-mark hold *6.12*
basically wildcard the 6.12 string on both sides to prevent anything related to the kernel from being updated. 

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
19 Jun 2026 08:52 #347160 by rodw

The issue seems to be DKMS failing with the latest debian kernel. I couldn’t figure out how to uninstall the kernel but I was able to stop it from being installed on a new system. Before you do a 
sudo apt upgrade. stop any kernel update with [code]sudo apt-mark hold *6.12* basically wildcard the 6.12 string on both sides to prevent anything related to the kernel from being updated. 
[/code]

Did you try the revised instructions in the first post?

Please Log in or Create an account to join the conversation.

More
20 Jun 2026 05:08 #347173 by SoloRev
I didn’t see that the instructions were changed. I’ll have a go at those on a new system. that one is being heavily used for testing now.

Please Log in or Create an account to join the conversation.

More
20 Jun 2026 18:50 #347177 by spumco
Tried a fresh install from scratch and running in to an error during ethercat installation.
  • LCNC ISO installed ok
  • Updated realtek NIC driver OK - latency and network speed good, no issues.
  • Followed first post in this thread, removed iGh repo
  • Updated ethercat.conf via geany with MAC address of port (enp2S0)

got a failure starting start ethercat.service:
sudo systemctl enable ethercat.service
Synchronizing state of ethercat.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable ethercat
mill@mill:~$ sudo systemctl start ethercat.service
Job for ethercat.service failed because the control process exited with error code.
See "systemctl status ethercat.service" and "journalctl -xeu ethercat.service" for details.
mill@mill:~$ systemctl status ethercat.service
× ethercat.service - EtherCAT Master Kernel Modules
     Loaded: loaded (/usr/lib/systemd/system/ethercat.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2026-06-20 14:38:57 EDT; 26s ago
 Invocation: 1f3d48bc0cb741a787b3ce8d8d781907
    Process: 2624 ExecStart=/usr/sbin/ethercatctl start (code=exited, status=1/FAILURE)
   Main PID: 2624 (code=exited, status=1/FAILURE)
   Mem peak: 2M
        CPU: 43ms
mill@mill:~$ journalctl -xeu ethercat.service
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.

Can anyone interpret the error and help me with a path forward?

Please Log in or Create an account to join the conversation.

Time to create page: 0.291 seconds
Powered by Kunena Forum