compiling kinematics

More
10 Jul 2013 01:45 #36464 by ddmotim
compiling kinematics was created by ddmotim
I'm working on a project using the genhexkins hexapod kinematics, and I can't figure out how to compile file with my workspace values. From what I've read, I have to go into the genhexkins.h file and modify what I need. I've done that. Then I have to recompile the genhexkins.c file? That's where I'm lost. I can't seem to find anywhere that describes the process. Thanks in advance, and I hope this isn't a silly question.

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 17:57 - 10 Jul 2013 17:59 #36495 by ArcEye
Replied by ArcEye on topic compiling kinematics
Hi

Assuming you have compiled from sources, you just run make again (preferably deleting genhexkins.ko or whatever the output file is called first, but that probably won't matter)

The makefile should see that genhexkins.c has changed and is newer than the last build and compile it.

In case it doesn't pick up the dependency and you have only edited genhexkins.h, then use touch genhexkins.c, which will update the file time and date to now, so that it is
seen as newer.

regards
Last edit: 10 Jul 2013 17:59 by ArcEye.

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 21:24 #36501 by ddmotim
Replied by ddmotim on topic compiling kinematics
Thanks for the reply.
I did this, and the response in terminal was Nothing to be done for 'genhexkins.c' . Just to make sure I'm on the right page (figuratively) am I correct that after I modify the .h file I need to recompile the .c file? I tried to delete the .ko file, or at least rename it, but I couldn't.
Thanks

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 21:36 #36502 by ArcEye
Replied by ArcEye on topic compiling kinematics

I did this, and the response in terminal was Nothing to be done for 'genhexkins.c'


That seems a strange message, I would expect 'Nothing to be done for all'.
Why would it tell you specifically about genhexkins as opposed to the other hundreds of files in the source?

Are you running make from the .../src folder. Not trying to run it inside the folder with genhexkins.c in it?

Just to make sure I'm on the right page (figuratively) am I correct that after I modify the .h file I need to recompile the .c file?


You need to rebuild all files that use genhexkins.h
Assuming that just means genhexkins.c, then use touch as I suggested to make it look changed.

I tried to delete the .ko file, or at least rename it, but I couldn't.


Use sudo either to start the file editor or just sudo rm genhexkins.ko
That will definitely force a re-compile

regards

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 21:51 #36505 by ddmotim
Replied by ddmotim on topic compiling kinematics
I was running make from the folder with genhexkins in it. (I think I'm confusing myself with all this for three days). I will try to run it in the .../src folder.

What is the exact make command I should be executing?

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 22:01 #36509 by ArcEye
Replied by ArcEye on topic compiling kinematics
Just make

It should recursively go through the source tree and when it finds that genhexkins.ko is missing and genhexkins.c has 'changed' it will execute the Submakefile and
build that part

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 22:29 #36513 by ddmotim
Replied by ddmotim on topic compiling kinematics
Thanks again, but I'm still having no luck. I went to the directory with the genhexkins.ko file and used sudo rm genhexkins.ko. The response: rm: cannot remove `genhexkins.ko': No such file or directory. But it is clearly in that directory....
Hoping maybe I wouldn't need to remove it, I went to the linuxcnc-dev/src directory and ran make. make: *** No targets specified and no makefile found. Stop.

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 22:37 #36515 by ArcEye
Replied by ArcEye on topic compiling kinematics
Sounds like you have just downloaded the source, but have not built it before.

Also sounds like you have downloaded the master

From linuxcnc-dev/src in a terminal
./autogen.sh
./configure
make
make setuid
cd ../
. ./scripts/rip-environment
linuxcnc


will run the 2.6~pre version as a run in place install and you can test it out

I have no idea if the genhexkins module produced will be compatible with your user system, if you were hoping to just swap it for the one you had installed?

Please Log in or Create an account to join the conversation.

More
10 Jul 2013 22:51 - 10 Jul 2013 22:52 #36517 by ArcEye
Replied by ArcEye on topic compiling kinematics
If you have not already built the source, to anticipate your next question, there is a good chance you will fall at the first hurdle, because you have not install all or some of these.

sudo apt-get install -y build-essential debhelper libpth-dev libgtk2.0-dev tcl8.5-dev tk8.5-dev bwidget python-old-doctools python-tk python-dev libglu1-mesa-dev libgtk2.0-dev libgnomeprintui2.2-dev libncurses5-dev libxaw7-dev gettext libreadline5-dev lyx texlive-extra-utils imagemagick texinfo groff qt3-dev-tools libmodbus-dev libmodbus3

configure will tell you if you are missing something else, probably python-boost
Last edit: 10 Jul 2013 22:52 by ArcEye.

Please Log in or Create an account to join the conversation.

More
11 Jul 2013 00:45 #36525 by andypugh
Replied by andypugh on topic compiling kinematics
You can sometimes (depending on includes etc) compile kinematics files with comp.

sudo comp --install genhexkins.c

You will need to sudo apt-get install linuxcnc-dev first, at a minimum.

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum