Halcompile Setup
22 Feb 2020 13:23 - 22 Feb 2020 13:25 #158205
by Aciera
Halcompile Setup was created by Aciera
I am trying to modify genserkins.c and then use halcompile to try it with my LinuxCNC configuration.
I'm on Debian 9 and have linuxcnc-uspace and linuxcnc-uspace-dev 2.9.0 pre0.1048 installed. To try out dgarret switchkins I have a RIP install in my home directory that is linked to his git repository.
So I tried this in the Run in Place Installation (in my home directory ~/linuxcnc-dev/src/emc/kinematics):
1. Copied genser-switchkin and renamed it genser-switchkin-theta
2. halcompile --install genser-switchkins-theta.c (no changes have been made to the code)
So I get this warning but it seems to create the .so file
3. Change the kinematics in the .hal file
4. run the LinuxCNC configuration: ~/linuxcnc-dev/configs/sim/axis/vismach/melfa$ linuxcnc melfa-switchkins.ini
/home/user/linuxcnc_print.txt:
/home/user/linuxcnc_debug.txt:
I get this error about an undefined symbol: go_matrix_vector_mult in genser-switchkins-theta.so
Can anybody give me a hint how to get this to work, please?
I'm on Debian 9 and have linuxcnc-uspace and linuxcnc-uspace-dev 2.9.0 pre0.1048 installed. To try out dgarret switchkins I have a RIP install in my home directory that is linked to his git repository.
So I tried this in the Run in Place Installation (in my home directory ~/linuxcnc-dev/src/emc/kinematics):
1. Copied genser-switchkin and renamed it genser-switchkin-theta
2. halcompile --install genser-switchkins-theta.c (no changes have been made to the code)
Warning: Spoiler!
user@LinuxCNC:~/linuxcnc-dev/src/emc/kinematics$ halcompile --install genser-switchkins-theta.c
Compiling realtime genser-switchkins-theta.c
genser-switchkins-theta.c: In function ‘genserKinematicsInverse.isra.5’:
genser-switchkins-theta.c:631:1: warning: the frame size of 4704 bytes is larger than 2560 bytes [-Wframe-larger-than=]
} // genserKinematicsInverse()
^
Linking genser-switchkins-theta.so
cp genser-switchkins-theta.so /home/user/linuxcnc-dev/rtlib/
Compiling realtime genser-switchkins-theta.c
genser-switchkins-theta.c: In function ‘genserKinematicsInverse.isra.5’:
genser-switchkins-theta.c:631:1: warning: the frame size of 4704 bytes is larger than 2560 bytes [-Wframe-larger-than=]
} // genserKinematicsInverse()
^
Linking genser-switchkins-theta.so
cp genser-switchkins-theta.so /home/user/linuxcnc-dev/rtlib/
So I get this warning but it seems to create the .so file
3. Change the kinematics in the .hal file
Warning: Spoiler!
[KINS]
JOINTS= 6
KINEMATICS= genser-switchkins-theta
JOINTS= 6
KINEMATICS= genser-switchkins-theta
4. run the LinuxCNC configuration: ~/linuxcnc-dev/configs/sim/axis/vismach/melfa$ linuxcnc melfa-switchkins.ini
Warning: Spoiler!
user@LinuxCNC:~/linuxcnc-dev/configs/sim/axis/vismach/melfa$ linuxcnc melfa-switchkins.ini
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/user/linuxcnc-dev/configs/sim/axis/vismach/melfa'
Machine configuration file is 'melfa-switchkins.ini'
check_config: Unchecked: [KINS]KINEMATICS=genser-switchkins-theta
Starting LinuxCNC...
Found file(REL): ./melfa_switchkins.hal
Note: Using POSIX realtime
genser-switchkins-theta: dlopen: /home/user/linuxcnc-dev/rtlib/genser-switchkins-theta.so: undefined symbol: go_matrix_vector_mult
./melfa_switchkins.hal:4: waitpid failed /home/user/linuxcnc-dev/bin/rtapi_app genser-switchkins-theta
./melfa_switchkins.hal:4: /home/user/linuxcnc-dev/bin/rtapi_app exited without becoming ready
./melfa_switchkins.hal:4: insmod for genser-switchkins-theta failed, returned -1
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/user/linuxcnc_debug.txt
and
/home/user/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/user/linuxcnc-dev/configs/sim/axis/vismach/melfa'
Machine configuration file is 'melfa-switchkins.ini'
check_config: Unchecked: [KINS]KINEMATICS=genser-switchkins-theta
Starting LinuxCNC...
Found file(REL): ./melfa_switchkins.hal
Note: Using POSIX realtime
genser-switchkins-theta: dlopen: /home/user/linuxcnc-dev/rtlib/genser-switchkins-theta.so: undefined symbol: go_matrix_vector_mult
./melfa_switchkins.hal:4: waitpid failed /home/user/linuxcnc-dev/bin/rtapi_app genser-switchkins-theta
./melfa_switchkins.hal:4: /home/user/linuxcnc-dev/bin/rtapi_app exited without becoming ready
./melfa_switchkins.hal:4: insmod for genser-switchkins-theta failed, returned -1
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/user/linuxcnc_debug.txt
and
/home/user/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
/home/user/linuxcnc_print.txt:
Warning: Spoiler!
RUN_IN_PLACE=yes
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/home/user/linuxcnc-dev/bin
LINUXCNC_TCL_DIR=/home/user/linuxcnc-dev/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/home/user/linuxcnc-dev/rtlib
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/home/user/linuxcnc-dev/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
INIFILE=/home/user/linuxcnc-dev/configs/sim/axis/vismach/melfa/melfa-switchkins.ini
VERSION=1.1
PARAMETER_FILE=try.var
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z A B C
KINEMATICS=genser-switchkins-theta
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/home/user/linuxcnc-dev/bin
LINUXCNC_TCL_DIR=/home/user/linuxcnc-dev/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/home/user/linuxcnc-dev/rtlib
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/home/user/linuxcnc-dev/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
INIFILE=/home/user/linuxcnc-dev/configs/sim/axis/vismach/melfa/melfa-switchkins.ini
VERSION=1.1
PARAMETER_FILE=try.var
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z A B C
KINEMATICS=genser-switchkins-theta
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
/home/user/linuxcnc_debug.txt:
Warning: Spoiler!
30154
Stopping realtime threads
Unloading hal components
Stopping realtime threads
Unloading hal components
I get this error about an undefined symbol: go_matrix_vector_mult in genser-switchkins-theta.so
Can anybody give me a hint how to get this to work, please?
Last edit: 22 Feb 2020 13:25 by Aciera. Reason: wording
Please Log in or Create an account to join the conversation.
22 Feb 2020 14:25 #158208
by dgarrett
Above is a *warning* and can (probably) be ignored.
See old (2010) discussion:
www.mail-archive.com/emc-developers@list...ge.net/msg03790.html
Above is a linker error. Halcompile is not designed for kins
modules that require additional libraries like the ones
specified in src/Makefile for genser-switchkins. Makefile
excerpts:
You could use the clever method suggested here:
www.mail-archive.com/emc-developers@list...ge.net/msg17951.html
But it may be simpler to modify src/Makefile to add special
kinematics (as in the excerpts above) and build
(run-in-place) as usual.
Replied by dgarrett on topic Halcompile Setup
genser-switchkins-theta.c:631:1: warning: the frame size of 4704 bytes is larger than 2560 bytes [-Wframe-larger-than=]
} // genserKinematicsInverse()
Above is a *warning* and can (probably) be ignored.
See old (2010) discussion:
www.mail-archive.com/emc-developers@list...ge.net/msg03790.html
genser-switchkins-theta: dlopen /home/user/linuxcnc-dev/rtlib/genser-switchkins-theta.so: undefined symbol: go_matrix_vector_mult
Above is a linker error. Halcompile is not designed for kins
modules that require additional libraries like the ones
specified in src/Makefile for genser-switchkins. Makefile
excerpts:
obj-m += genser-switchkins.o
genser-switchkins-objs := emc/kinematics/genser-switchkins.o
genser-switchkins-objs += libnml/posemath/gomath.o
genser-switchkins-objs += libnml/posemath/sincos.o $(MATHSTUB)
genser-switchkins-objs += emc/kinematics/kins_util.o
...
../rtlib/genser-switchkins$(MODULE_EXT): $(addprefix objects/rt,$(genser-switchkins-objs))
You could use the clever method suggested here:
www.mail-archive.com/emc-developers@list...ge.net/msg17951.html
But it may be simpler to modify src/Makefile to add special
kinematics (as in the excerpts above) and build
(run-in-place) as usual.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds