lcec.so: undefined symbol: ecrt_slave_config_sdo [SOLVED]

More
03 Dec 2022 14:07 #258429 by petervg
I followed rod's guide Ethercat installation from repositories - how to step by step   and all seems to be working (with some things I don't yet understand). I can communicate with the drive and get the product and vendor ID (ethercat slaves -v), and the last test described in the tutorial to use halcmd show pin lcec also give exactly the same feedback as indicated (but no more other pins).

So I started linuxcnc to get the example config files in my home folder and copied axis_mm.ini to ethercat.ini.

In ethercat.ini I added the line "HALFILE = ethercat.hal"
below the other ones.

Next I created ethercat.hal and added this to the file:
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread

And after that a file ethercat-conf.xml with the most basic XML I could find:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
</master>
</masters>

But when I try to run linuxcnc (linuxcnc ethercat.ini) I get an error message I'm not able to figure out. The shared library can be found, but there is a symbol that is undefined. Not sure what this means:
lcec: dlopen: /usr/lib/linuxcnc/modules/lcec.so: undefined symbol: ecrt_slave_config_sdo
./ethercat.hal:15: waitpid failed /usr/bin/rtapi_app lcec
./ethercat.hal:15: /usr/bin/rtapi_app exited without becoming ready
./ethercat.hal:15: insmod for lcec failed, returned -1
Shutting down and cleaning up LinuxCNC...

Any thoughts as to where I can start looking? I did find some posts related to the shard library, but they are all about linuxcnc not being able to find the file. And since nobody else posted something similar, I must be doing something wrong. i just don't yet know what...

 

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

More
03 Dec 2022 14:10 #258430 by tommylight
Why so many topic with the same or very similar content???
You are making it really hard to follow what has been answered and what not.

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

More
03 Dec 2022 16:07 - 08 Dec 2022 22:11 #258434 by petervg
Tommy,

my sincere apologies -  I started reading all posts again to see what I've missed. And I now understand why I posted this while I shouldn't have. I had seen posts where lcec.so wasn't compiled due to errors and therefor never copied to /usr/lib/linuxcnc/modules. And you get a clear message when starting linuxcnc the library could not be found. I incorrectly assumed this was the only problem with the realtime.mk file.

The post also clearly states as of november '22 it's not needed to replace the content of realtime.mk anymore. So I don't (yet) understand why I still had to do this here.

I had succesfully compiled (no errors - I made a screenshot when I did it to make sure because I was aware this was a potential issue) and the file was copied to the correct location. So I did not think replacing the content of realtime.mk was the solution.

But mea culpa, I replaced the content of realtime.mk anyway, recompiled and linuxcnc now starts up with ethercat working

Related posts:
www.forum.linuxcnc.org/ethercat/47502-co...with-ethercat#257909
forum.linuxcnc.org/9-installing-linuxcnc...ve-config-sdo#203225

The problem is that this topic is evolving very rapidly and some information (like ec-debianize) seems to be obsolete. Rod pointed me in the correct direction and I'm really really really grateful for his support and awesome post to get ethercat working. I can confirm rod's post works as intended when installing linuxcnc 2.10.0 from source on a vanilla debian 11.5 (kernel 5.10.0-19-rt-amd64)

On a sidenote (and please don't take this wrong - I'm really happy with all the support I get on the forum), you are right to point out this topic has been answered before, but your answer would have been more useful if you linked to some relevant posts. It's not the idea to make people scared to ask questions as I too will for sure have tons of question now linuxcnc is working with ethercat support :-).

In the bugtracking systems we use here, we can also link topics together making it easier to explain which topics are related.



 
Last edit: 08 Dec 2022 22:11 by petervg. Reason: added "solved' tag
The following user(s) said Thank You: tommylight

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

Time to create page: 0.496 seconds
Powered by Kunena Forum