Lcnc 2.10 -- halcompile for kins
28 Oct 2023 11:07 - 28 Oct 2023 11:19 #283955
by bkt
I use linuxcnc-master for build my .deb package ... now that .deb is install (sim axis work ok, and my app .... leave out non compiled kins .... work perfect too) is not possible use that folder for as run in place install? At least before build package therse actions is do
I thought it was therefore possible.... should I do a run in place new installation instead?
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
testPc@mark28:~/linuxcnc-master/scripts$ . ./rip-environment
This script is only useful on run-in-place systems.
I use linuxcnc-master for build my .deb package ... now that .deb is install (sim axis work ok, and my app .... leave out non compiled kins .... work perfect too) is not possible use that folder for as run in place install? At least before build package therse actions is do
ne:
cd linuxcnc-master/src
./autogen.sh
./configure --with-realtime=uspace
make
sudo make setuid
I thought it was therefore possible.... should I do a run in place new installation instead?
Last edit: 28 Oct 2023 11:19 by bkt.
Please Log in or Create an account to join the conversation.
28 Oct 2023 11:35 #283956
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
after build .deb package i need to rebuild my folder linuxcnc-master as a new run-in-place .... these help me with rip-environments, but not for compiling scarakins.c .... that retunr the same error ... so I try for new folder linuxcnc-dev download from git intead of download as .zip file.
Please Log in or Create an account to join the conversation.
28 Oct 2023 12:47 #283959
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
so I've download from github into folder linuxcnc-dev linuxcnc ... and start a new run-in-place ...
but remember now one time dGarred talk about halcompile can not work on run-in-place whre switch kinematics is request .... thin probabily error become from that .... I hope these issue was fix from 2020 .... but seems not.
indeed
Compiling realtime emc/motion/homemod.c
Compiling realtime emc/motion/homing.c
Linking ../rtlib/homemod.so
Compiling realtime emc/tp/tpmod.c
Compiling realtime emc/tp/tc.c
Compiling realtime emc/tp/tcq.c
Compiling realtime emc/tp/tp.c
Compiling realtime emc/tp/spherical_arc.c
Compiling realtime emc/tp/blendmath.c
Compiling realtime emc/nml_intf/emcpose.c
Linking ../rtlib/tpmod.so
config.status: creating ../scripts/setup_designer
You now need to run 'sudo make setuid' in order to run in place with access to hardware.
testPc@mark28:~/linuxcnc-dev/src$ sudo make setuid
[sudo] password di testPc:
chown root ../bin/rtapi_app
chmod 4750 ../bin/rtapi_app
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
testPc@mark28:~/linuxcnc-dev/src$ cd ..
testPc@mark28:~/linuxcnc-dev$ cd src
testPc@mark28:~/linuxcnc-dev/src$ source ../scripts/rip-environment
testPc@mark28:~/linuxcnc-dev/src$ linuxcnc
LINUXCNC - 2.10.0~pre0
testPc@mark28:~/linuxcnc-dev/src$ halcompile --compile scarakins.c
Traceback (most recent call last):
File "/home/testPc/linuxcnc-dev/bin/halcompile", line 1558, in <module>
main()
File "/home/testPc/linuxcnc-dev/bin/halcompile", line 1542, in main
shutil.copy(f, tempdir)
File "/usr/lib/python3.6/shutil.py", line 245, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'scarakins.c'
testPc@mark28:~/linuxcnc-dev/src$ cd '/home/testPc/linuxcnc-dev/src/emc/kinematics'
testPc@mark28:~/linuxcnc-dev/src/emc/kinematics$ halcompile --compile scarakins.c
Compiling realtime scarakins.c
Linking scarakins.so
/usr/bin/ld:scarakins.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
/home/testPc/linuxcnc-dev/src/Makefile.modinc:121: recipe for target 'scarakins.so' failed
make: *** [scarakins.so] Error 1
testPc@mark28:~/linuxcnc-dev/src/emc/kinematics$
but remember now one time dGarred talk about halcompile can not work on run-in-place whre switch kinematics is request .... thin probabily error become from that .... I hope these issue was fix from 2020 .... but seems not.
indeed
testPc@mark28:~/linuxcnc-dev/src/emc/kinematics$ halcompile --compile trivkins.c
Compiling realtime trivkins.c
Linking trivkins.so
testPc@mark28:~/linuxcnc-dev/src/emc/kinematics$
Please Log in or Create an account to join the conversation.
28 Oct 2023 13:31 #283961
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
after better reading comment inside userkfuncs.c file I finnally understand ... the right way to do is:
testPc@mark28:~/linuxcnc-master/src$ source ../scripts/rip-environment
testPc@mark28:~/linuxcnc-master/src$ userfkfuncs=/home/testPc/linuxcnc-master/src/emc/kinematics/gc0scara.c make && sudo make setuid
Reading 204/204 dependency files
Done reading dependencies
Reading 265/265 realtime dependency files
Done reading realtime dependencies
You now need to run 'sudo make setuid' in order to run in place with access to hardware.
chown root ../bin/rtapi_app
chmod 4750 ../bin/rtapi_app
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
testPc@mark28:~/linuxcnc-master/src$ sudo make setuid
chown root ../bin/rtapi_app
chmod 4750 ../bin/rtapi_app
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
testPc@mark28:~/linuxcnc-master/src$
Please Log in or Create an account to join the conversation.
28 Oct 2023 14:36 #283963
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
unfortunately compiling the component with switchkins only worked once, when I used the method described by dgarret in a post that recommended using .comp files..... once I went back to using .c files it didn't I was no longer able to update the mykins.c file.... in the sense that no modification to the related mykins.so file was made possible ... so something goes wrong ....
Please Log in or Create an account to join the conversation.
28 Oct 2023 17:45 #283974
by andypugh
Replied by andypugh on topic Lcnc 2.10 -- halcompile for kins
You don't have to create a new clone to build a run-in-place from a directory that has been used to build a deb, but you will need to reconfigure.
cd src
./autogen.sh
./configure --enable-build-documentation=no
make
This will take a long time the first time, but after that it will only recompile the files that have been touched.
sudo make setuid (not necessarily necessary)
. ../scripts/rip-environment (don't need this if you are just moving the scarkins.so out)
This assumes that scarakins compiles in-tree (halcmcompile is an out-of-tree compie)
You should then be able to find the scarakins.so somewhere in the linuxcnc-dev folder, and copy it over the other one in /usr/bin
cd src
./autogen.sh
./configure --enable-build-documentation=no
make
This will take a long time the first time, but after that it will only recompile the files that have been touched.
sudo make setuid (not necessarily necessary)
. ../scripts/rip-environment (don't need this if you are just moving the scarkins.so out)
This assumes that scarakins compiles in-tree (halcmcompile is an out-of-tree compie)
You should then be able to find the scarakins.so somewhere in the linuxcnc-dev folder, and copy it over the other one in /usr/bin
The following user(s) said Thank You: bkt
Please Log in or Create an account to join the conversation.
28 Oct 2023 19:01 #283979
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
@andypugh thanks ... loses in a glass of water again .... indeed these is not try .... try tomorrow. Again
Please Log in or Create an account to join the conversation.
29 Oct 2023 16:58 #284050
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
not work ... mykins is inside 'linuxcnc-dev/src/emc/kinematics' and after make configure etc etc but no new kinematics was compiled .... ??? Put the file in wrong folder?
Please Log in or Create an account to join the conversation.
29 Oct 2023 17:16 #284053
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
so finally I can use multiple time "userkfuncs" .... but obtain every time these error if try to compile troght userkfuncs scarakins.c bring from master repo of linuxcnc .... see code and error under ...
testPc@mark28:~/linuxcnc-dev/src$ userkfuncs=/home/testPc/linuxcnc-dev/src/emc/kinematics/scarakins.c make && sudo make setuid
Reading 204/204 dependency files
Done reading dependencies
!!!USERKFUNCS=/home/testPc/linuxcnc-dev/src/emc/kinematics/scarakins.o
Reading 263/264 realtime dependency files
Done reading realtime dependencies
Compiling realtime /home/testPc/linuxcnc-dev/src/emc/kinematics/scarakins.c
Linking ../rtlib/genhexkins.so
objects/rt/home/testPc/linuxcnc-dev/src/emc/kinematics/scarakins.o: nella funzione "switchkinsSetup":
/home/testPc/linuxcnc-dev/src/emc/kinematics/scarakins.c:215: definizione multipla di "switchkinsSetup"
objects/rtemc/kinematics/genhexkins.o:/home/testPc/linuxcnc-dev/src/emc/kinematics/genhexkins.c:711: definito qui per la prima volta
Makefile:1237: recipe for target '../rtlib/genhexkins.so' failed
make: *** [../rtlib/genhexkins.so] Error 1
Please Log in or Create an account to join the conversation.
29 Oct 2023 17:18 #284055
by bkt
Replied by bkt on topic Lcnc 2.10 -- halcompile for kins
why Lcnc try to link scarakins to genekins???
Please Log in or Create an account to join the conversation.
Time to create page: 0.085 seconds