Error: undefined symbol: hm2_pktuart_setup_rx - while lading custom modbus.so

More
14 Feb 2025 20:45 #321586 by Corne
Sorry, apparently I didn't read your complete post. I'll try again

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

More
14 Feb 2025 20:50 #321587 by Corne
I get an access denied error if I modcompile without sudo. Can that be the issue?

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

More
14 Feb 2025 20:52 #321589 by Corne
sudo modcompile works, but again the same error.

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

More
14 Feb 2025 20:58 - 14 Feb 2025 21:00 #321590 by PCW
it should be:

modcompile xxxx.mod

not

sudo modcompile xxxx.mod

at least that's what I have always done

 
Last edit: 14 Feb 2025 21:00 by PCW.

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

More
14 Feb 2025 21:03 #321592 by Corne
With a fress install (from image) - without sudo i get this;

corne@linuxcnc:~/CNC/Mesa/mod$ modcompile mb25ioc32.mod
/tmp/tmpqf_2s56r/mesa_modbus.c
touch: cannot touch 'mesa_modbus.c': Permission denied
Compiling realtime mesa_modbus.c
Linking mb25ioc32.so
cp mb25ioc32.so /usr/lib/linuxcnc/modules/
cp: cannot create regular file '/usr/lib/linuxcnc/modules/mb25ioc32.so': Permission denied
make: *** [/usr/share/linuxcnc/Makefile.modinc:107: install] Error 1

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

More
14 Feb 2025 21:16 #321594 by Corne
I changed the permissions of the modules directory. Now only a 'touch' error. Doesn't say me something...

corne@linuxcnc:~/CNC/Mesa/mod$ modcompile mb25ioc32.mod
/tmp/tmp40_g_2ol/mesa_modbus.c
touch: cannot touch 'mesa_modbus.c': Permission denied
Compiling realtime mesa_modbus.c
Linking mb25ioc32.so
cp mb25ioc32.so /usr/lib/linuxcnc/modules/

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

More
14 Feb 2025 21:17 - 14 Feb 2025 21:22 #321595 by PCW
OK  thinking about this, it's probably just a difference between a RIP installation and
a binary installation, where the normal user does not have write access to LinuxCNC's
system files.

Still does not explain the issue, and why it works as expected using  2.9.4 built from source.
Maybe a problem with the binary image.

 
Attachments:
Last edit: 14 Feb 2025 21:22 by PCW.

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

More
14 Feb 2025 22:31 - 14 Feb 2025 23:49 #321602 by PCW
Here are the pktuart.0 and mb25ioc32.so files that work on my system:

 

File Attachment:

File Name: debug.zip
File Size:51 KB


Replacing your files (one at a time) may help debug this issue.
Attachments:
Last edit: 14 Feb 2025 23:49 by PCW. Reason: sp

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

More
15 Feb 2025 07:04 #321617 by Corne
Copied the mb25ioc32.so to the modules directory > same result as mentioned in my initial post.
A search to *pktuart* doesn't give any hit. So I don't know where to place these.

A compile of mb25ioc32.so delivers a mesa_modbus.o (and .c) in a tmp directory. I can find the source of this file at /usr/share/linuxcnc/ as mesa_modbus.o.tmpl.

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

More
15 Feb 2025 15:06 #321643 by PCW
locate pktuart
 
should find it but if you have re installed recently the
locate database has probably not been updated
(its done periodically, usually scheduled late at night)

You can manually update the locate database with:

sudo updatedb

(this will take a while since is has to search the entire directory system)

 

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

Moderators: PCWjmelson
Time to create page: 0.090 seconds
Powered by Kunena Forum