operator@tormachpcnc:~$ sudo halcompile --install '/home/operator/Desktop/vfdb_vfd.c' make KBUILD_EXTRA_SYMBOLS=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/Module.symvers -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 modules make[1]: Entering directory `/usr/src/linux-headers-2.6.32-122-rtai' CC [M] /tmp/tmp4Iv2Dt/vfdb_vfd.o /tmp/tmp4Iv2Dt/vfdb_vfd.c:36:2: error: #error This is intended as a userspace component only. /tmp/tmp4Iv2Dt/vfdb_vfd.c:48:19: error: stdio.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:49:20: error: unistd.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:50:18: error: time.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:51:20: error: string.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:52:19: error: ctype.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:53:20: error: stdlib.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:54:20: error: signal.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:55:19: error: errno.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:56:20: error: getopt.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:57:18: error: math.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:63:20: error: modbus.h: No such file or directory /tmp/tmp4Iv2Dt/vfdb_vfd.c:64:24: error: modbus-tcp.h: No such file or directory In file included from /tmp/tmp4Iv2Dt/vfdb_vfd.c:65: /usr/include/linuxcnc/inifile.h:22:19: error: fcntl.h: No such file or directory In file included from /tmp/tmp4Iv2Dt/vfdb_vfd.c:65: /usr/include/linuxcnc/inifile.h:29: error: expected ‘)’ before ‘*’ token /usr/include/linuxcnc/inifile.h:30: error: expected ‘)’ before ‘*’ token /usr/include/linuxcnc/inifile.h:31: error: expected ‘)’ before ‘*’ token /tmp/tmp4Iv2Dt/vfdb_vfd.c:227: error: expected specifier-qualifier-list before ‘FILE’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:267: error: unknown field ‘fp’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:267: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:267: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:268: error: unknown field ‘inifile’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:268: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:268: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:269: error: unknown field ‘reconnect_delay’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:269: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:269: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:270: error: unknown field ‘ctx’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:270: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:270: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:271: error: unknown field ‘haldata’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:271: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:271: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:272: error: unknown field ‘hal_comp_id’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:272: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:272: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:273: error: unknown field ‘read_initial_done’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:273: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:273: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:274: error: unknown field ‘old_err_reset’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:274: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:274: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:275: error: unknown field ‘old_cmd1_reg’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:275: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:275: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:276: error: unknown field ‘modbus_ok’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:276: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:276: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:277: error: unknown field ‘failed_reg’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:277: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:277: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:278: error: unknown field ‘last_errno’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:278: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:278: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:279: error: unknown field ‘tcp_destip’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:279: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:279: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:280: error: unknown field ‘report_device’ specified in initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:280: warning: excess elements in struct initializer /tmp/tmp4Iv2Dt/vfdb_vfd.c:280: warning: (near initialization for ‘param’) /tmp/tmp4Iv2Dt/vfdb_vfd.c:288: error: array type has incomplete element type /tmp/tmp4Iv2Dt/vfdb_vfd.c:289: error: ‘no_argument’ undeclared here (not in a function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:293: error: ‘required_argument’ undeclared here (not in a function) /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘windup’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:302: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:302: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:303: error: implicit declaration of function ‘fprintf’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:303: error: ‘stderr’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:303: error: (Each undeclared identifier is reported only once /tmp/tmp4Iv2Dt/vfdb_vfd.c:303: error: for each function it appears in.) /tmp/tmp4Iv2Dt/vfdb_vfd.c:303: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:304: error: ‘struct params’ has no member named ‘failed_reg’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:305: error: implicit declaration of function ‘modbus_strerror’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:305: error: ‘struct params’ has no member named ‘last_errno’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:307: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:308: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:309: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:310: error: implicit declaration of function ‘modbus_close’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:310: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘toggle_modbus_debug’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:316: error: implicit declaration of function ‘modbus_set_debug’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:316: error: ‘params_type’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘quit’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:327: error: ‘stderr’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:335: error: implicit declaration of function ‘exit’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘findkwd’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:354: error: implicit declaration of function ‘iniFind’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:354: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:371: error: ‘stderr’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:372: error: ‘struct params’ has no member named ‘inifile’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘read_ini’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:386: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:386: error: implicit declaration of function ‘fopen’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:386: error: ‘struct params’ has no member named ‘inifile’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:388: error: implicit declaration of function ‘iniFindInt’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:388: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:390: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:391: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:392: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:393: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:394: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:395: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:396: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:397: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:397: error: ‘struct params’ has no member named ‘reconnect_delay’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:399: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:400: error: ‘struct params’ has no member named ‘tcp_destip’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:400: error: implicit declaration of function ‘strdup’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:402: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:403: warning: assignment makes pointer from integer without a cast /tmp/tmp4Iv2Dt/vfdb_vfd.c:405: error: implicit declaration of function ‘iniFindDouble’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:405: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:409: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:430: error: ‘struct params’ has no member named ‘fp’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:431: error: ‘stderr’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:434: error: ‘LIBMODBUS_VERSION_STRING’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:438: error: ‘MODBUS_RTU_RS232’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:439: error: ‘MODBUS_RTU_RS485’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:454: error: ‘struct params’ has no member named ‘inifile’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘usage’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:461: error: implicit declaration of function ‘printf’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: At top level: /tmp/tmp4Iv2Dt/vfdb_vfd.c:478: error: expected ‘)’ before ‘*’ token /tmp/tmp4Iv2Dt/vfdb_vfd.c:579: error: expected ‘)’ before ‘*’ token /tmp/tmp4Iv2Dt/vfdb_vfd.c:614: error: expected ‘)’ before ‘*’ token /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘set_defaults’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:740: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:776: error: ‘struct params’ has no member named ‘failed_reg’ /tmp/tmp4Iv2Dt/vfdb_vfd.c: In function ‘main’: /tmp/tmp4Iv2Dt/vfdb_vfd.c:789: error: ‘struct params’ has no member named ‘inifile’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:789: error: implicit declaration of function ‘getenv’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:791: error: implicit declaration of function ‘getopt_long’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:794: error: ‘optarg’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:806: error: ‘struct params’ has no member named ‘inifile’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:809: error: ‘struct params’ has no member named ‘report_device’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:818: error: ‘struct params’ has no member named ‘inifile’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:824: error: ‘stderr’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:828: error: implicit declaration of function ‘signal’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:834: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:835: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:837: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:838: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:843: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:844: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:849: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:849: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:853: error: ‘struct params’ has no member named ‘hal_comp_id’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:861: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:861: error: implicit declaration of function ‘modbus_new_rtu’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:863: error: ‘errno’ undeclared (first use in this function) /tmp/tmp4Iv2Dt/vfdb_vfd.c:867: error: implicit declaration of function ‘modbus_set_slave’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:867: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:871: error: implicit declaration of function ‘modbus_connect’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:871: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:884: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:885: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:894: error: implicit declaration of function ‘read_data’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:894: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:894: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:895: error: ‘struct params’ has no member named ‘modbus_ok’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:897: error: ‘struct params’ has no member named ‘modbus_ok’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:899: error: ‘struct params’ has no member named ‘modbus_ok’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:900: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:902: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:904: error: implicit declaration of function ‘write_data’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:904: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:904: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:905: error: ‘struct params’ has no member named ‘modbus_ok’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:910: error: ‘struct params’ has no member named ‘modbus_ok’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:912: error: ‘struct params’ has no member named ‘modbus_ok’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:913: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:915: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:918: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:918: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:919: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:919: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:920: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:921: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:922: error: ‘struct params’ has no member named ‘haldata’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:923: error: implicit declaration of function ‘nanosleep’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:929: error: implicit declaration of function ‘modbus_flush’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:929: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:931: error: implicit declaration of function ‘modbus_write_register’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:931: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:943: error: ‘struct params’ has no member named ‘read_initial_done’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:948: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:949: error: ‘struct params’ has no member named ‘ctx’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:952: error: implicit declaration of function ‘sleep’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:952: error: ‘struct params’ has no member named ‘reconnect_delay’ /tmp/tmp4Iv2Dt/vfdb_vfd.c:953: error: ‘struct params’ has no member named ‘ctx’ make[2]: *** [/tmp/tmp4Iv2Dt/vfdb_vfd.o] Error 1 make[1]: *** [_module_/tmp/tmp4Iv2Dt] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai' make: *** [modules] Error 2