[SOLVED] sendkeys help {manual error, corrrected}
- robertspark
- Offline
- Platinum Member
- Posts: 915
- Thank you received: 216
Attachments:
Please Log in or Create an account to join the conversation.
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
And it seems to appear in the .deb files that I have built (so I would expect it to be in the buildbot ones)
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 or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
- Posts: 915
- Thank you received: 216
Please Log in or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
- Posts: 915
- Thank you received: 216
:/
I ended up with this...
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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
It compiles OK as part of a full LinuxCNC install.
Please Log in or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
- Posts: 915
- Thank you received: 216
I've given it the paths to all of the includes:
#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.
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/
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 or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
- Posts: 915
- Thank you received: 216
I did a complete removal of linuxcnc again using synaptic and reinstalled 2.8.1 from buildbot.....
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 or Create an account to join the conversation.
If you grab the deb directly from the buildbot, can you see the file in it with dpkg -c ?
dpkg -c //name//of//deb//file// | grep sendkeys
buildbot.linuxcnc.org/dists/
Please Log in or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
- Posts: 915
- Thank you received: 216
Is "thermistor" there?
no {not in 2.8.1 & master }
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?
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!
rob@RobsCNC:/$ sudo find -name 'sendkey*.**'
./home/rob/Downloads/sendkeys.c
./usr/share/man/man1/sendkeys.1.gz
rob@RobsCNC:/$
Please Log in or Create an account to join the conversation.