Problem loading on Pi (arm7)

When trying to load Node-RED snap from beta channel (673) to Pi3 (arm7) I get the following in the logs

2021-02-12T21:01:03Z node-red.node-red[4841]: ERROR: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ cannot be preloaded (cannot open shared object file): ignored.
2021-02-12T21:01:03Z node-red.node-red[4841]: /snap/node-red/673/bin/node: error while loading shared libraries: cannot open shared object file: No such file or directory

I can see files called and in that directory -so where / why isn’t the PLATFORM getting substituted correctly ?

this looks suspiciously like this snap was built in an unclean environment on something like raspiOS, libarmmem is a piOS hack to preload certain functions that library (or any calls to it) should not be inside the snap at all.

EDIT: OOPS, forgot to answer the actual question, libatomic is in the libatomic1 package which should be added to the stage-packages … (perhaps that snapcraft.yaml gives a few more ideas :wink: )

well I let snapcraft do the work so if is “an unclean environment” then yeah so be it… how do we get it cleaned up ?

I did have it in the

      apt-get install libatomic1

section - but yes adding it to stage-packages does seem to fix it…
(well it fixes it up to the point where there is another issue re file permissions - that is being sorted in snapd 29.1…)

Thanks !

1 Like

are you by chance actually just running the snap on a raspiOS install ?

IIRC they add an awful hack to forcefully LD_PRELOAD the lib systemwide to each and every executed binary … you’d have to fix it in the OS (somewhere in /etc/ itself … there is nothing you could do on the snap side …

(note: you will likely see it for all snaps you execute if i’m correct)

The build is happening on snapcraft - the install and run is happening on Raspberry Pi3 with raspios.

sudo snap list
Name      Version      Rev    Tracking       Publisher     Notes
core      16-  10827  latest/stable  canonicalâś“    core
core18    20210128     1989   latest/stable  canonicalâś“    base
node-red  1.2.9        686    latest/edge    noderedteamâś“  -
snapd     11042  latest/stable  canonicalâś“    snapd