Difficulty building RTAI linuxcnc from source

More
27 Jul 2023 14:07 #276380 by tommylight
Topic tittle changed.
-

Please see praise for LinuxCNC here:

www.woodenreliefmaps.com/pages/about

Thanks.

Wow, nice maps, thank you.
The prices seem very reasonable considering the time it takes to make those.

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

More
27 Jul 2023 17:39 #276386 by southbayguy
Thank you for sticking with me.
git clone github.com/LinuxCNC/linux.git linuxcnc-dev didn't work until I pre-pended https:// in front of github.com.
I had to cd into /src for ./autogen.sh to work ... I had been in /src running autogen earlier in the week, so I knew to do so.
./configure errored out because I didn't have GTK or the right version of GTK. To see what would happen I took the suggestion and did ./configure --disable-gtk. That may have been a foolish decision if the LinuxCNC GUI is trashed for lack of GTK. Then ./configure ran past GTK but encountered the same rigmarole as a few days ago about licensing, so I ended up doing ./configure --disable-gtk --enable-non-distributable=yes.
That last ./configure command yielded the success box.

I ran make. It bombed, saying "No module named yapps."
Since then, I haven't tried anything. I'm feeling that I have a cleaner copy of the code than in previous attempts and I don't want to ruin it by getting too creative.
Here's the output from make when it stops:



Compiling hal/hal_lib.c
Compiling rtapi/rtai_ulapi.c
Creating shared library liblinuxcnchal.so.0
ln -sf liblinuxcnchal.so.0 ../lib/liblinuxcnchal.so
Creating shared library libnml.so.0
ln -sf libnml.so.0 ../lib/libnml.so
Compiling rtapi/test_rtapi_vsnprintf.c
Linking test_rtapi_vsnprintf
Compiling hal/components/streamer_usr.c
Linking halstreamer
Compiling hal/components/sampler_usr.c
Linking halsampler
Compiling hal/components/panelui.c
Linking panelui
Compiling hal/user_comps/mb2hal/mb2hal.c
Compiling hal/user_comps/mb2hal/mb2hal_init.c
Compiling hal/user_comps/mb2hal/mb2hal_modbus.c
Compiling hal/user_comps/mb2hal/mb2hal_hal.c
Linking mb2hal
Compiling hal/user_comps/gs2_vfd.c
Linking gs2_vfd
Compiling hal/user_comps/hy_gt_vfd.c
Linking hy_gt_vfd
Compiling hal/user_comps/shuttle.c
Linking shuttle
Compiling hal/user_comps/xhc-hb04.cc
Linking xhc-hb04
Compiling hal/user_comps/sendkeys.c
Linking sendkeys
Syntax checking python script halcompile
Copying python script halcompile
Preprocessing thermistor.comp
Traceback (most recent call last):
File "../bin/halcompile", line 24, in <module>
from yapps import runtime
ImportError: No module named yapps
make: *** [hal/user_comps/Submakefile:89: objects/hal/user_comps/thermistor.c] Error 1
robert@debian:~/linuxcnc-dev/src$

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

More
27 Jul 2023 17:57 #276388 by andypugh
I think that you will need to do the ./debian/configure again to get the new list of dependencies for 2.8 (sorry).

Try ./debian/configure -r first, as I think that still works in 2.8 and means "configure for the current running kernel". Note that this only configures for creating debian packages, which you probably won't end up doing. But it should get a more accurate list of dependencies.

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

More
27 Jul 2023 19:17 #276395 by southbayguy
When I do ./debian/configure -r I get "your kernel is not known ...

When I do ./debian/configure I get a list of options to append, but choosing the option of explicitly naming the kernel (and then doing so), I'm back to "your kernel is not known."

Googling the yapps error, I see there is plenty of forum history with it ... but I don't see a consensus solution in the posts.

Thanks.

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

More
27 Jul 2023 21:04 #276401 by tommylight
from yapps import runtime
ImportError: No module named yapps
try
sudo apt install yapps2

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

More
27 Jul 2023 21:59 #276404 by southbayguy
Thanks for the suggestion ... here's the result:
robert@debian:~/linuxcnc-dev$ sudo apt install yapps2
[sudo] password for robert:
Reading package lists... Done
Building dependency tree
Reading state information... Done
yapps2 is already the newest version (2.2.1-3).
0 upgraded, 0 newly installed, 0 to remove and 183 not upgraded.

if I re-run make after getting that result, in bombs in the same way in the same place.

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

More
27 Jul 2023 22:21 #276407 by tommylight
You have an older version of Debian, did you try without 2, although i doubt it would change anything, but it might as there is also python-yapps that goes with it, but in my case it is for python3-yapps2.
try also
sudo apt install python-yapps python2-yapps python-yapps2 python2-yapps2 python3-yapps2
and remove any of those that it complains about.

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

More
27 Jul 2023 23:19 #276412 by southbayguy
Wow! Thanks.
One of those first two worked, either sudo apt install python-yapps or sudo apt install python2-yapps. I ran all the other variations just in case, but they didn't do anything.
So, having gotten some yapps action, I tried make again ... and ... it worked! So much verbiage scrolled by in my command window I can't go back and see which of the two early yapps commands was the one that worked. I remember it was early in the sequence, your first or second suggestion.
After make succeeded, I did sudo make setuid then
./scripts/rip-environment.
I typed linuxcnc and it ran ... until it errored out not being able to recognize the Motenc-Lite board on the PCI bus, which was as far as I got with the packaged version of linuxcnc.
Now though, because I can build, I can uncomment the line that prints out the board type number. The code is prepared for the board type to be 0 or 1, nothing else. A good starting point for troubleshooting board type recognition will be to know what value the code is seeing.
I thought I set the board jumpers correctly and/or cycled through all the jumper combinations, but maybe not.
Thanks again.
The following user(s) said Thank You: tommylight

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

More
28 Jul 2023 15:53 #276471 by southbayguy
Now I can build (thank you very much) but I'm not sure I know how to run. Trying to figure out the integer value board type the code finds for the Motenc-Lite board, I have tweaked a couple of lines in hal_motenc.c. I have commented out the original error message "unknown card detected" with double slashes. No way that error message gets printed. After make runs successfully, I do setuid and set the run in place environment, then type linuxcnc.

The error message "unknown card detected" appears! Somehow my change to the code is having no effect.

Make ran successfully (didn't take long, it only built the one file), and I could see a new hal_motenc.ko file had been created. I decided maybe make didn't know to link the new file, so I did make clean and then make again. (plus set uid and rip environment). Typed linuxcnc and again got "unknown card detected."

So my current theory is that the machine is not running my new version of linuxcnc, it must be running the compiled ready-to-ruin version I downloaded from linuxcnc.org a week and a half ago.

How do I make sure my homemade version of linuxcnc is the one that runs?

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

More
28 Jul 2023 17:41 #276473 by PCW
If you have a Run In Place Linuxcnc version you wish to run you (in a terminal)

. ~/linuxcnc-dev/scripts/rip-environment
linuxcnc

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

Time to create page: 0.248 seconds
Powered by Kunena Forum