Editing userspace components

More
28 Sep 2020 03:13 #184093 by Uthayne
I'm trying to edit the xhc-whb04b-6 userspace component that is shipped with 2.9.

Should it be as simple as making the edits to the .cc files, going back to /src/ folder and running make again to compile the changes?

I'm able to pull down a new linuxcnc-dev folder and make changes to the user_comp before I run ./autogen.sh , ./configure --with-realtime=uspace , make , and sudo make setuid for the first time. However, anytime after this was initially ran it will not recognize changes and recompile.

I've tried to make clean and make again, but it doesn't seem to help.

Is there something I'm missing?

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

More
28 Sep 2020 04:57 #184104 by rodw
Replied by rodw on topic Editing userspace components
What happens if you just:

make , and sudo make setuid?

I never go back to do the ./configure step and it always seems to build OK

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

More
28 Sep 2020 05:31 #184105 by BeagleBrainz
So after making changes and second time, what messages are you getting after running make clean then make ?

I tried a couple of things

just touch * in the xhc-whb04b-6
running make again remade everything in that dir & sudo make setuid the xhc-whb04b-6 lib was rebuilt and installed with a new time stamp
then I just edited one file in that directory, & running make & sudo make setuid installed a new xhc-whb04b-6 with a new time stamp.

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

More
28 Sep 2020 13:15 #184167 by Uthayne
So I wrote out all of the below before figuring it out myself. Keeping it all here for others.

Edit: Turns out that since I was using Chrome remote desktop, it would open up a secondary desktop instead of the main session. This caused some of the source files (hal.cc for one) to remained opened in the editor in a different session. The compiler was still pulling at these versions. It was extra problematic when I was trying to work back and forth on both linuxcnc and machinekit versions, as they are slightly different. I was alerted to this when I opened up hal.cc and the editor said it was already opened (in a different desktop session). I overwrote the changes and it compiled successfully. This was definitely a head scratcher because nothing made sense with the different references to different codebases when I knew I was no longer compiling against them.

Original:

Ok, so I believe that make is behaving more like I imagined it would this morning, yet I am still having dependency issues.

Here is the output after editing a file (pendant.cc) and running make in /src/:

Warning: Spoiler! [ Click to expand ]


It recognized changes in pendant.cc and is attempting to recompile. It complains about undefined references though. There are two versions of the xhc-whb04b-6 driver that I have been messing around with, the one that has been precompiled with 2.8/2.9 linuxcnc and one that is delivered with machinekit. The one currently built in to linuxcnc is forked from the machinekit driver.

I can prove that the "undefined references" it is complaining about are indeed within the hal.cc file that should also be compiled alongside.

Snippet of the hal.cc file showing that these references do in fact, exist.

Warning: Spoiler! [ Click to expand ]


And to make sure everything has been checked, the Makefile in /src/ definitely points to the correct folder:

Warning: Spoiler! [ Click to expand ]
The following user(s) said Thank You: BeagleBrainz

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

More
28 Sep 2020 19:17 #184202 by BeagleBrainz
Lol
I’ve done something similar myself when editing a config for my mill.
Glad you worked it all out. I suspect we’ve all had moments like that.

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

Time to create page: 0.133 seconds
Powered by Kunena Forum