Problems with building Linux CNC source

More
01 Aug 2021 11:57 #216595 by smal
Hello
I am using LinuxCNC-2.7.14-wheezy and so far it worked according to my expectations. Now I would like to introduce my hardware specific HAL driver for which some code has to be written and compiled. For that I have done this:
> git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
> cd linuxcnc-dev/src
> ./autogen.sh
> ./configure --with-realtime=uspace
> make

according to official website:
linuxcnc.org/docs/devel/html/code/building-linuxcnc.html

As told on the site there were problems with compiling because of missing dependencies. To actually check what is missing this command was used:
> dpkg-checkbuilddeps

Answer:
dpkg-checkbuilddeps: Unmet build dependencies: libudev-dev libgnomeprintui2.2-dev tcl8.5-dev tk8.5-dev libreadline-gplv2-dev asciidoc (>= 8.5) dblatex (>= 0.2.12) dvipng graphviz groff imagemagick inkscape python-lxml source-highlight w3c-linkchecker xsltproc texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-lang-cyrillic texlive-lang-french texlive-lang-german texlive-lang-polish texlive-lang-spanish texlive-latex-recommended libxmu-dev libglu1-mesa-dev libgl1-mesa-dev | libgl1-mesa-swx11-dev libgtk-3-dev libboost-python-dev libmodbus-dev (>= 3.0) libusb-1.0-0-dev yapps2 libtirpc-dev

The next step was to install missing packages. I tried the first missing:

sudo apt-get install libudev-dev

And got this reply:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libudev-dev

Now the question is what I can do to install the missing software packages?

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

More
01 Aug 2021 16:30 #216626 by andypugh
Which OS version are you running?
If you are using Wheezy then it is so ancient that all the software repositories have been archived.

If you are running something newer, then that probably isn't the problem.
The following user(s) said Thank You: smal

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

More
01 Aug 2021 18:22 #216637 by smal
Yes it is Wheezy. Is there a solution to this problem?

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

More
01 Aug 2021 18:39 #216640 by andypugh
The best solution is to stop using Wheezy.

The stopgap solution is to edit the /etc/apt/sources file to point to archive.debian.org:

forum.linuxcnc.org/29-forum-announcement...-repositories#135195

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

More
01 Aug 2021 18:46 #216641 by smal
If I understand this correctly the newest version also have LinuxCNC 2.8.2 Debian 10 Buster RTAI version and also RT PREEMPTIVE? How to change to RTAI instalation? How well RTAI is tested with 2.8.2?
I guess the best idea is to migrate to newest version, I would like to run the software on RTAI patch.

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

More
01 Aug 2021 21:58 #216649 by smal
Ok, I am following the path with Wheezy with archive.debian.org. I was able to resolve the problem with dependencies. Next step is:

./configure --with-realtime=uspace

I have got following answer:

checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking boost/lockfree/queue.hpp usability... no
checking boost/lockfree/queue.hpp presence... no
checking for boost/lockfree/queue.hpp... no
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking build toplevel... /home/smal/linuxcnc-dev
checking installation prefix... run in place
checking for grep... (cached) /bin/grep
checking for egrep... (cached) /bin/grep -E
checking for pkg-config... /usr/bin/pkg-config
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking for rtai-config... /usr/realtime-3.4-9-rtai-686-pae/bin/rtai-config
checking for xeno-config... none
checking for realtime API(s) to use... uspace+lxrt
checking whether to enable userspace PCI access... yes
checking for libudev... yes - version 175
checking for cc version... not specified
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for usability of linux/hidraw.h... yes
checking for usability of rpc/rpc.h... yes
checking for libmodbus3... yes - version 3.0.3
checking for libusb-1.0... yes
checking for module installation directory... configuring for run-in-place
/home/smal/linuxcnc-dev/rtlib
checking for glib... yes - 2.32.4
checking for GTK 3.22.4 or above... no
configure: error: GTK3 missing. Install with "sudo apt install libgtk-3-dev" or specify --disable-gtk to skip the parts of LinuxCNC that depend on GTK

When I try to install GTK3 with proposed command sudo apt-get ....
I get following:

Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk-3-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

What to do?

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

More
01 Aug 2021 22:17 #216651 by andypugh

How well RTAI is tested with 2.8.2?

My development machine has been running the RTAI kernel for over a year. Admittedly that rarely moves hardware, but it seems fine.

I guess the best idea is to migrate to newest version, I would like to run the software on RTAI patch.

I think that would be best. Though there is absolutely nothing stopping you running 2.8.2 on your Wheezy system. (But you wont't be able to run 2.9)

Instructions on settting up Debian Buster / RTAI / LinuxCNC 2.8.2 here: linuxcnc.org/docs/2.8/html/getting-start...#cha:Installing-RTAI

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

More
02 Aug 2021 08:45 #216676 by smal
Regarding notice on the official website there are some problems regarding kernel panics when shutting down the computer. Is this problem solved now? I guess RTAI team has to make some corrections in their code to be compatible with the newest Debian Linux.
I am using Mesa 6i25 Card and to migrate to newest Linux CNC 2.8.2 software with RT_PREEMPTIVE would this make any noticeable difference in performance compared to RTAI patch?

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

More
02 Aug 2021 11:58 #216689 by andypugh
I think that if you are using a Mesa card there is generally no reason to prefer RTAI over PREEM_RT. And if you are using an Ethernet Mesa card then you _have_ to use the LinuxCNC "uspace" option.

Typically "uspace" implies preempt-rt, but it is actually possible to compile uspace with RTAI. (though I don't know if hm2_eth works with that combination)

It is still possible to crash the RTAI kernel by rapidly loading and unloading RTAI in a loop. However this isn't typical usage, and the system seems stable in use.
The following user(s) said Thank You: smal

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

More
02 Aug 2021 19:00 #216733 by tommylight
FYI, using Linux Mint with Andy's RTAI kernel on a production machine daily since this pandemic started, so a year and a half, never had issues.
The following user(s) said Thank You: smal

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

Time to create page: 0.137 seconds
Powered by Kunena Forum