pixlet icon indicating copy to clipboard operation
pixlet copied to clipboard

Statically-link libwebp?

Open tmcw opened this issue 2 years ago • 2 comments

Hi! Thanks for providing a Linux binary for pixlet. I'm trying to run this on a Synology NAS, and there's a tremendous amount of yak-shaving required, mainly because this pixlet binary relies on libwebp, which is not installed by default in Synology, and the version that is supported by opkg is slightly different (1.2.1 rather than 1.2.2). Would it be possible to statically link, or provide a static version, of this binary, for folks trying to host their own pixlet apps?

tmcw avatar Feb 26 '22 17:02 tmcw

I tried installing pixlet on my Ubuntu 22.04 distribution yesterday, but Ubuntu ships a different version of libwebp lib than what pixlet expects. So I too think hard linking would be nice and a valuable change for the Tidbyt app developers and users that run Linux.

snorremd avatar Jul 24 '22 15:07 snorremd

I'm having this same problem on Fedora too.

kudos avatar Aug 30 '22 09:08 kudos

Hey folks! So sorry for the delay on this issue. This should be resolved as of v0.22.4. Please let me know if you have any additional issues!

Issue

When I had added ARM support for Linux, I thought for sure the produced binaries were statically linked. It turns out, my build command was correct, but there was a string matching issue in my shell script so the correct build command wasn't being called 😭 . I resolved this in #459 when adding support for Windows.

Tests

I tested this by creating a fresh digital ocean instance and pulling the produced binaries:

root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# curl -LO https://github.com/tidbyt/pixlet/releases/download/v0.22.4/pixlet_0.22.4_linux_amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 14.9M  100 14.9M    0     0   9.9M      0  0:00:01  0:00:01 --:--:-- 14.1M
root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# tar -xvf pixlet_0.22.4_linux_amd64.tar.gz
LICENSE.txt
README.md
pixlet
root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# chmod +x pixlet
root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# ./pixlet version
Pixlet version: v0.22.4
root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# curl -LO https://raw.githubusercontent.com/tidbyt/pixlet/main/examples/bitcoin.star
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1371  100  1371    0     0   7211      0 --:--:-- --:--:-- --:--:--  7215
root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# ./pixlet render bitcoin.star --gif -m 10
[bitcoin.star] Miss! Calling CoinDesk API.
root@ubuntu-s-1vcpu-2gb-amd-sfo3-01:~# exit
logout
Connection to 147.182.224.167 closed.

bitcoin

betterengineering avatar Oct 29 '22 19:10 betterengineering