Problems building machinekit-cnc from source

385 views
Skip to first unread message

Michael Labuda

unread,
Jun 20, 2020, 1:14:17 PM6/20/20
to Machinekit
Hello,

I am setting up a development environment and trying to build machine-kit from source, I was able to build machinekit-hal without any problems, but machinekit-cnc is a different story. Following instructions given on https://www.machinekit.io/docs/developing/machinekit-developing/#get-source-and-build I encountered problems immediately as there is no build_with_cnc script included in the machinekit git. I found this script in someone else's repo and copied it over. It started to compile but then failed after it couldn't find /machinekit-cnc/src/libnml/nml/inifile.XX. These appear to be symlinks to some fakeinclude directory. I put in some dummy empty inifile.XX files which got me a bit further but other source files are actually attempting to use an Inifile class that doesn't exist. What's going on here? Did I clone the wrong repo or something?

Thanks,
Michael

ce...@tuta.io

unread,
Jun 20, 2020, 3:08:48 PM6/20/20
to Michael Labuda, Machinekit
Hi,

Jun 20, 2020, 19:14 by michael....@gmail.com:

> Hello,
>
> I am setting up a development environment and trying to build machine-kit from source, I was able to build machinekit-hal without any problems, but machinekit-cnc is a different story. Following instructions given on > https://www.machinekit.io/docs/developing/machinekit-developing/#get-source-and-build> I encountered problems immediately as there is no build_with_cnc script included in the machinekit git.
>
Yeah, the building of Machinekit-CNC is currently broken with work on supporting the EMCApplication work from Zultron. You can read more about it in https://github.com/machinekit/machinekit-hal/issues/267 . I am currently working on it but is it going slower that I would have liked. I am also changing the workflow of the building to be simpler and saner (actually read: So I like it better), so it is pretty unstable at the moment. The Machinekit-CNC will need to be updated to the same style as EMCApplication to actually function.

>
> I found this script in someone else's repo and copied it over. It started to compile but then failed after it couldn't find /machinekit-cnc/src/libnml/nml/inifile.XX. These appear to be symlinks to some fakeinclude directory. I put in some dummy empty inifile.XX files which got me a bit further but other source files are actually attempting to use an Inifile class that doesn't exist. What's going on here? Did I clone the wrong repo or something?
>
No, you cloned the right one. Probably. Checkout the e81023b8b9ae49a9e971d9da6d424297061772bc to use the scripts/build_with_cnc script.

Cern.

>
> Thanks,
> Michael
>
>
>
> --
> website: > http://www.machinekit.io> blog: > http://blog.machinekit.io> github: > https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to > machinekit+...@googlegroups.com> .
> To view this discussion on the web visit > https://groups.google.com/d/msgid/machinekit/85ea14a0-48a5-4b27-b4d0-ebf1fd2d7575o%40googlegroups.com <https://groups.google.com/d/msgid/machinekit/85ea14a0-48a5-4b27-b4d0-ebf1fd2d7575o%40googlegroups.com?utm_medium=email&utm_source=footer>> .
>

Michael Labuda

unread,
Jun 20, 2020, 11:58:48 PM6/20/20
to Machinekit
I checked out that commit id and it built fine. Thanks for your help.

Michael

On Saturday, June 20, 2020 at 3:08:48 PM UTC-4, ce...@tuta.io wrote:
Hi,

Jun 20, 2020, 19:14 by michael...@gmail.com:

> Hello,
>
> I am setting up a development environment and trying to build machine-kit from source, I was able to build machinekit-hal without any problems, but machinekit-cnc is a different story. Following instructions given on > https://www.machinekit.io/docs/developing/machinekit-developing/#get-source-and-build>  I encountered problems immediately as there is no build_with_cnc script included in the machinekit git.
>
Yeah, the building of Machinekit-CNC is currently broken with work on supporting the EMCApplication work from Zultron. You can read more about it in https://github.com/machinekit/machinekit-hal/issues/267 . I am currently working on it but is it going slower that I would have liked. I am also changing the workflow of the building to be simpler and saner (actually read: So I like it better), so it is pretty unstable at the moment. The Machinekit-CNC will need to be updated to the same style as EMCApplication to actually function.

>
> I found this script in someone else's repo and copied it over. It started to compile but then failed after it couldn't find /machinekit-cnc/src/libnml/nml/inifile.XX. These appear to be symlinks to some fakeinclude directory. I put in some dummy empty inifile.XX files which got me a bit further but other source files are actually attempting to use an Inifile class that doesn't exist. What's going on here? Did I clone the wrong repo or something?
>
No, you cloned the right one. Probably. Checkout the e81023b8b9ae49a9e971d9da6d424297061772bc to use the scripts/build_with_cnc script.

Cern.

>
> Thanks,
> Michael
>
>
>
> --
>  website: > http://www.machinekit.io>  blog: > http://blog.machinekit.io>  github: > https://github.com/machinekit
>  ---
>  You received this message because you are subscribed to the Google Groups "Machinekit" group.
>  To unsubscribe from this group and stop receiving emails from it, send an email to > machi...@googlegroups.com> .

徐春淼

unread,
Aug 11, 2020, 5:23:39 AM8/11/20
to Machinekit
I also encountered  the same problem 。I‘ll try this check out later。
You just solved this problem by check out commit id?

在 2020年6月21日星期日 UTC+8上午1:14:17,Michael Labuda写道:

ce...@tuta.io

unread,
Aug 11, 2020, 10:16:15 AM8/11/20
to 徐春淼, Machinekit
Yes, the Machinekit-CNC@master cannot be currently built on top of Machinekit-HAL@master. This was done because the original build flow was extremely inflexible and the precedence was given to option to build Enhanced Machine Controller (which is developed as part of LinuxCNC and the development is much more active than Machinekit's own CNC portions). This is now possible - https://github.com/machinekit/emcapplication and can be previewed by following instructions here: https://github.com/machinekit/EMCApplication/issues/1#issue-666660311 .

I am hoping that Machinekit-CNC will be again buildable on Machinekit-HAL after CMake build system switch, which should filter out problems stemming out from kernel-space module past and streamline the whole operation.

Cern.


Aug 11, 2020, 11:23 by xuchunm...@gmail.com:

> I also encountered  the same problem 。I‘ll try this check out later。
> You just solved this problem by check out commit id?
>
> 在 2020年6月21日星期日 UTC+8上午1:14:17,Michael Labuda写道:
>
>> Hello,
>>
>> I am setting up a development environment and trying to build machine-kit from source, I was able to build machinekit-hal without any problems, but machinekit-cnc is a different story. Following instructions given on >> https://www.machinekit.io/>> docs/developing/machinekit->> developing/#get-source-and->> build>> I encountered problems immediately as there is no build_with_cnc script included in the machinekit git. I found this script in someone else's repo and copied it over. It started to compile but then failed after it couldn't find /machinekit-cnc/src/libnml/>> nml/inifile.XX. These appear to be symlinks to some fakeinclude directory. I put in some dummy empty inifile.XX files which got me a bit further but other source files are actually attempting to use an Inifile class that doesn't exist. What's going on here? Did I clone the wrong repo or something?
>>
>> Thanks,
>> Michael
>>
>
>
>
> --
> website: > http://www.machinekit.io> blog: > http://blog.machinekit.io> github: > https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to > machinekit+...@googlegroups.com> .
> To view this discussion on the web visit > https://groups.google.com/d/msgid/machinekit/2846e9a6-95ea-486f-abcf-44e958b00798o%40googlegroups.com <https://groups.google.com/d/msgid/machinekit/2846e9a6-95ea-486f-abcf-44e958b00798o%40googlegroups.com?utm_medium=email&utm_source=footer>> .
>

Message has been deleted

wadexu

unread,
Aug 11, 2020, 9:47:44 PM8/11/20
to Machinekit
Thank you so much!
Best Regards
Wade Xu

wadexu

unread,
Aug 13, 2020, 4:14:40 AM8/13/20
to Machinekit
Hi, Michael 
   I followed your advice to use the commit id  e81023b8b9ae49a9e971d9da6d424297061772bc  and use the  ./script/build_with_cnc 
   but I forgotted that I was running on a ARM64 board,there are many problems occured。
   Is there a available version on arm64 architecture ?

在2020年8月11日星期二 UTC+8 下午10:16:15<ce...@tuta.io> 写道:

ce...@tuta.io

unread,
Aug 13, 2020, 8:12:47 AM8/13/20
to wadexu, Machinekit
Hi,
the latest Machinekit-HAL should run on arm64 architecture - there is even testing of this: https://travis-ci.com/github/machinekit/machinekit-hal/jobs/371433497 (example of the latest push). I am not completely sure about the commit e81023b8b9ae49a9e971d9da6d424297061772bc, what kind of issue are you experiencing?

Cern.

Aug 13, 2020, 10:14 by xuchunm...@gmail.com:
> To view this discussion on the web visit > https://groups.google.com/d/msgid/machinekit/a74db377-e255-49ac-9545-29180951fa14n%40googlegroups.com <https://groups.google.com/d/msgid/machinekit/a74db377-e255-49ac-9545-29180951fa14n%40googlegroups.com?utm_medium=email&utm_source=footer>> .
>

wadexu

unread,
Aug 13, 2020, 8:43:55 PM8/13/20
to Machinekit

Hi,
         When I install machinekit-hal with commit id  e81023b8b9ae49a9e971d9da6d424297061772bc  ,there is an error that “ rtapi/rtapi_io.h:39:43: fatal error: sys/io.h: No such file or directory”。
         If I install the latest version of machinekit-hal,it will be ok。but after that when I install machinekit-cnc,another error occurred named “
couldn't find /machinekit-cnc/src/libnml/nml/inifile.XX. ” 

Thanks
Wade

Claudio Lorini

unread,
Sep 1, 2020, 4:07:25 PM9/1/20
to Machinekit
Hi all, long time no see!
i'm trying to build EMCapplication for an arm64 platform (Xilinx Zynq Ultrascale), alas things are changed quite a bit from last time i managed to make it work on a Zynq7000 some years ago!   
i think i managed to have machinekit-hal up and running, tests are a go, and i can halrun some examples with halscope and basic functionalities.

Trying setting up EMCapplication following this receipe:
seems to complete without complains, but when i run linuxcnc i get this:

LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/zus/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis_mm.ini'
Starting LinuxCNC...
rtapi_msgd command:  /usr/libexec/machinekit/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288
rtapi_app command:  /usr/libexec/machinekit/rtapi_app --instance=0 --debug=1
Found file(lib): /usr/share/linuxcnc/hallib/core_sim.hal
Found file(lib): /usr/share/linuxcnc/hallib/sim_spindle_encoder.hal
Found file(lib): /usr/share/linuxcnc/hallib/axis_manualtoolchange.hal
Traceback (most recent call last):
  File "/usr/bin/hal_manualtoolchange", line 11, in <module>
    import linuxcnc, hal
  File "/home/zus/machinekit-hal/lib/python/hal.py", line 30, in <module>
    import _hal
ImportError: /home/zus/machinekit-hal/lib/python/_hal.so: undefined symbol: _Py_FalseStruct
/usr/share/linuxcnc/hallib/axis_manualtoolchange.hal:1: hal_manualtoolchange exited without becoming ready
Shutting down and cleaning up LinuxCNC...
LinuxCNC terminated with an error.  You can find more information in the log:...

googling around it could be related to a python2/python3 erroneous configuration.

zus@zus-cl:/usr/bin$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 24  2017 /usr/bin/python -> python2.7

should it be python3? 

sorry for the generic nonsense question, but i couldn't follow the recent developments of the project and in general i know very little 
about (modern) programming :-) 
Is there any suggestion on how to kickstart this? or any suggestion on how to check if i'm working in a 'sane' envoronment?

C.

Michael Brown

unread,
Oct 21, 2020, 5:07:59 PM10/21/20
to Machinekit
Hi Claudio
Im currently involved in creating a new Mksocfpga port for the Myirtech FZ3,
and updating the former ultra96 v1/v2 mksocfpga residents:
So I would very much know the name and brand of the board you are currently working on ?
Best wishes
Michael B.
Reply all
Reply to author
Forward
0 new messages