Building linuxcnc on BeagleBoneBlack

25 Nov 2022 14:57 #257624 by ALANMTHOMASON
Hi There...

I am trying to build linuxcnc on a BeagleBone Black.   GitHub - LinuxCNC/linuxcnc: LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.  linuxcnc-devFollowing the recommended steps I see the following error:
machinekit@beaglebone:~/linuxcnc-dev/src$ ./configure --with-realtime=uspace
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 for a BSD-compatible install… /usr/bin/install -c
checking whether g++ supports C++17 features with -std=gnu++17… no
checking whether g++ supports C++17 features with -std=gnu++1z… no
configure: error: *** A compiler with support for C++17 language features is required.I'm a bit lost.  I'm trying many things, but thought it would make more sense to ask the advice of those who have done this before what is the best path.

This is my current version:
machinekit@beaglebone:~/linuxcnc-dev/src$ sudo /opt/scripts/tools/
dogtag:[Machinekit Debian Image 2019-09-15]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-gbb4af0f50f]:[location: dd MBR]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
groups:[machinekit : machinekit adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev gpio pwm eqep remoteproc admin spi tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 1.708106] remoteproc remoteproc0: wkup_m3 is available
[ 2.344402] remoteproc remoteproc0: powering up wkup_m3
[ 2.349083] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[ 2.349338] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
[ 2.205070] sysfs: cannot create duplicate filename ‘/bus/platform/devices/4a300000.pruss’
dmesg | grep pinctrl-single
[ 1.840312] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

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

26 Nov 2022 04:58 #257664 by silver2row

I have found that using these commands in the /src/ dir. work:

1. ./
2. ./configure --target=armhf --with-realtime=uspace
3. make
4. sudo make setuid

The only issue so far are this/these:

1. No way to CROSS_COMPILE for the arm arch. that I know of currently.
2. 2.9 is no longer the master on github.
3. Missing an awesome toolchain...maybe making one would be beneficial?


P.S. I noticed your question on here. I am a user on the forums. Anyway, I am building too! Enjoy!

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

27 Nov 2022 23:37 #257798 by ALANMTHOMASON
Hi Seth...Thanks for the reply and the help on the BeagleBone forum post. I am now feeling hopeful about having an up to date installation, but I am still keen to build linuxcnc from scratch. When you say cannot cross compile for the arm architecture, does that mean that you can build on the beaglebone itself? In the beaglebone forum you mentioned memory limitations.

Thanks again,

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

29 Nov 2022 01:48 #257932 by silver2row
Hello Alan,

Seth here. On the BBB, no way. I tried. I received the infamous error: C1plus.

There is not much documentation on it but that error always means to me that memory has hit its peak on a specific build.


And...building in a CROSS_COMPILE= methodology for armhf.

1. I used make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
2. I received an error half way through.

W/out it, w/out the ARCH and CROSS_COMPILE flags, I use:

1. target=armhf
2. This build built but when I installed on the BBB via sftp, I received an error.

The error from what I remember had to do w/ CLASS64 ELF. This is short for an error that means the build did not cross compile correctly for armhf and my use of the build is not viable or usable.


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

30 Nov 2022 13:23 #258116 by andypugh
Do you want to build from source, or are you only really interested in an up-to-date LinuxCNC?

You could try installing a pre-build .deb, for example from:

(though those were built on a Pi4, I think)

Versions for other Debian versions are on there too, and there are armhf and arm64 debs available for Bookworm direct from Debian.

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

01 Dec 2022 01:23 #258176 by silver2row

I was thinking that building for armhf via cross-compiling would be available in some fashion. At least, this was my first thought.

I see there are many related build steps and ideas. I also found that linuxcnc-uspace is available as a Debian package on Bullseye. I may just stick w/ what works.

For the BBB, beaglebone black, there is a separate processor called the PRU(s). Anyway, this handles the real-time aspect to the processing while the am335x handles GUIs and other ideas like servers and the many files in the filesystem.


P.S. I will try the armhf build or the Debian Bullseye repos. to try w/ apt.

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

02 Dec 2022 02:59 #258290 by ALANMTHOMASON
Hi Andy...Thanks very much for the response....I would like to build from source. Is the best method cross compiling, and if so how do we instruct the compilation process that it should be building for the BeagleBoneBlack?

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

02 Dec 2022 14:45 #258321 by andypugh

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

07 Dec 2022 22:53 #258843 by ALANMTHOMASON
With help from Robert Nelson and Seth, I've made some progress.
I can now create a new real-time image using the following two links...

This is what I entered
sudo apt upgrade
sudo apt install

and can build linuxcnc for 'run in place'. As Seth mentioned, I at first had issues with memory limitations. I was able to implement a swap memory (not sure of the terminology!) after increasing the partition size (I am using a 16GB micro-USB).

I was then able to build. I am probably missing some other issues resolved on the way, it was a real journey, and it isn't old BeagleBone machinekit ini and hal files are not accepted properly.

If anyone knows of any ini and hal files for linuxcnc on the BeagleBone Black for these later images, i would be very gateful.
The following user(s) said Thank You: silver2row

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

08 Dec 2022 01:52 #258865 by cakeslob
The ini/hal probably wont be accepted if you are trying to build linuxcnc. The ini file probably needs to be updated for linuxcnc2.8 for the new tp changes from 2.7

the hal file.....I dont think linuxcnc has the same beaglebone drivers as machinekit does.

Question for the pros, how would one set up beaglebone on linuxcnc? hal_bb_gpio + software stepgen?

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

Time to create page: 0.170 seconds
Powered by Kunena Forum