Hi Bend,
Okey this is your workflow, attached some up to date files.
If you have a run in place installation, you do a "./rip-environment" command before "halcompile" command.
Use sudo before each command if you are not as root. For root type "su" enter.
Okey while i did a halcompile, i could not find modbus.h. So i located that file by a find command : "find . -name "modbus.h"
root@debian:/# find . -name "modbus.h"
Location found, oke this is nice :
./usr/include/modbus/modbus.h
I changed the mb2hal header file, so it stops complaining..
Line 17 and 18 now looks like :
//#include <modbus.h>
#include "/usr/include/modbus/modbus.h"
Then i did a halcompile again, if you have a rip install and are root :
root@debian:/home/user/linuxcnc/scripts# ./rip-environment halcompile --install /home/user/linuxcnc/src/hal/user_comps/mb2hal/mb2hal.c
Compiling realtime mb2hal.c
Linking mb2hal.so
cp mb2hal.so /home/user/linuxcnc/rtlib/
root@debian:/home/user/linuxcnc/scripts#
If you have no rip install and no root :
root@debian:/home/user/linuxcnc/scripts# sudo halcompile --install /home/user/linuxcnc/src/hal/user_comps/mb2hal
If you have no rip and root, problably :
root@debian:/home/user/linuxcnc/scripts# ./halcompile --install /home/user/linuxcnc/src/hal/user_comps/mb2hal
or
root@debian:/home/user/linuxcnc/scripts# halcompile --install /home/user/linuxcnc/src/hal/user_comps/mb2hal
Here you go :