Ld.so error on debian on raspberry pi

Still no fix?

Just ran into this on a fresh install.

pi@raspberrypi:~ $ sudo snap install hello-world
2019-10-25T16:05:49-05:00 INFO Waiting for restart…
hello-world 6.4 from Canonical✓ installed
pi@raspberrypi:~ $ hello-world
ERROR: ld.so: object ‘/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so’ from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Hello World!

@willpate that looks like a completely separate issue, so I’ll split your question out to a new topic.

@willpate could you please share the output of snap version and snap debug sandbox-features?

The /usr/lib/arm-linux-gnueabihf/libarmmem.so error is very commonly reported online against various snaps. I believe it’s due to raspbian adding that as an LD preload which is a “Replacement memcpy and memset functionality for the Raspberry Pi with the intention of gaining greater performance.” It comes from https://github.com/simonjhall/copies-and-fills and has been mentioned here Snapd on Raspbian (stretch)

is that file something we can ship on core for armhf?

¯\_(ツ)_/¯
I imagine we’d need to investigate the impact of that on other non-pi devices, review license etc.
Isn’t core only built from things in the Ubuntu archive? So would it need inclusion in main? Security update etc.

it’d only trip up things that have it in ld.so.preload, and it needn’t be the actual thing; an empty file might be enough to silence the error

to be clear: on amd64 at least, creating an empty .c file and building that into an “empty” .so file silences the error:

/tmp$ LD_PRELOAD=/tmp/xyzzy.so /bin/true
ERROR: ld.so: object '/tmp/xyzzy.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
/tmp$ touch xyzzy.c && gcc -shared -fPIC -o xyzzy.so xyzzy.c
/tmp$ LD_PRELOAD=/tmp/xyzzy.so /bin/true
/tmp$ 

@mvo @sil2100 WDYT? this would make some nasty errors go away on raspbian.