LinuxCNC
Official package name: LinuxCNC
License (must be an OSI approved Open Source license): GNU GPLv2
Download URL of latest release: https://github.com/LinuxCNC/linuxcnc
Latest release date (must be recent): July 12, 2024
Description: LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3D printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
As an additional comment: LinuxCNC is fully Open Source and has a very active community with many knowledgeable and experienced members, who may be able to assist making LinuxCNC work on Clear Linux. LinuxCNC requires a PREEMPT-RT kernel. The challenge for LinuxCNC is to run with low latency, which is often a challenge for modern hardware, as all the embedded features of modern architectures (motherboards, processors and chipsets) can cause quite some interrupts and thus ruining the low latency performance. However, I found that at least N100 based systems can be tuned properly to achieve good results, where tuning means disabling features in the BIOS that may cause interrupts, such as power management features, and isolating CPU cores from the general scheduler using isolcpus. Since Clear Linux is being developed by Intel, with obviously extensive knowledge of the most current processors, my expectation is that LinuxCNC may be able to perform much better on Clear Linux than on other mainstream Linux distributions. I tried to compile LinuxCNC on Clear Linux, but ran into too many dependencies that are not available out of the box on Clear Linux yet, and compiling them all one by one is a very time consuming job. I think that it would be a very interesting case to create a dedicated LinuxCNC bundle that will provide a one step solution to install LinuxCNC on Clear Linux.
Replying to https://github.com/clearlinux/distribution/issues/3197#issuecomment-2437159937
quick question, which dependencies are missing? meson kinda goes straight into building after checking boost and python2
+ ninja -v -C builddir
ninja: Entering directory `builddir'
[1/67] g++ -Ilibinifile.so.p -I. -I.. -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -MD -MQ libinifile.so.p/src_libnml_inifile_inivar.cc.o -MF libinifile.so.p/src_libnml_inifile_inivar.cc.o.d -o libinifile.so.p/src_libnml_inifile_inivar.cc.o -c ../src/libnml/inifile/inivar.cc
FAILED: libinifile.so.p/src_libnml_inifile_inivar.cc.o
g++ -Ilibinifile.so.p -I. -I.. -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -MD -MQ libinifile.so.p/src_libnml_inifile_inivar.cc.o -MF libinifile.so.p/src_libnml_inifile_inivar.cc.o.d -o libinifile.so.p/src_libnml_inifile_inivar.cc.o -c ../src/libnml/inifile/inivar.cc
../src/libnml/inifile/inivar.cc:29:10: fatal error: config.h: No such file or directory
29 | #include "config.h"
| ^~~~~~~~~~
...
[6/67] g++ -Ilibrs274ngc.so.p -I. -I.. -Isrc -I../src -Isrc/libnml/posemath -I../src/libnml/posemath -Isrc/emc/tp -I../src/emc/tp -Isrc/emc/kinematics -I../src/emc/kinematics -Isrc/emc/motion -I../src/emc/motion -Isrc/rtapi -I../src/rtapi -Isrc/hal -I../src/hal -Isrc/emc/nml_intf -I../src/emc/nml_intf -Isrc/emc/rs274ngc -I../src/emc/rs274ngc -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/nml -I../src/libnml/nml -Isrc/libnml/inifile -I../src/libnml/inifile -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -MF librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o.d -o librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -c ../src/emc/rs274ngc/interp_arc.cc
FAILED: librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o
g++ -Ilibrs274ngc.so.p -I. -I.. -Isrc -I../src -Isrc/libnml/posemath -I../src/libnml/posemath -Isrc/emc/tp -I../src/emc/tp -Isrc/emc/kinematics -I../src/emc/kinematics -Isrc/emc/motion -I../src/emc/motion -Isrc/rtapi -I../src/rtapi -Isrc/hal -I../src/hal -Isrc/emc/nml_intf -I../src/emc/nml_intf -Isrc/emc/rs274ngc -I../src/emc/rs274ngc -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/nml -I../src/libnml/nml -Isrc/libnml/inifile -I../src/libnml/inifile -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -MF librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o.d -o librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -c ../src/emc/rs274ngc/interp_arc.cc
In file included from ../src/emc/rs274ngc/rs274ngc_interp.hh:20,
from ../src/emc/rs274ngc/interp_arc.cc:29:
../src/emc/rs274ngc/interp_internal.hh:18:10: fatal error: linuxcnc.h: No such file or directory
18 | #include "linuxcnc.h"
...
[10/67] g++ -Ilibpyplugin.so.p -I. -I.. -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -MF libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o.d -o libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -c ../src/emc/pythonplugin/python_plugin.cc
FAILED: libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o
g++ -Ilibpyplugin.so.p -I. -I.. -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -MF libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o.d -o libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -c ../src/emc/pythonplugin/python_plugin.cc
../src/emc/pythonplugin/python_plugin.cc: In constructor ‘PythonPlugin::PythonPlugin(_inittab*)’:
../src/emc/pythonplugin/python_plugin.cc:297:24: error: ‘Py_DecodeLocale’ was not declared in this scope
297 | wchar_t *program = Py_DecodeLocale(abs_path, NULL);
| ^~~~~~~~~~~~~~~
../src/emc/pythonplugin/python_plugin.cc:298:23: error: cannot convert ‘wchar_t*’ to ‘char*’
298 | Py_SetProgramName(program);
| ^~~~~~~
| |
| wchar_t*
In file included from /usr/include/python2.7/Python.h:130,
from /usr/include/boost/python/detail/wrap_python.hpp:178,
from /usr/include/boost/python/detail/prefix.hpp:13,
from /usr/include/boost/python/ssize_t.hpp:9,
from /usr/include/boost/python/object.hpp:8,
from ../src/emc/pythonplugin/python_plugin.hh:25,
from ../src/emc/pythonplugin/python_plugin.cc:19:
/usr/include/python2.7/pythonrun.h:22:36: note: initializing argument 1 of ‘void Py_SetProgramName(char*)’
22 | PyAPI_FUNC(void) Py_SetProgramName(char *);
| ^~~~~~
../src/emc/pythonplugin/python_plugin.cc:313:42: error: void value not ignored as it ought to be
313 | PyObject *module = tab.initfunc();
| ~~~~~~~~~~~~^~
../src/emc/pythonplugin/python_plugin.cc:326:3: error: ‘Py_UnbufferedStdioFlag’ was not declared in this scope
326 | Py_UnbufferedStdioFlag = 1;
| ^~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
I was going to look over the weekend (my CNC play time :)
but python2 is a no go -- we no longer have that
On Fri, Oct 25, 2024 at 3:55 PM K1ngfish3r @.***> wrote:
Replying to #3197 (comment) https://github.com/clearlinux/distribution/issues/3197#issuecomment-2437159937
quick question, which dependencies are missing? meson kinda goes straight into building after checking boost and python2
- ninja -v -C builddirninja: Entering directory `builddir' [1/67] g++ -Ilibinifile.so.p -I. -I.. -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -MD -MQ libinifile.so.p/src_libnml_inifile_inivar.cc.o -MF libinifile.so.p/src_libnml_inifile_inivar.cc.o.d -o libinifile.so.p/src_libnml_inifile_inivar.cc.o -c ../src/libnml/inifile/inivar.ccFAILED: libinifile.so.p/src_libnml_inifile_inivar.cc.o g++ -Ilibinifile.so.p -I. -I.. -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -MD -MQ libinifile.so.p/src_libnml_inifile_inivar.cc.o -MF libinifile.so.p/src_libnml_inifile_inivar.cc.o.d -o libinifile.so.p/src_libnml_inifile_inivar.cc.o -c ../src/libnml/inifile/inivar.cc../src/libnml/inifile/inivar.cc:29:10: fatal error: config.h: No such file or directory 29 | #include "config.h" | ^~~~~~~~~~ ... [6/67] g++ -Ilibrs274ngc.so.p -I. -I.. -Isrc -I../src -Isrc/libnml/posemath -I../src/libnml/posemath -Isrc/emc/tp -I../src/emc/tp -Isrc/emc/kinematics -I../src/emc/kinematics -Isrc/emc/motion -I../src/emc/motion -Isrc/rtapi -I../src/rtapi -Isrc/hal -I../src/hal -Isrc/emc/nml_intf -I../src/emc/nml_intf -Isrc/emc/rs274ngc -I../src/emc/rs274ngc -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/nml -I../src/libnml/nml -Isrc/libnml/inifile -I../src/libnml/inifile -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -MF librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o.d -o librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -c ../src/emc/rs274ngc/interp_arc.ccFAILED: librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o g++ -Ilibrs274ngc.so.p -I. -I.. -Isrc -I../src -Isrc/libnml/posemath -I../src/libnml/posemath -Isrc/emc/tp -I../src/emc/tp -Isrc/emc/kinematics -I../src/emc/kinematics -Isrc/emc/motion -I../src/emc/motion -Isrc/rtapi -I../src/rtapi -Isrc/hal -I../src/hal -Isrc/emc/nml_intf -I../src/emc/nml_intf -Isrc/emc/rs274ngc -I../src/emc/rs274ngc -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/nml -I../src/libnml/nml -Isrc/libnml/inifile -I../src/libnml/inifile -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -MF librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o.d -o librs274ngc.so.p/src_emc_rs274ngc_interp_arc.cc.o -c ../src/emc/rs274ngc/interp_arc.ccIn file included from ../src/emc/rs274ngc/rs274ngc_interp.hh:20, from ../src/emc/rs274ngc/interp_arc.cc:29:../src/emc/rs274ngc/interp_internal.hh:18:10: fatal error: linuxcnc.h: No such file or directory 18 | #include "linuxcnc.h" ... [10/67] g++ -Ilibpyplugin.so.p -I. -I.. -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -MF libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o.d -o libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -c ../src/emc/pythonplugin/python_plugin.ccFAILED: libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o g++ -Ilibpyplugin.so.p -I. -I.. -Isrc/emc/pythonplugin -I../src/emc/pythonplugin -Isrc/libnml/inifile -I../src/libnml/inifile -Isrc -I../src -I/usr/include -I/usr/include/python2.7 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DULAPI -DUNIT_TEST -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=64 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x4000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -Wl,--build-id=sha1 -ftrivial-auto-var-init=zero -mrelax-cmpxchg-loop -gz=zstd -ffunction-sections -m64 -march=westmere -mtune=sapphirerapids -fasynchronous-unwind-tables -Wp,-D_REENTRANT -Wno-error=implicit-function-declaration -fPIC -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd -fPIC -DBOOST_ALL_NO_LIB -MD -MQ libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -MF libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o.d -o libpyplugin.so.p/src_emc_pythonplugin_python_plugin.cc.o -c ../src/emc/pythonplugin/python_plugin.cc../src/emc/pythonplugin/python_plugin.cc: In constructor ‘PythonPlugin::PythonPlugin(_inittab*)’:../src/emc/pythonplugin/python_plugin.cc:297:24: error: ‘Py_DecodeLocale’ was not declared in this scope 297 | wchar_t program = Py_DecodeLocale(abs_path, NULL); | ^~~~~~~~~~~~~~~../src/emc/pythonplugin/python_plugin.cc:298:23: error: cannot convert ‘wchar_t’ to ‘char*’ 298 | Py_SetProgramName(program); | ^~~~~~~ | | | wchar_tIn file included from /usr/include/python2.7/Python.h:130, from /usr/include/boost/python/detail/wrap_python.hpp:178, from /usr/include/boost/python/detail/prefix.hpp:13, from /usr/include/boost/python/ssize_t.hpp:9, from /usr/include/boost/python/object.hpp:8, from ../src/emc/pythonplugin/python_plugin.hh:25, from ../src/emc/pythonplugin/python_plugin.cc:19:/usr/include/python2.7/pythonrun.h:22:36: note: initializing argument 1 of ‘void Py_SetProgramName(char)’ 22 | PyAPI_FUNC(void) Py_SetProgramName(char *); | ^~~~~~../src/emc/pythonplugin/python_plugin.cc:313:42: error: void value not ignored as it ought to be 313 | PyObject *module = tab.initfunc(); | ~~~~~~~~~~~~^~../src/emc/pythonplugin/python_plugin.cc:326:3: error: ‘Py_UnbufferedStdioFlag’ was not declared in this scope 326 | Py_UnbufferedStdioFlag = 1; | ^~~~~~~~~~~~~~~~~~~~~~ninja: build stopped: subcommand failed.
— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/3197#issuecomment-2439002959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FMLY3YJKFUBUH7J5ILZ5LD67AVCNFSM6AAAAABQFV66TOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGAYDEOJVHE . You are receiving this because you were assigned.Message ID: @.***>
@ fenrus75: As per version 2.9 LinuxCNC is on Python 3.x. The check for 2.7 may be related to compatibility with older distros. I am currently running LinuxCNC on Debian 12 with Python 3.12.
@ K1ngfish3r: I am not very experienced with Ninja, so I cannot comment on why Ninja failed. For building LinuxCNC from source I used the instructions posted here: https://linuxcnc.org/docs/html/code/building-linuxcnc.html While compiling on Clear Linux, I ran into so many dependency issues that at one moment I simply stopped as it took me too much time. So I cannot give you a full list of missing dependencies, but I will see if I can dive into my compile history and dig up some info on that. Please notice that although the referred instructions are geared towards compiling on Debian, LinuxCNC is running on many distros and platforms, including Arch Linux , AAch64 (ARM), and even Raspberry Pi.
For questions about compiling LinuxCNC it may be best to join the LinuxCNC forum as there are members much more knowledgeable than me, and in particular start or join discussions here: https://forum.linuxcnc.org/9-installing-linuxcnc
didn't realize itwas using a subdir. python2 not required can confirm
I spent way too much time on BLT tho
I still don't know why it won't work
Will post detailed steps soon
Autospec notes
Buildreqs yapps (NEW) bwidget tclX
Yapps
URL=https://files.pythonhosted.org/packages/7a/53/e6b985ee650378b985c2f7fa74242b64554ddb06740bfe8b0a758b868832/Yapps-2.2.0.tar.gz License: MIT
no notes, autospec picks it up - for-review.txt
BWidget
CL repo = https://github.com/clearlinux-pkgs/bwidget URL=http://downloads.sourceforge.net/tcllib/bwidget-1.10.0.tar.gz
No notes, autospec picks it up - for-review.txt
tclX
CL repo = https://github.com/clearlinux-pkgs/tclX URL= https://github.com/flightaware/tclx/archive/refs/tags/v8.6.3.tar.gz
No notes, autospec picks it up - for-review.txt
LinuxCNC
URL = https://github.com/LinuxCNC/linuxcnc/archive/refs/tags/v2.9.3.tar.gz License = GPL-2.0
subdir - src
build_pattern - autogen
buildreq_add
systemd-dev
libmodbus-dev
glib-dev
gtk3-dev
psmisc-bin
yapps
man-db-bin
intltool-bin
boost-dev
python3-dev
bwidget
tclx-dev
pygobject-python3
python3-tcl
glu-dev
libXmu-dev
asciidoc
groff
buildreq_ban - pypi(tkinter)
configure
--prefix=/usr
--enable-non-distributable=yes
--with-realtime=uspace
--with-boost-python=boost_python$(python3 --version | awk '{print $2}' | cut -d '.' -f 1-2 | tr -d '.')
--disable-gtk2
install_prepend - sed -i 's/INSTALL=install -o root/INSTALL=install/' ./src/Makefile
OPTIONAL
BLT
URL=http://downloads.sourceforge.net/blt/BLT2.4z.tar.gz License = MIT steps taken from src.fedora
series blt2.4z-patch-2 blt2.4z-patch-64 blt2.4-tk8.5.patch blt2.4z-destdir.patch blt2.4z-norpath.patch blt2.4z-noexactversion.patch blt2.4z-zoomstack.patch blt2.4z-tk8.5.6-patch blt2.4z-tcl8.6.patch blt2.4z-tk8.6.patch blt-configure-c99.patch
build_pattern - configure
buildreq_add
tcl-dev
tk-dev
build_prepend
# Fix bad interpreter path
sed -i -e 's#/usr/local/bin/tclsh#/usr/bin/tclsh#' demos/scripts/page.tcl
# Rename a couple of files that conflict with other packages
mv man/graph.mann man/bltgraph.mann
mv man/bitmap.mann man/bltbitmap.mann
configure
--prefix=/usr
--with-tcl=%{_libdir}
--with-tk=%{_libdir}
--with-x --x-includes=%{_includedir}
--x-libraries=%{_libdir}
--includedir=%{_includedir}/%{name}
--with-blt=%{_datadir}/tcl8.6/
make_command - pushd src/shared; make; popd; make mkdirs
install_prepend
for file in demos/*.tcl ; do
sed -i -e 's#../src/bltwish#/usr/bin/wish#' $file
done
sed -i -e 's#../bltwish#/usr/bin/wish#' demos/scripts/xcolors.tcl
install_append - rm -rf %{buildroot}%{_mandir}/
I was wondering if there is a status update on this.
--enable-non-distributable=yes
I did attempt to package this. The biggest issue is that the LinuxCNC team itself thinks one of the produced binaries has a license conflict between GPL2.0 and GPL3.0 when building a binary for redistribution. Since that's what we're trying to do, we're kind of stuck until/unless they fix it or decide that it's not a conflict.
Which binary are you referring to?
linuxcnc itself. We only have GPL3 libreadline.
checking whether readline license is compatible with GPL-2... no
configure: WARNING: The LinuxCNC binary you are building may not be
distributable due to a license incompatibility with LinuxCNC (some portions
GPL-2 only) and Readline version 6 and greater (GPL-3 or later).
configure: error: To configure LinuxCNC in this way, you must
invoke configure with "--enable-non-distributable=yes". Note that on
Debian-based systems, you may be able to use libeditreadline-dev or
libreadline-gplv2-dev instead of libreadline-dev.
https://github.com/LinuxCNC/linuxcnc/blob/8afe7129a5f49a3972b982cdc74d1b18e87eef37/src/configure.ac#L129-L138:
NONDISTRIBUTABLE=false
AC_ARG_ENABLE(non-distributable,
AS_HELP_STRING(
[--enable-non-distributable],
[To build LinuxCNC even if a license problem would render the resulting binaries non-distributable under the terms of the LinuxCNC license]),
[
case "$enableval" in
(yes) NONDISTRIBUTABLE=true ;;
esac
])
It is my understanding that for the Debian version of LinuxCNC libeditreadline-dev was used as a GPL-v2 compliant alternative to libreadline and to avoid GPL-v3 conflicts. Could that somehow be an option for Clear Linux?
That's a good catch, thanks.
I spent several hours today working on this, fixing some bugs to actually get it to use our readline alternative libedit, then some other silly compilation problems. Eventually I was able to build it and install it locally on my machine. But it doesn't run. There are more clunky TCL issues that have to be sorted out, plus it's really not happy running on a non-RT kernel, and there is at least one required config file (rtapi.conf) that I'd have to rewrite a chunk of the code to make it work in our stateless environment. The deeper I get into this, the less confident I can make it fit and work well within the characteristics of Clear Linux. The upstream website strongly recommends running it in their own custom Debian image, with the realtime kernel build they provide. I'm inclined to recommend that versus trying to find an acceptable level of functionality in Clear Linux. The lack of a packages in Fedora, Ubuntu, and Arch suggests they've had no more luck than me. I'll take a look at the Debian package to see if there's anything to get me unstuck.
I have something that might work, or will probably break. We don't currently have Tclx or BLT, which some of the models depend on. Look for the linuxcnc bundle in the next few releases.
The use of a real-time kernel is crucial for LinuxCNC, as the timing of two threads, called the base thread and servo thread, depend on it. The CNC controller hardware needs to be fed with a strictly timed stream of data. Together with isolating cores from the general scheduler, the real-time kernel ensures the strict timing requirements, more or less similar to how a MCU would do.
The fact that the LinuxCNC team recommends the use of their own Debian build, is because that is what they have been using as their own default since the early days of LinuxCNC, in conjunction with the XFCE desktop environment. And especially for non-developers that would be the preferred way to go as the Debian distro of LinuxCNC basically works out of the box. However, many people with more advanced Linux skills have LinuxCNC running on their preferred distro. I have machines running on Debian, LinuxMint, Armbian (on Orange Pi 5) and Arch Linux, while others have successfully installed LinuxCNC on openSuse, Gentoo, Puppy Linux and others, and even on Raspberry Pi.
The primary reason for me to be interested in having LinuxCNC running on Clear Linux is because I really like the concept of CL. And I thought that with the inside processor knowledge of the CL team, given its ties with Intel, LinuxCNC on CL might be able to outperform other distros, which would make it a very interesting combination.
One more thing..... When running LinuxCNC, use one of the sim models for testing. Trying to run a real machine will fail if the related controller hardware (e.g. Mesa controller card) is not installed. If a sim model starts correctly, the next step I would recommend is to close LinuxCNC and run the Latency Test or Latency Histogram program. That should reveal the system's real-time performance. There is a lot of information about that in the LinuxCNC documentation and on the forum, and how to reduce latency jitter.
As LinuxCNC requires PREEMPT_RT, I think running CL with ClearMod (XanMod Kernel for CL) with RT patch may be a viable option.
I'll put linuxcnc in the maker-cnc bundle. The python graphics deps have been a challenge.
I would strongly recommend to create a separate bundle for LinuxCNC, as the LinuxCNC program is a machine controller and no serious CNC guy would run Inkscape, OpenSCAD or other programs on a machine controller. Those apps should run on a designer PC, not on a real time machine controller. So installing such programs together with LinuxCNC really does not make sense. Instead I would recommend to create a bundle that will turn a vanilla Clear Linux installation in a properly tuned real time CNC machine controller, nothing more, nothing less.