lpons wrote: Hi Everybody,
I have some problem getting LinuxCNC + EtherCAT HAL driver properly compiled. I want also add that I'm almost new to the Linux world so the reason it won't compile is probably caused by a my mistake or something I'm not really into. So be prepared for the tons of silly questions I'll post here.
Back to my error. First of all the EtherCAT master is working: I can load the kernel module, unload it and also use the ethercat utility attached to the device file. But when I try to compile LinuxCNC I get an error such as:
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "New version of jemalloc required"
make[2]: ***[adlist.o] Error 1
make[2]: Leaving directory `/home/jkirkley/gitlocal/ncs/linuxcnc/ethercatBranch/src/redis/redis/src`
I think the problem is or in the makefile the path of jemalloc is not properly set or the version is out of date. But honestly I don't know how to fix it. I try to recompile the jemalloc library but there's no a makefile which works.
If you need more information I'll happy to give what you need.
Thank you so much
LP
I solved the above problem. I was missing some REDIS file (I don't really know why since I'm working on a previous working LinuxCNC machine, but still...). Now I can compile all the LinuxCNC package and finish the install process running also the "sudo make setuid" command after the "make".
But I have another problem. I want to load the EtherCAT HAL driver module but I get the following error:
jkirkley@linuxCNC:~/gitlocal/ncs/linuxCNC/ethercatBranch$ sudo ./scripts/halrun -I -f ../demo/ledDemo.hal
insmod: error inserting '/home/jkirkley/gitlocal/ncs/linuxCNC/ethercatBranch/rtlib/lcec.ko': -1 Unknown symbol in module
../demo/ledDemo.hal:5: exit value: 1
../demo/ledDemo.hal:5: insmod failed, returned -1
See the output of 'dmesg' for more information.
and when I go to see the dmesg buffer I get:
[84661.062574] I-pipe: Domain RTAI registered.
[84661.062580] RTAI[hal]:

.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[84661.062583] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[84661.062615] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[84661.062617] PIPELINE layers:
[84661.062620] fd098e20 9ac15d93 RTAI 200
[84661.062623] c085cb20 0 Linux 100
[84661.082274] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[84661.082489] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[84661.082495] RTAI[sched]: hard timer type/freq = APIC/12468620(Hz); default timing: periodic; linear timed lists.
[84661.082499] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1994960000 hz.
[84661.082501] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[84661.082570] RTAI[usi]: enabled.
[84661.120848] RTAI[math]: loaded.
[84661.162673] lcec: Unknown symbol ecrt_sdo_request_timeout
[84661.162769] lcec: Unknown symbol ecrt_request_master
[84661.162935] lcec: Unknown symbol ecrt_release_master
[84661.163029] lcec: Unknown symbol ecrt_master_activate
[84661.163203] lcec: Unknown symbol ecrt_sdo_request_read
[84661.163513] lcec: Unknown symbol ecrt_domain_size
[84661.163607] lcec: Unknown symbol ecrt_master_deactivate
[84661.163705] lcec: Unknown symbol ecrt_slave_config_create_sdo_request
[84661.164017] lcec: Unknown symbol ecrt_master_sync_reference_clock
[84661.164111] lcec: Unknown symbol ecrt_slave_config_pdos
[84661.164206] lcec: Unknown symbol ecrt_domain_data
[84661.164300] lcec: Unknown symbol ecrt_sdo_request_data
[84661.164394] lcec: Unknown symbol ecrt_slave_config_dc
[84661.164488] lcec: Unknown symbol ecrt_master_slave_config
[84661.164685] lcec: Unknown symbol ecrt_slave_config_state
[84661.164779] lcec: Unknown symbol ecrt_master_state
[84661.164950] lcec: Unknown symbol ecrt_master_callbacks
[84661.165044] lcec: Unknown symbol ecrt_domain_process
[84661.165211] lcec: Unknown symbol ecrt_master_application_time
[84661.165304] lcec: Unknown symbol ecrt_domain_reg_pdo_entry_list
[84661.165399] lcec: Unknown symbol ecrt_slave_config_watchdog
[84661.165638] lcec: Unknown symbol ecrt_slave_config_complete_sdo
[84661.165732] lcec: Unknown symbol ecrt_master_sync_slave_clocks
[84661.166015] lcec: Unknown symbol ecrt_domain_queue
[84661.166111] lcec: Unknown symbol ecrt_sdo_request_state
[84661.166205] lcec: Unknown symbol ecrt_master_send
[84661.166375] lcec: Unknown symbol ecrt_slave_config_sdo
[84661.166473] lcec: Unknown symbol ecrt_master_create_domain
[84661.166724] lcec: Unknown symbol ecrt_master_receive
[84725.526583] RTAI[math]: unloaded.
[84725.555601] SCHED releases registered named ALIEN RTGLBH
[84725.584293] RTAI[malloc]: unloaded.
[84725.684062] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[84725.686567] I-pipe: Domain RTAI unregistered.
[84725.686603] RTAI[hal]: unmounted.
It looks like some header file is missing or something similar. Again I'm not an expert so I can't say exactly. Some has an idea of the origin of the problem?
Thank you so much
LP