Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] snap: ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so', deb: filename armv7 -> armhf #968

Closed
1 task done
vogler opened this issue Jan 11, 2023 · 12 comments
Labels
packaging For issues regarding packaging and distribution.

Comments

@vogler
Copy link

vogler commented Jan 11, 2023

Checklist

Describe the issue

Everything seems to work, but I'm getting the error messages below on a RPi3.

What operating system and version are you using?

Raspbian GNU/Linux 11 (bullseye)

What architecture are you using?

arm32

What terminal(s) are you running bottom on?

No response

What version of bottom are you running?

0.7.1

How did you install bottom?

snap

How can we reproduce this?

$ bottom
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.
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.
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.
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
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.

Additional information

$ uname -a
Linux rpi3 5.15.61-v7+ #1579 SMP Fri Aug 26 11:10:59 BST 2022 armv7l GNU/Linux
$ cat /etc/ld.so.preload
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so
$ echo $PLATFORM

$ ls /usr/lib/arm-linux-gnueabihf/libarmmem*
/usr/lib/arm-linux-gnueabihf/libarmmem-aarch64.so  /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so
/usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so      /usr/lib/arm-linux-gnueabihf/libarmmem-v8l.so
$ export PLATFORM=v7l 
$ bottom
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.
...
@vogler vogler added the bug Something isn't working the way that is expected. label Jan 11, 2023
@ClementTsang
Copy link
Owner

ClementTsang commented Jan 11, 2023

I don't have a pi3 to test on and I have no idea about snap, so I don't really know if I'll be able to help you much.

Does the armv7 binary in the release page run for you at the very least?

@ClementTsang
Copy link
Owner

Also the binary name is btm, is that a typo?

@vogler
Copy link
Author

vogler commented Jan 11, 2023

Also the binary name is btm, is that a typo?

No, for the snap package there's only bottom.

Does the armv7 binary in the release page run for you at the very least?

Yes, no problem there.

I use arch=$(dpkg --print-architecture) in setup scripts to install the right .deb packages for different machines.
This works well for the release filenames as used e.g. in https://github.com/dandavison/delta/releases
However, armv7 breaks this since $arch is armhf and uname -m is armv7l.
Also, on my RPi4 $arch is armhf which is the right package to install, and not aarch64 as reported by uname -m.

@ClementTsang
Copy link
Owner

No, for the snap package there's only bottom.

Yeah, was just asking as the binary name is btm, not bottom, so that just struck me as weird at first.

Other than that... I'm not really sure what to do from here to help you. I don't run the snap distribution, so I can't really make any changes there. I guess I could add arm-unknown-linux-gnueabihf builds if that'll help.

@ClementTsang ClementTsang added packaging For issues regarding packaging and distribution. and removed bug Something isn't working the way that is expected. labels Jan 11, 2023
@vogler
Copy link
Author

vogler commented Jan 11, 2023

Yea, the binary is called bottom for snap.
Where should I report it to then?

I can also use the .deb for installing, but as I said, the string should be armhf as reported by dpkg.

@ClementTsang
Copy link
Owner

where should I report it to then?

There's a link to contact the package maintainer on snapcraft, I guess there?

.deb

Sorry for the confusion, but is the issue... the file name? As that's named after the Rust target, and I kinda would personally prefer keeping that consistent, though I'm open to changing it.

@ClementTsang
Copy link
Owner

ClementTsang commented Jan 12, 2023

After thinking about it, probably for the better to switch it back to .deb naming conventions. Relevant PR: #969

@vogler
Copy link
Author

vogler commented Jan 12, 2023

Sorry for the confusion, but is the issue... the file name?

Yes, here's what I meant:
https://github.com/vogler/dotfiles/blob/0313517986a252e612c22c12550b7054e0ebcf7b/install/apt.sh#L34-L39

@ClementTsang
Copy link
Owner

ClementTsang commented Jan 12, 2023

Sounds good. I've already added new files (well, renamed old ones) to the 0.7.1 release following standard Debian naming (e.g. bottom_0.7.1_armhf.deb) in the meantime while I figure out this build pipeline, if that'll help.

@ClementTsang
Copy link
Owner

Merged #969, if the file naming issue is dealt with I'll close this issue in a bit, as I don't think I can help you regarding the other issue around the snap.

@vogler
Copy link
Author

vogler commented Jan 12, 2023

Thanks, it's fine, I reported it there and now install from the deb file.

@vogler vogler changed the title [Bug] ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' [Bug] snap: ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so', deb: filename armv7 -> armhf Jan 12, 2023
@vogler
Copy link
Author

vogler commented Jan 17, 2023

To download and install the latest release for your architecture (needs jq):

arch=$(dpkg --print-architecture) # amd64, arm64, armhf on RPi (32bit userland)
curl -s https://api.github.com/repos/ClementTsang/bottom/releases/latest | jq ".assets[] | select(.browser_download_url|test(\"$arch\")) | .browser_download_url" -r | wget -q -O /tmp/bottom.deb -i - && sudo dpkg -i /tmp/bottom.deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging For issues regarding packaging and distribution.
Projects
None yet
Development

No branches or pull requests

2 participants