[SOLVED] sendkeys help {manual error, corrrected}

More
5 years 7 months ago #202765 by robertspark
all down to a manual error...... thanks for your help, I would have NEVER got that one!

Please Log in to join the conversation.

More
5 years 7 months ago #202799 by andypugh
Replied by andypugh on topic sendkeys help
Odd, it seems to be being compiled (this is an extract from the buildbot log)
Code:
Compiling hal/user_comps/sendkeys.c gcc -c -I. -Ilibnml/linklist -Ilibnml/cms -Ilibnml/rcs -Ilibnml/inifile -Ilibnml/os_intf -Ilibnml/nml -Ilibnml/buffer -Ilibnml/posemath -Irtapi -Ihal -Iemc/nml_intf -Iemc/kinematics -Iemc/tp -Iemc/motion -Iemc/ini -Iemc/rs274ngc -Iemc/sai -Iemc/pythonplugin -Iemc/tooldata -I/home/buildslave/emc2-buildbot/buster-rtpreempt-amd64/rip-buster-rtpreempt-amd64/build/src/include -I/usr/include/python2.7 -Os -fwrapv -g -Wall -DULAPI -std=gnu99 -fgnu89-inline -Werror=implicit-function-declaration -g -O2 \ -MP -MD -MF "objects/hal/user_comps/sendkeys.d" -MT "objects/hal/user_comps/sendkeys.o" \ hal/user_comps/sendkeys.c -o objects/hal/user_comps/sendkeys.o Preprocessing thermistor.comp
buildbot.linuxcnc.org/buildbot/builders/...s/compile/logs/stdio

And it seems to appear in the .deb files that I have built (so I would expect it to be in the buildbot ones)
Code:
andypugh@rm-one:~$ dpkg -c linuxcnc_2.9.0~pre0_amd64.deb | grep sendkeys -rwxr-xr-x root/root 14608 2019-06-02 23:52 ./usr/bin/sendkeys -rw-r--r-- root/root 2316 2019-06-02 23:52 ./usr/share/man/man1/sendkeys.1.gz

Please Log in to join the conversation.

More
5 years 7 months ago #202878 by robertspark
Replied by robertspark on topic sendkeys help
back to the drawing board tonight..... determined to figure this out and get it working...

Please Log in to join the conversation.

More
5 years 7 months ago #202889 by robertspark
Replied by robertspark on topic sendkeys help
being a smart A£$£, I thought I'd just download sendkeys.c from linuxcnc git and run halcompile....

:/

I ended up with this...
Code:
rob@RobsCNC:~/Downloads$ sudo halcompile --install sendkeys.c [sudo] password for rob: Compiling realtime sendkeys.c sendkeys.c: In function ‘main’: sendkeys.c:202:5: warning: implicit declaration of function ‘signal’; did you mean ‘strsignal’? [-Wimplicit-function-declaration] signal(SIGINT, exit_handler); ^~~~~~ strsignal sendkeys.c:202:12: error: ‘SIGINT’ undeclared (first use in this function); did you mean ‘SW_CNT’? signal(SIGINT, exit_handler); ^~~~~~ SW_CNT sendkeys.c:202:12: note: each undeclared identifier is reported only once for each function it appears in sendkeys.c:203:12: error: ‘SIGTERM’ undeclared (first use in this function) signal(SIGTERM, exit_handler); ^~~~~~~ make: *** [/usr/share/linuxcnc/Makefile.modinc:116: sendkeys.o] Error 1 rob@RobsCNC:~/Downloads$

am I doing something wrong?

where should I look for sendkeys.c on an linuxcnc.iso && upgrade to master via buildbot? {I check for updates daily, so its always on the latest master}

Please Log in to join the conversation.

More
5 years 7 months ago #202900 by andypugh
Replied by andypugh on topic sendkeys help

robertspark wrote: being a smart A£$£, I thought I'd just download sendkeys.c from linuxcnc git and run halcompile....


That really shouldn't be necessary. But also should work.

sendkeys.c:202:5: warning: implicit declaration of function ‘signal’; did you mean ‘strsignal’? [-Wimplicit-function-declaration]
signal(SIGINT, exit_handler);


I think that you might need the kernel headers to compile it.

To be honest I think that the best fix it so figure out why you are not getting the compiled module automatically with LinuxCNC.

Please Log in to join the conversation.

More
5 years 7 months ago #202901 by andypugh
Replied by andypugh on topic sendkeys help
I can't compile it with halcompile either, by the way. I think that it needs to be given the paths to various includes that halcompile doesn't do.

It compiles OK as part of a full LinuxCNC install.

Please Log in to join the conversation.

More
5 years 7 months ago #202908 by robertspark
Replied by robertspark on topic sendkeys help
nope,

I've given it the paths to all of the includes:
Code:
#include </usr/include/linuxcnc/rtapi.h> #include </usr/include/linuxcnc/hal.h> #include <linux/uinput.h> #include </usr/include/linux/unistd.h> #include </usr/include/linux/fcntl.h> #include </usr/include/stdio.h> #include </usr/include/c++/8/stdlib.h> #include </usr/include/linux/string.h>

