Stuck with installation of Eathercat-Master

More
25 Jul 2016 19:27 - 25 Jul 2016 19:33 #78014 by mfalcon
hello everyone

I am new in the world of linuxcnc , and I have a limited experience with linux too. I tried several different ways to install eathercat-master software, but all went in vain. I posted my problem here because it seems to me to be caused by my limited experience in installation these packages, not because the nature of ethercat itself.
I found different methods to install eathercat master:
1)wiki.linuxcnc.org/cgi-bin/wiki.pl?EtherCatDriver
in this link it mentions 2 methods:
the first method :
Installation

If you are using the current LinuxCNC Distribution (LCNC 2.6 Debian Wheezy based at time of writing) the installation is pretty simple:

create a file "/etc/apt/sources.list.d/linuxcnc-mds.list":

deb repo.modusoft.de/linuxcnc/wheezy ./

# sudo apt-get update
# sudo apt-get install linuxcnc-ethercat

the result that I get is that " repo.modusoft.de/linuxcnc/wheezy ./" no more exist and gives 502 error.

the second method is:

# git clone github.com/sittner/linuxcnc-ethercat.git linuxcnc-ethercat
# cd linuxcnc-ethercat
(these two lines work well)
and do a
# make

the result that I get when I do make: configure.mk:8: *** halcompile/comp executable not found or set. Stop.
make: *** [config.mk] Error 2

there is a not in the end of method 2 that I could not understand too:
You need etherlabmaster-dev (from the repos mentioned above) and linuxcnc-dev to be installed for this.


2) here another method github.com/sittner/ec-debianize
# ./configure -a
# cd ..
# dpkg-checkbuilddeps
# dpkg-buildpackage


the result that I get: the terminal refuses the -a with configure, and when I remove -a and I the first line without it, I get this error in the end of the command output :
configure: error: Failed to find Linux sources. Use --with-linux-dir!


I do not know if it was better to publish this topic in hal component forum, but it seems to me that these erronous results are caused by missing commands/packages that I am not aware about.

thanks

Note: I forgot to mention that my linuxcnc is based of RT-Preemption patch.
Last edit: 25 Jul 2016 19:33 by mfalcon.

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

More
28 Jul 2016 01:16 - 28 Jul 2016 01:17 #78087 by tommylight
I am not sure, but i think you also need to copy the linuxcnc git master to your computer, so check the wiki and find the "run in place" how to, or how to pull a git version of linuxcnc.
Last edit: 28 Jul 2016 01:17 by tommylight.
The following user(s) said Thank You: mfalcon

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

More
03 Aug 2016 13:00 #78323 by Cpk_Rbt
There are two different things that need to be installed. The IgH EtherCAT Master and sittner's EtherCAT HAL Driver.

IgH Etherlab EtherCAT Master
1. Download Etherlab Ethercat from the website www.etherlab.org/en/ethercat/
2. Extract the tarball
tar xjf ethercat-1.5.2.tar.bz2
cd ethercat-1.5.2/
3. Run the configuration tool and build (omit the --enable-r8169 if not using the Realtek 8169 driver)
./configure --enable-r8169
make all modules
4. Become root
sudo su
5. Install the software
make modules_install install
depmod
6. Install the system service
mkdir /etc/sysconfig/
cp /opt/etherlab/etc/sysconfig/ethercat /etc/sysconfig/ethercat
ln -s /opt/etherlab/etc/init.d/ethercat /etc/init.d/ethercat
7. Check HWaddr of network device
ifconfig
8. Edit EtherCAT master config to use the MAC address of your chosen network device
sudo nano /etc/default/ethercat
9. Add your MAC address
MASTER0_DEVICE="00:00:00:00:00:00"
10. Edit the DEVICE_MODULES line, adding the r8169 device (again, omit if not using the Realtek 8169 driver)
DEVICE_MODULES=”r8169”
11. Update Configuration
sudo update-ethercat-config
12. Give normal users read access to EtherCAT character devices
echo KERNEL==\"EtherCAT[0-9]*\", MODE=\"0664\" > /etc/udev/rules.d/99-EtherCAT.rules
13. Make the master executable
chmod +x /opt/etherlab/etc/init.d/ethercat
14. Start the master service
/etc/init.d/ethercat start
15. Operation can be observed by viewing the Syslog messages
dmesg

LinuxCNC EtherCAT HAL Driver
1. Download the latest version from github
cd && git clone https://github.com/sittner/linuxcnc-ethercat.git
2. Install etherlabmaster-dev
sudo apt-get install etherlabmaster-dev
3. Open the git directory
cd linuxcnc-ethercat/src
4. Build
make
sudo make install
5. Copy the built binary to the ethercat directory
sudo cp lcec_conf /usr/bin/
The following user(s) said Thank You: mfalcon

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

More
01 Sep 2016 15:43 #79837 by steva
Hello Everyone,

I successfully installed all to point 4 (build hal driver)
Terminal gives me the following text:

etv@etv:~/linuxcnc-ethercat/src$ make
make[1]: Entering directory `/home/etv/linuxcnc-ethercat/src'
make[1]: Warning: File `lcec_conf' has modification time 2.4e+04 s in the future
make[1]: Nothing to be done for `all'.
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/home/etv/linuxcnc-ethercat/src'
make[1]: Entering directory `/home/etv/linuxcnc-ethercat/src'
make EXTRA_CFLAGS="-Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560" KBUILD_EXTRA_SYMBOLS="/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/Module.symvers /usr/realtime-3.4-9-rtai-686-pae/modules/ethercat/Module.symvers" -C /usr/src/linux-headers-3.4-9-rtai-686-pae SUBDIRS=`pwd` CC=gcc V=0 modules
make[2]: Entering directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
CC [M] /home/etv/linuxcnc-ethercat/src/lcec_main.o
/home/etv/linuxcnc-ethercat/src/lcec_main.c: In function ‘lcec_request_lock’:
/home/etv/linuxcnc-ethercat/src/lcec_main.c:913:3: error: implicit declaration of function ‘rtapi_mutex_get’ [-Werror=implicit-function-declaration]
/home/etv/linuxcnc-ethercat/src/lcec_main.c: In function ‘lcec_release_lock’:
/home/etv/linuxcnc-ethercat/src/lcec_main.c:918:3: error: implicit declaration of function ‘rtapi_mutex_give’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[5]: *** [/home/etv/linuxcnc-ethercat/src/lcec_main.o] Error 1
make[4]: *** [_module_/home/etv/linuxcnc-ethercat/src] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
make[1]: *** [lcec.ko] Error 2
make[1]: Leaving directory `/home/etv/linuxcnc-ethercat/src'
make: *** [all] Error 2
etv@etv:~/linuxcnc-ethercat/src$

Any ideas what the problem is?

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

More
01 Sep 2016 16:10 #79838 by Cpk_Rbt

make[1]: Warning: File `lcec_conf' has modification time 2.4e+04 s in the future
make[1]: warning: Clock skew detected. Your build may be incomplete.


These lines stick out as some likely suspects.
Make sure your system time is correct (run date in a terminal and see what it outputs)
Check the date/time on the files
ls -l --full-time

You might be able to get around any time discrepancies by updating the timestamps of all the files to match your system time
touch -c *

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

More
01 Sep 2016 16:32 #79841 by Cpk_Rbt
The current git revision of linuxcnc-ethercat comes with one file mis-named. configure.mk should be config.mk
mv configure.mk config.mk

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

More
01 Sep 2016 17:08 #79849 by steva
I have new issue:

etv@etv:~/linuxcnc-ethercat/src$ make
make[1]: Entering directory `/home/etv/linuxcnc-ethercat/src'
user.mk:10: warning: overriding commands for target `install'
/usr/share/linuxcnc/Makefile.modinc:95: warning: ignoring old commands for target `install'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/etv/linuxcnc-ethercat/src'
make[1]: Entering directory `/home/etv/linuxcnc-ethercat/src'
realtime.mk:37: warning: overriding commands for target `install'
/usr/share/linuxcnc/Makefile.modinc:95: warning: ignoring old commands for target `install'
make EXTRA_CFLAGS="-Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560" KBUILD_EXTRA_SYMBOLS="/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/Module.symvers /usr/realtime-3.4-9-rtai-686-pae/modules/ethercat/Module.symvers" -C /usr/src/linux-headers-3.4-9-rtai-686-pae SUBDIRS=`pwd` CC=gcc V=0 modules
make[2]: Entering directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
CC [M] /home/etv/linuxcnc-ethercat/src/lcec_main.o
/home/etv/linuxcnc-ethercat/src/lcec_main.c: In function ‘lcec_request_lock’:
/home/etv/linuxcnc-ethercat/src/lcec_main.c:915:3: error: implicit declaration of function ‘rtapi_mutex_get’ [-Werror=implicit-function-declaration]
/home/etv/linuxcnc-ethercat/src/lcec_main.c: In function ‘lcec_release_lock’:
/home/etv/linuxcnc-ethercat/src/lcec_main.c:920:3: error: implicit declaration of function ‘rtapi_mutex_give’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[5]: *** [/home/etv/linuxcnc-ethercat/src/lcec_main.o] Error 1
make[4]: *** [_module_/home/etv/linuxcnc-ethercat/src] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
make[1]: *** [lcec.ko] Error 2
make[1]: Leaving directory `/home/etv/linuxcnc-ethercat/src'
make: *** [all] Error 2
etv@etv:~/linuxcnc-ethercat/src$

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

Time to create page: 0.337 seconds
Powered by Kunena Forum