- Configuring LinuxCNC
- Advanced Configuration
- [Solved] Compile Error when using regular math functions in kinematics file
[Solved] Compile Error when using regular math functions in kinematics file
27 Feb 2020 16:53 - 27 Feb 2020 17:06 #158652
by dgarrett
Replied by dgarrett on topic Compile Error when using regular math functions in kinematics file
thanks for posting your source files with these i could
reproduce the DSO error, the problem is in the make for
the *userspace* bin/genserkins when using math functions not
provided by gomath,posemath etc.
Note: the bin/genserkins utility is undocumented and is likely seldom
used. it is buggy in all branches -- this doesn't effect realtime
modules using genser*.c files
force pushed dgarr/s_kins commit: 9af319596
(adds -lm in src/emc/Submakefile)
Note: the master branch is currently broken but
dgarr/s_kins is rebased to an older (working)
master branch
reproduce the DSO error, the problem is in the make for
the *userspace* bin/genserkins when using math functions not
provided by gomath,posemath etc.
Note: the bin/genserkins utility is undocumented and is likely seldom
used. it is buggy in all branches -- this doesn't effect realtime
modules using genser*.c files
force pushed dgarr/s_kins commit: 9af319596
(adds -lm in src/emc/Submakefile)
Note: the master branch is currently broken but
dgarr/s_kins is rebased to an older (working)
master branch
Last edit: 27 Feb 2020 17:06 by dgarrett. Reason: clarify note on bin/genserkins
Please Log in or Create an account to join the conversation.
28 Feb 2020 08:52 - 28 Feb 2020 08:52 #158735
by Aciera
Replied by Aciera on topic Compile Error when using regular math functions in kinematics file
Thanks again for the prompt reply!
I build the newest commit but I'm still having the same issue after copying my config to the configs folder and the .c files to src/emc/kinematics:
I'm sorry to keep bothering you.
I build the newest commit but I'm still having the same issue after copying my config to the configs folder and the .c files to src/emc/kinematics:
Warning: Spoiler!
user@user-iMac:~/linuxcnc-dev/src$ git branch | grep \*
* dgarr/s_kins
user@user-iMac:~/linuxcnc-dev/src$ git log --oneline -1
9af319596 (HEAD -> dgarr/s_kins, origin/dgarr/s_kins) switchkins: xyz[ab]c-trt,genser
user@user-iMac:~/linuxcnc-dev/src$ make && sudo make setuid
Reading 194/194 dependency files
Done reading dependencies
Reading 215/215 realtime dependency files
Done reading realtime dependencies
emc/Submakefile:Linking genserkins
/usr/bin/ld: objects/emc/kinematics/genserfuncs.o: undefined reference to symbol 'acos@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
emc/kinematics/Submakefile:18: recipe for target '../bin/genserkins' failed
make: *** [../bin/genserkins] Error 1
* dgarr/s_kins
user@user-iMac:~/linuxcnc-dev/src$ git log --oneline -1
9af319596 (HEAD -> dgarr/s_kins, origin/dgarr/s_kins) switchkins: xyz[ab]c-trt,genser
user@user-iMac:~/linuxcnc-dev/src$ make && sudo make setuid
Reading 194/194 dependency files
Done reading dependencies
Reading 215/215 realtime dependency files
Done reading realtime dependencies
emc/Submakefile:Linking genserkins
/usr/bin/ld: objects/emc/kinematics/genserfuncs.o: undefined reference to symbol 'acos@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
emc/kinematics/Submakefile:18: recipe for target '../bin/genserkins' failed
make: *** [../bin/genserkins] Error 1
I'm sorry to keep bothering you.
Attachments:
Last edit: 28 Feb 2020 08:52 by Aciera. Reason: typo
Please Log in or Create an account to join the conversation.
28 Feb 2020 13:18 #158750
by dgarrett
and they work for me so i have pushed a
'scratch' branch that you can try:
dgarr/aciera.0
github.com/LinuxCNC/linuxcnc/commits/dgarr/aciera.0
Please test.
If this works for you, i will modify dgarr/s_kins
to make it simpler for you to add an additional
kinematics method within dgarr/s_kins.
Replied by dgarrett on topic Compile Error when using regular math functions in kinematics file
I tested with your files on buster and stretchstill having the same issue after copying
and they work for me so i have pushed a
'scratch' branch that you can try:
dgarr/aciera.0
github.com/LinuxCNC/linuxcnc/commits/dgarr/aciera.0
Please test.
If this works for you, i will modify dgarr/s_kins
to make it simpler for you to add an additional
kinematics method within dgarr/s_kins.
Please Log in or Create an account to join the conversation.
28 Feb 2020 15:55 - 29 Feb 2020 04:05 #158757
by dgarrett
Replied by dgarrett on topic Compile Error when using regular math functions in kinematics file
28feb20 dgarr/s_kins branch update (e10cc60d371):
28feb20 later: (eed4edd7e)
1) In genser-switchkins.c, support:
motion.switchkins-type == 2
2) provide template file named switchtype2funcs.c
demonstrating functions:
switchtype2KinematicsForward()
switchtype2KinematicsInverse()
3) demonstate usage in puma560-switchkins.ini
A user can now modify just one file (switchtype2funcs.c)
to add any code necessary to provide kinematics for
motion.switchkins-type==2
It is intended that user should not need to modify any
other files in order to maintain a common and stable
genserkins base. Bug fixes for genserkins should be
implemented in appropriate in-tree files.
Notes:
In the future, the switchtype2funcs.c template may be
used with other switchable kinematics modules (e.g.,
not limited to genser-switchkins).
Template Ref: github.com/LinuxCNC/linuxcnc/blob/dgarr/...s/switchtype2funcs.c
28feb20 later: (eed4edd7e)
1) In genser-switchkins.c, support:
motion.switchkins-type == 2
2) provide template file named switchtype2funcs.c
demonstrating functions:
switchtype2KinematicsForward()
switchtype2KinematicsInverse()
3) demonstate usage in puma560-switchkins.ini
A user can now modify just one file (switchtype2funcs.c)
to add any code necessary to provide kinematics for
motion.switchkins-type==2
It is intended that user should not need to modify any
other files in order to maintain a common and stable
genserkins base. Bug fixes for genserkins should be
implemented in appropriate in-tree files.
Notes:
switchkins-type==0 is default at startup
switchkins-type==1 is reserved (and used by existing
switchable kinematics modules)
switchkins-type==2 is supported but implemented only
by a template that user can modify
as required
In the future, the switchtype2funcs.c template may be
used with other switchable kinematics modules (e.g.,
not limited to genser-switchkins).
Template Ref: github.com/LinuxCNC/linuxcnc/blob/dgarr/...s/switchtype2funcs.c
Last edit: 29 Feb 2020 04:05 by dgarrett. Reason: subsequent commit noted
The following user(s) said Thank You: tommylight, Aciera
Please Log in or Create an account to join the conversation.
28 Feb 2020 17:03 - 28 Feb 2020 17:04 #158766
by Aciera
Replied by Aciera on topic Compile Error when using regular math functions in kinematics file
Thank you for your ongoing support!
Sadly it's not working for me on my linux mint machine:
I will setup a new machine tomorrow using debian buster and try again.
Sadly it's not working for me on my linux mint machine:
Warning: Spoiler!
user@user-iMac:~/linuxcnc-dev-aciera/src$ git branch | grep \*
* dgarr/aciera.0
user@user-iMac:~/linuxcnc-dev-aciera/src$ git log --oneline -1
6535887ec (HEAD -> dgarr/aciera.0, origin/dgarr/aciera.0) aciera.0 test 28feb20
user@user-iMac:~/linuxcnc-dev-aciera/src$ make && sudo make setuid
Reading 194/194 dependency files
Done reading dependencies
Reading 215/215 realtime dependency files
Done reading realtime dependencies
Compiling emc/kinematics/genserfuncs.c
emc/kinematics/genserfuncs.c: In function ‘gensertoolKinematicsInverse’:
emc/kinematics/genserfuncs.c:649:32: warning: variable ‘s3’ set but not used [-Wunused-but-set-variable]
double c1, s1, c2, s2, c3, s3, c4, s4, c5, s5, c23, s23;
^~
emc/kinematics/genserfuncs.c:649:28: warning: variable ‘c3’ set but not used [-Wunused-but-set-variable]
double c1, s1, c2, s2, c3, s3, c4, s4, c5, s5, c23, s23;
^~
emc/kinematics/genserfuncs.c:647:32: warning: variable ‘vz’ set but not used [-Wunused-but-set-variable]
double ux, uy, uz, vx, vy, vz, wx, wy, wz, px, py, pz;
^~
emc/kinematics/genserfuncs.c:647:28: warning: variable ‘vy’ set but not used [-Wunused-but-set-variable]
double ux, uy, uz, vx, vy, vz, wx, wy, wz, px, py, pz;
^~
emc/kinematics/genserfuncs.c:647:24: warning: variable ‘vx’ set but not used [-Wunused-but-set-variable]
double ux, uy, uz, vx, vy, vz, wx, wy, wz, px, py, pz;
^~
emc/Submakefile:Linking genserkins
/usr/bin/ld: objects/emc/kinematics/genserfuncs.o: undefined reference to symbol 'acos@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
emc/kinematics/Submakefile:18: recipe for target '../bin/genserkins' failed
make: *** [../bin/genserkins] Error 1
* dgarr/aciera.0
user@user-iMac:~/linuxcnc-dev-aciera/src$ git log --oneline -1
6535887ec (HEAD -> dgarr/aciera.0, origin/dgarr/aciera.0) aciera.0 test 28feb20
user@user-iMac:~/linuxcnc-dev-aciera/src$ make && sudo make setuid
Reading 194/194 dependency files
Done reading dependencies
Reading 215/215 realtime dependency files
Done reading realtime dependencies
Compiling emc/kinematics/genserfuncs.c
emc/kinematics/genserfuncs.c: In function ‘gensertoolKinematicsInverse’:
emc/kinematics/genserfuncs.c:649:32: warning: variable ‘s3’ set but not used [-Wunused-but-set-variable]
double c1, s1, c2, s2, c3, s3, c4, s4, c5, s5, c23, s23;
^~
emc/kinematics/genserfuncs.c:649:28: warning: variable ‘c3’ set but not used [-Wunused-but-set-variable]
double c1, s1, c2, s2, c3, s3, c4, s4, c5, s5, c23, s23;
^~
emc/kinematics/genserfuncs.c:647:32: warning: variable ‘vz’ set but not used [-Wunused-but-set-variable]
double ux, uy, uz, vx, vy, vz, wx, wy, wz, px, py, pz;
^~
emc/kinematics/genserfuncs.c:647:28: warning: variable ‘vy’ set but not used [-Wunused-but-set-variable]
double ux, uy, uz, vx, vy, vz, wx, wy, wz, px, py, pz;
^~
emc/kinematics/genserfuncs.c:647:24: warning: variable ‘vx’ set but not used [-Wunused-but-set-variable]
double ux, uy, uz, vx, vy, vz, wx, wy, wz, px, py, pz;
^~
emc/Submakefile:Linking genserkins
/usr/bin/ld: objects/emc/kinematics/genserfuncs.o: undefined reference to symbol 'acos@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
emc/kinematics/Submakefile:18: recipe for target '../bin/genserkins' failed
make: *** [../bin/genserkins] Error 1
I will setup a new machine tomorrow using debian buster and try again.
Last edit: 28 Feb 2020 17:04 by Aciera.
Please Log in or Create an account to join the conversation.
28 Feb 2020 18:45 - 28 Feb 2020 20:23 #158777
by dgarrett
Replied by dgarrett on topic Compile Error when using regular math functions in kinematics file
i found a mint18 virtual machine and was able to
replicate your result -- not a linker expert but
a minor reordering fixed for me on that machine.
Please try new branch: dgarr/aciera.1
and report (and include output from linuxcnc_info)
Supporting&testing every possible
distribution/architecture/kernel/release
is not always simple.
replicate your result -- not a linker expert but
a minor reordering fixed for me on that machine.
Please try new branch: dgarr/aciera.1
and report (and include output from linuxcnc_info)
Supporting&testing every possible
distribution/architecture/kernel/release
is not always simple.
Last edit: 28 Feb 2020 20:23 by dgarrett.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- [Solved] Compile Error when using regular math functions in kinematics file
Time to create page: 0.079 seconds