hello everyone. Im new to the tidbyt and to coding in general. the thing that hooked me to tidbyt was being able to code for it with its opensource api. recently I stumbled across pixlet. I was able to get it on my mac very easily using hombrew but what im trying now is to get it on a linux. specifically a raspberry pi. i was able to download the tar.gz file and extract it no problem but im not too sure how to install it. ive tried ./configure and no luck ive also managed to install libwebp per the instructions but not sure what to do from here. any suggestions greatly appreciated. thanks all!!
I’m guessing the problem is that go-libwebp (the Go bindings for libwebp
) doesn’t properly support ARM. I’ve opened an issue on GitHub to look into this:
Thanks for looking into it! In the meantime ill play around with it on the mac. meanwhile trying different ways to install on the PI
Hi,
I was able to build pixlet on a raspberry pi. I did it using docker, I didn’t want to install Go on the raspberry, but should work the same.
Steps to build Pixlet (you need Go installed):
$ apt update; apt install git libwebp-dev -y
$ git clone https://github.com/tidbyt/pixlet.git
$ cd pixlet
$ go get ./...
$ go build
$ file pixlet
pixlet: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, Go BuildID=L3SCqJY0UVob0DlCsab-/JlBN1p2CjnW7_tJp8Oed/kcojjphELWPIAAwwbtPA/BVl4n6uRF2oPpfNGuL_a, BuildID[sha1]=1b1b26f571888886a3ac1c12d0880b75728c9ed9, not stripped
I hope that helps.
That sounds promising. I will follow the steps and see what I get, thanks so much for the help.
Thanks @deyavito! So I guess if Go and libwebp-dev
are installed it should “just work”. That’s great.
Yeah, at least that worked for me. If anyone else could confirm it’d be great.
hello, im trying the above steps to get this thing working and am running into a little problem. if you could shine some light on it, I have go installed and libwep but when I do the “go get ./…” it give me some errors. am I supposed to add the url after “go get” or do it exactly like you have it written down. ive tried both your way and adding a url to the pixlet github with no success. further more when i try go build i get the same output as the go get. here is what im getting.
runtime
/usr/local/go/src/runtime/mgclarge.go:320:6: s.scavenged undefined (type *mspan has no field or method scavenged)
/usr/local/go/src/runtime/mgclarge.go:323:6: s.hugePages undefined (type *mspan has no field or method hugePages)
/usr/local/go/src/runtime/mgclarge.go:390:13: s.hugePages undefined (type *mspan has no field or method hugePages)
/usr/local/go/src/runtime/mgclarge.go:391:16: s.scavenged undefined (type *mspan has no field or method scavenged)
/usr/local/go/src/runtime/mgclarge.go:396:9: mheap_.free undefined (type mheap has no field or method free)
/usr/local/go/src/runtime/mgclarge.go:398:7: s.scavenged undefined (type *mspan has no field or method scavenged)
/usr/local/go/src/runtime/signal_unix.go:517:5: crashing redeclared in this block
previous declaration at /usr/local/go/src/runtime/signal_sighandler.go:15:5
/usr/local/go/src/runtime/signal_unix.go:522:5: testSigtrap redeclared in this block
previous declaration at /usr/local/go/src/runtime/signal_sighandler.go:20:5
/usr/local/go/src/runtime/signal_unix.go:536:6: sighandler redeclared in this block
previous declaration at /usr/local/go/src/runtime/signal_sighandler.go:33:69
/usr/local/go/src/runtime/stubs32.go:14:6: call16 redeclared in this block
previous declaration at /usr/local/go/src/runtime/stubs.go:287:55
/usr/local/go/src/runtime/mgclarge.go:398:7: too many errors
i did get pixlet onto the pi and i was able to get into the dir using cd, am i missing something ? i can send screen shots if need be. when i peek into the pixlet dir using ls pixlet i see
“doc encode examples fonts go.mod go.sum LICENSE.txt main.go push.go README.md render render.go renovate.json runtime serve.go”
Im stuck. sorry for being such a noob if this is an easy fix. thanks again for the input i appreciate you guys
edit looks like I did not install Go properly. I had to find 3 different tutorials online and found one that worked. i finally got “go get” working and it downloaded everything. i was able to get go build to build pixlet and i also got the "pixlet elf " output. thanks very much. the website i used for the go tutorial was “https://www.e-tinkers.com/2019/06/better-way-to-install-golang-go-on-raspberry-pi/”
Thanks for sharing how you managed to install go on the raspbery pi. I had docker installed and went that route directly (pulled golang docker container and built pixlet from there).
@rohan Is it possible that the pixlet binary will be also released for ARM in near future?
I tried my best to get it compiled on my raspberry but could not get it to work…
Have you tried the instructions outlined here?
I actually started a golang docker container as stated here:
and then ran these commands:
When I run the binary I get either
bash: ./pixlet: No such file or directory
or inside the docker container I get:
./pixlet: error while loading shared libraries: libwebpdemux.so.2: cannot open shared object file: No such file or directory
I think no matter if I can manage to get the binary build on ARM, the right way would be that the tidibyt team compiles and releases the binary for ARM as they do for AMD
@deyavito Can you please give more details which docker container you have used?
I have used golang:latest and arm64v8/golang.
My system (via “uname -m”) is aarch64
edit: I went a bit deeper. It seems this is because some shared libraries are missing as the one error suggests. I am not able to install them due to missing previledges on the system pixlet should run… Any suggestions? Can I somehow put the shared libraries in the same folder as the pixlet binary?
edit2: It seems that the problem is the libwebp library. The binary wants the libwebp.so.6 file which is not included in all of the latest releases of the lib (it always includes libwebp.so.7). When I include some old version e.g. 0.5.2-r0 (1.2.0-r2 is the latest) then I get the libwebp.so.6 but then libwebpdemux.so.3 is missing (which is always included in the later version). Can the dev team maybe say which versions of the libraries I need to install?
FYI: I also asked in the Home Assistant forum for help which is the target system where I want to automate the updating of my custom app (to show the status of my smart home on the Tidbyt): How to run a binary in a script that needs dynamic libraries? - Configuration - Home Assistant Community (home-assistant.io)
Hi folks!
So sorry for the issues here. We just added Linux ARM64 support to Pixlet version v0.8.4 so this should now be resolved. On Linux, the webp libraries are statically linked so all you need to do is get the binary and put it in your path. Something like:
curl -LO https://github.com/tidbyt/pixlet/releases/download/v0.8.4/pixlet_0.8.4_linux_arm64.tar.gz
tar -xvf pixlet_0.8.4_linux_arm64.tar.gz
sudo mv pixlet /usr/local/bin
I’m trying to set up my Raspberry Pi running Raspbian to render my app using cron, and I’ve written a .sh file that basically runs an associated Python script then renders / pushes the .star file to the Tidbyt. When I run the .sh file using bash from the terminal, everything works great. However, I’ve added it as a Cron Job, but it fails because: “/home/pi/scripts/push.sh: line 2: pixlet: command not found.” It runs the python script A-OK, but for some reason isn’t able to find pixel and I have no clue why. For reference, I store my .sh files, .py files, and .star files all in the same spot (scripts folder within pi), and my cron setup is below:
SHELL=/bin/bash
PATH=/usr/sbin:/usr/bin:/sbin:/bin
0 * * * * bash /home/pi/scripts/pull_data.sh
* * * * * bash /home/pi/scripts/push.sh
Does anyone see what I might be doing wrong here / why it can’t find pixlet in the Cron Job while it’s fine elsewhere?
Where did you put the pixlet executable? If it’s not in any of those directories in your specified PATH, the job won’t find it.
When you run
echo "$PATH"
Does it match what you have listed at the top of your crontab file? I was running in to the same issue with my pi and added the result of that command at the top of my .sh file and it fixed it.
So setting the first line of my shell script to PATH=mypath worked for me.
I get this error message when I try to serve a .star file
pi@raspberrypi:~/pixlet $ pixlet serve ~/tidbyt-apps/temp.star
bash: /usr/local/bin/pixlet: det går inte att köra binär fil: Formatfel på körbar fil
The Swedish part says “not possible to run binary file: Wrong format on file”
Looks like the pixlet executable is not compatible with your system. Where did you get it?