Linuxcnc 2.9 on Arch Linux

More
16 Oct 2021 08:02 - 31 Mar 2023 03:32 #223284 by Joco
For a little bit of variety and after being pulled down the rabbit hole by Turboss I documented installing linuxcnc under Arch Linux on my HP T610.  It has been useful as I seem to have reduced latency by 8-10us down to around 25us.  But be warned this is Arch Linux, so like Gentoo is wants to have plenty of disk space to play in as it pulls down a mix of binaries and source and builds packages on the fly.

Anyway, I thought I would share in case anyone else got enthused.  :-)

Arch Linux linuxcnc deps list

Guided install of Arch Linux.  Key choics are to select desktop and xfce. This while in the Arch Linux boot strap terminal.
pacman -Sy python-archinstall
python -m archinstall --script guided


Assumes:
- you have now rebooted into you new and very basic Arch Linux install
- have installed yay (https://github.com/Jguer/yay)
- you take the latest version packages to install (i.e. typically from extra or community)
- Disable sudo password timeout per tips and tricks at: https://wiki.archlinux.org/title/sudo
- have used yay to install linux-rt
- have left all build dependencies in place after each build
- you use the follwoing extra switches on ./configure
    --disable-gtk2  This means no classic ladder
    --enable-non-distributable=yes    this allows arch gpl3 vertsion of readline
- you have added .local/bin to your path

Using yay:
yay -Sy python-pip libmodbus libtirpc intltool boost-libs boost tcl tclx tk tkimg bwidget glu python-opengl python-cairo python-pyqt5 python-xlib python-qscintilla-qt5 qt5-svg python-pyqt5-webengine python-numpy python-opencv dbus-python qt5-multimedia python-wheel python-setuptools python-devtools qt5-declarative gst-plugins-bad qt5-tools lsb-release qt5-quickcontrols python-espeak man-db


Install using python:
python3 -m pip install yapps2

After the above perform a noraml RIP based build of source code. i.e. no debian package builds.  e.g.:
> git clone https://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
> cd linuxcnc-dev/src
> ./autogen.sh
> ./configure --with-realtime=uspace --disable-gtk2 --enable-non-distributable=yes
> make -j3
Last edit: 31 Mar 2023 03:32 by Joco. Reason: added optional man-db
The following user(s) said Thank You: seuchato, TurBoss, tommylight, my1987toyota, zu4lu, MoshKopp, JT

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

More
16 Oct 2021 08:47 #223287 by MoshKopp
Replied by MoshKopp on topic Linuxcnc 2.9 on Arch Linux
Nice, will give it try. Thank you for sharing your experience

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

More
12 Jan 2022 18:43 #231580 by zu4lu
Replied by zu4lu on topic Linuxcnc 2.9 on Arch Linux
I tried it, you missed 1 Package (psmisc for fuser), but now configure hangs because of python3.10. Any ideas?
Thanks
Michael

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

More
18 Jan 2022 19:27 #232318 by Joco
Replied by Joco on topic Linuxcnc 2.9 on Arch Linux
You might need to expand a bit on what you mean by "but now configure hangs because of python3.10".
Is it python 3.10 hanging? Is it complaining because of some version issue?

How long did you wait for the "hang"?  Remember a T610 system is pretty slow.  Do you have enough disk space?  You need at least 64GB if not more. I put in a 128GB SSD to do this.

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

More
21 Jan 2022 17:35 #232661 by Donb9261
Replied by Donb9261 on topic Linuxcnc 2.9 on Arch Linux
Hey Joco,

Is this the RT LCNC install? If so, can you provide more intimate detail as to which LCNC package you installed? Also, were you able to get QtPyVCP working on you machine? If so, did the standard install for the dev version work?

Debian sucks and always has. I prefer Arch versions.

My machine is well equipped with an i7 chip, 16gb RAM, and 1TB SSD. So I have no concerns on the hardware side.

Any help would be great. Thanks.

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

More
22 Jan 2022 03:51 #232726 by Joco
Replied by Joco on topic Linuxcnc 2.9 on Arch Linux
Honestly the list I supplied in the original post “just worked” from memory.  I will need to try run it when I get back from being out of town.  Maybe next week. 

I’m pretty sure I had working qtpyvcp.   But will be redoing as arch seemed to work quite well from memory on the T610.  And latency was good.  Which shows the kit is fine on a modern 5 series kernel if it’s compiled for that silicone.

Yet I am fight with Debian 11 standard RT kernel which is basically shite on this kit.

I was trying to compile a customer kernel but hit dependency issues.  Might have another go at some point. 

 

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

More
22 Jan 2022 11:53 #232758 by Donb9261
Replied by Donb9261 on topic Linuxcnc 2.9 on Arch Linux
Very well. Cheers.

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

More
24 Jan 2022 09:51 #232938 by TurBoss
Replied by TurBoss on topic Linuxcnc 2.9 on Arch Linux
Python3.10 build hack

I don't know how to do this more compatible

just edit configure.ac search for 3.6
github.com/LinuxCNC/linuxcnc/blob/master/src/configure.ac#L1006
and replace it with 3.10

run

autoupdate
./autogen.sh
./configure
 

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

More
29 Jan 2022 06:55 #233421 by zu4lu
Replied by zu4lu on topic Linuxcnc 2.9 on Arch Linux
Sorry for long delay, here is the error from ./configure:

<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
results of the Python check:
Binary: python3.10
Library: python3.10
Include Dir: /usr/include/python3.10
checking for python3.10... /usr/sbin/python3.10
checking for python... (cached) /usr/sbin/python3.10
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >='3.6'... no
configure: error: this package requires Python >='3.6'.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.

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

More
29 Jan 2022 07:11 - 29 Jan 2022 07:12 #233422 by zu4lu
Replied by zu4lu on topic Linuxcnc 2.9 on Arch Linux
Ok found a not very clean solution. First you need additional packages: yay -Sy psmisc python-gobject gtk3(maybe because on the testinstallation i didn't install any desktop)
Then edit .configure and replace 3.6 with 3.10.
It's working now. Took some time to compile the kernel.
Last edit: 29 Jan 2022 07:12 by zu4lu.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum