Thank you, Michael.

I am using a brand new RPi4 so, yes, it is buster.  Set up using
machinekit-hal as instructed.  Getting the same link error.
Compiling hal/utils/halcmd_commands.c
Compiling hal/utils/halsh.c
Linking hal.so
Compiling hal/utils/halcmd_main.c
Compiling hal/utils/halcmd_completion.c
Linking halcmd
/usr/bin/ld: objects/hal/utils/halcmd_commands.o: undefined reference to
symbol '__atomic_load_8@@LIBATOMIC_1.0'
/usr/bin/ld: //usr/lib/arm-linux-gnueabihf/libatomic.so.1: error adding
symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [hal/utils/Submakefile:32: ../bin/halcmd] Error 1
make: Leaving directory '/home/pi/machinekit-hal/src'

Is there an expectation for a specific libatomic version?  The library on
the machine is v1.2.0 not 1.0.n.
It appears the symbol is present in the 1.2 library.
pi@raspberrypi:/usr/lib/arm-linux-gnueabihf $ strings libatomic.so.1.2.0 |
grep __atomic_load
__atomic_load_8
__atomic_load_1
__atomic_load_2
__atomic_load_4
__atomic_load

Ever onward,   Joe
...


On Sun, Oct 27, 2019 at 9:27 PM Michael Brown <[email protected]>
wrote:

> You do not mention which os you are targeting I'll assume its buster from
> snibbles of what you present:
>
> I'm not sure the Machinekit repo is fully prepaired/updated for Debian
> Buster (as the split -cnc/-hal repos are)
> So to build natively for buster I'll recommend cloning the machinekit-hal
> repo <https://github.com/machinekit/machinekit-hal> and following the
> instructions:
>
> If you want to build as a RIP, you need to clone *machinekit-hal*.
>>
>> From the root of that clone run scripts/build_with_cnc
>>
>> This will clone *machinekit-cnc* into the root of the *machinekit-hal*
>>  clone.
>>
>> *machinekit-hal* is built, then *machinekit-cnc* is built with necessary
>> artifacts from *machinekit-hal* build copied over.
>>
>> Then the required libs/binaries/scripts/configs etc are copied into
>> *machinekit-hal* and the environment var is set ready to run the RIP
>>
>
> from the machinekit-cnc repo
> <https://github.com/machinekit/machinekit-cnc>
>
> Personally I prefer having docker installed and cross-building the
> packages via the docker-builder
> <https://github.com/zultron/mk-cross-builder> locally (see Building
> locally  section)
>
> Best wishes
> Michael
>
>
> On Sunday, 27 October 2019 20:08:05 UTC+1, Joseph wrote:
>>
>> Standard 32-bit armhf image.  Built 4.19.y-rt kernel7l image and
>> installed.
>>
>> Joe
>>
>> On Sunday, October 27, 2019 at 11:02:35 AM UTC-7, Michael Brown wrote:
>>>
>>> Are you running a 32-bit(armhf) or 64-bit(arm64) build ?
>>>
>>> Michael
>>>
>>> On Sunday, 27 October 2019 00:35:15 UTC+2, Joseph wrote:
>>>>
>>>> First issue: Tried installing the MK package on RPi4 but get dependency
>>>> error as follows
>>>>
>>>> pi@rpi4-2gb:~ $ sudo apt-get install machinekit-rt-preempt
>>>> Reading package lists... Done
>>>> Building dependency tree
>>>> Reading state information... Done
>>>> Some packages could not be installed. This may mean that you have
>>>> requested an impossible situation or if you are using the unstable
>>>> distribution that some required packages have not yet been created
>>>> or been moved out of Incoming.
>>>> The following information may help to resolve the situation:
>>>>
>>>> The following packages have unmet dependencies:
>>>>  machinekit-rt-preempt : Depends: machinekit (=
>>>> 0.1.1570528621.git9239acb-1~buster) but it is not going to be installed
>>>>                          Depends: yapps2-runtime but it is not
>>>> installable
>>>> E: Unable to correct problems, you have held broken packages.
>>>>
>>>>
>>>>
>>>> Second issue: building MK on RPi4 native and get link error
>>>> /usr/bin/ld: objects/hal/utils/halcmd_commands.o: undefined reference
>>>> to symbol '__atomic_load_8@@LIBATOMIC_1.0'
>>>> /usr/bin/ld: //usr/lib/arm-linux-gnueabihf/libatomic.so.1: error adding
>>>> symbols: DSO missing from command line
>>>> collect2: error: ld returned 1 exit status
>>>> make: *** [hal/utils/Submakefile:32: ../bin/halcmd] Error 1
>>>> make: Leaving directory '/home/pi/machinekit/src'
>>>>
>>>> The library is present and running strings on it shows the symbol is
>>>> available
>>>>
>>>> pi@rpi4-2gb:/usr/lib/arm-linux-gnueabihf $ ls -l libatom*
>>>> lrwxrwxrwx 1 root root    18 Apr 15  2019 libatomic.so.1 ->
>>>> libatomic.so.1.2.0
>>>> -rw-r--r-- 1 root root 30104 Apr 15  2019 libatomic.so.1.2.0
>>>> pi@rpi4-2gb:/usr/lib/arm-linux-gnueabihf $ strings libatomic.so.1.2.0
>>>> fU.+
>>>> fU2+
>>>> __gmon_start__
>>>> _ITM_deregisterTMCloneTable
>>>> _ITM_registerTMCloneTable
>>>> __cxa_finalize
>>>> __atomic_load_8
>>>> memcpy
>>>> __atomic_load_1
>>>> __atomic_load_2
>>>> __atomic_load_4
>>>> __atomic_load
>>>> ...
>>>>
>>>> Has anyone successfully built MK for the RPi4?  If so would you share
>>>> your method?
>>>>
>>>> Thank you,   Joe
>>>>
>>>> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github:
> https://github.com/machinekit
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Machinekit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/machinekit/gUgofN5YAPQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/machinekit/9f8b99a7-da0f-42e6-8e73-b866e7b2c1a8%40googlegroups.com
> <https://groups.google.com/d/msgid/machinekit/9f8b99a7-da0f-42e6-8e73-b866e7b2c1a8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/CABOyrCjNsyQd%3DW-NobJW%3Dx4LnrbjWVxqzy6s3qSdS%2BvJNNm2ew%40mail.gmail.com.

Reply via email to