No dice.
Code:
rob@RobsCNC:~/Downloads$ sudo halcompile --install sendkeys.c Compiling realtime sendkeys.c sendkeys.c: In function ‘emit’: sendkeys.c:65:4: warning: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Wimplicit-function-declaration] write(fd, &ie, sizeof(ie)); ^~~~~ fwrite sendkeys.c: In function ‘main’: sendkeys.c:202:5: warning: implicit declaration of function ‘signal’; did you mean ‘strsignal’? [-Wimplicit-function-declaration] signal(SIGINT, exit_handler); ^~~~~~ strsignal sendkeys.c:202:12: error: ‘SIGINT’ undeclared (first use in this function); did you mean ‘SW_CNT’? signal(SIGINT, exit_handler); ^~~~~~ SW_CNT sendkeys.c:202:12: note: each undeclared identifier is reported only once for each function it appears in sendkeys.c:203:12: error: ‘SIGTERM’ undeclared (first use in this function) signal(SIGTERM, exit_handler); ^~~~~~~ sendkeys.c:225:29: warning: implicit declaration of function ‘open’; did you mean ‘popen’? [-Wimplicit-function-declaration] param->fd = open("/dev/uinput", O_WRONLY | O_NONBLOCK); ^~~~ popen make: *** [/usr/share/linuxcnc/Makefile.modinc:116: sendkeys.o] Error 1 rob@RobsCNC:~/Downloads$

No sendkeys.o within /usr/lib/linuxcnc/modules/
Code:
rob@RobsCNC:/usr/lib/linuxcnc/modules$ ls s* sample_hold.so serport.so sim_parport.so steptest.so sampler.so setsserial.so simple_tp.so streamer.so scale.so siggen.so sim_spindle.so sum2.so scarakins.so sim_axis_hardware.so sphereprobe.so supply.so scope_rt.so sim_encoder.so spindle_monitor.so scorbot-kins.so sim_home_switch.so spindle.so select8.so sim_matrix_kb.so stepgen.so rob@RobsCNC:/usr/lib/linuxcnc/modules$

this was after removing (completly) linuxcnc using synaptic and reinstalling from buildbot master moments ago.

baffled!

{thanks for your help / taking the time to check this thread out it is much appreciated}

Please Log in to join the conversation.

More
5 years 7 months ago #202909 by robertspark
Replied by robertspark on topic sendkeys help
just for fun.....

I did a complete removal of linuxcnc again using synaptic and reinstalled 2.8.1 from buildbot.....
Code:
rob@RobsCNC:/usr/lib/linuxcnc/modules$ ls s* sample_hold.so serport.so sim_parport.so steptest.so sampler.so setsserial.so simple_tp.so streamer.so scale.so siggen.so sim_spindle.so sum2.so scarakins.so sim_axis_hardware.so sphereprobe.so supply.so scope_rt.so sim_encoder.so spindle_monitor.so scorbot-kins.so sim_home_switch.so spindle.so select8.so sim_matrix_kb.so stepgen.so rob@RobsCNC:/usr/lib/linuxcnc/modules$

am I missing something as a noob?

Please Log in to join the conversation.

More
5 years 7 months ago #202919 by andypugh
Replied by andypugh on topic sendkeys help
Is "thermistor" there?

If you grab the deb directly from the buildbot, can you see the file in it with dpkg -c ?
Code:
dpkg -c //name//of//deb//file// | grep sendkeys

buildbot.linuxcnc.org/dists/

Please Log in to join the conversation.

More
5 years 7 months ago #202969 by robertspark
Replied by robertspark on topic sendkeys help

andypugh wrote: Is "thermistor" there?


no {not in 2.8.1 & master [I just updated to master]}
Code:
rob@RobsCNC:/usr/lib/linuxcnc/modules$ ls t*.* thc.so threadtest.so time.so tripodkins.so trivkins.so thcud.so timedelay.so toggle2nist.so tristate_bit.so threads.so timedelta.so toggle.so tristate_float.so rob@RobsCNC:/usr/lib/linuxcnc/modules$

Could I be missing a dependency? [I would have thought that any dependencies for linuxcnc would be installed by default as part of the linuxcnc.iso install from bootable usb?

I have the following installed:
linuxcnc-doc-en
linuxcnc-uspace
linuxcnc-uspace-dev

do I need to install linuxcnc-uspace-dbsym??? (what are the debug symbols for?)


well sendkeys is within the *.deb..... but at what point is it compiled to a sendkeys.so module?
Code:
rob@RobsCNC:~/Downloads$ dpkg -c linuxcnc-uspace_2.9.0~pre0.3688.ge6aec2fd2_amd64.deb | grep sendkeys -rwxr-xr-x root/root 14592 2021-03-20 07:44 ./usr/bin/sendkeys -rw-r--r-- root/root 2313 2021-03-20 07:44 ./usr/share/man/man1/sendkeys.1.gz

anyway to run an install giving a complete output of what was installed


One hell of a mystery!
Code:
rob@RobsCNC:/$ sudo find -name 'sendkey*.**' ./home/rob/Downloads/sendkeys.c ./usr/share/man/man1/sendkeys.1.gz rob@RobsCNC:/$

Please Log in to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum