Closed Naereen closed 7 months ago
I tried to build OpenSSL from source, and moved the resulting libssl.so.3
file in the same directory as the binary ./aw-watcher-media-player
, I get the same error.
Hello!
when the official ActivityWatch tools all depend on libssl.so.1.1
This crate requires OpenSSL3. Which is why I can't simply build a special binary for older systems without reimplementing the client, unfortunately.
I tried to build OpenSSL from source, and moved the resulting libssl.so.3 file in the same directory as the binary ./aw-watcher-media-player, I get the same error.
This is strange, I would expect it to work even without specifying LD_LIBRARY_PATH
,
LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH aw-watcher-media-player
(it can be configured to be system-wide). sudo make install
had resolved the problem for me./usr/local/lib/libssl.so.3
as the simplest option, then sudo ldconfig
.Hi again @2e3s, Thanks for taking the time to reply, so quickly.
I managed to link the libssl.so.3
and libcrypto.so.3
libraries, using the command you suggested, but now I have:
$ LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH ./aw-watcher-media-player
./aw-watcher-media-player: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./aw-watcher-media-player)
./aw-watcher-media-player: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./aw-watcher-media-player)
./aw-watcher-media-player: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./aw-watcher-media-player)
The three lines of errors are because I apparently have libc.so.6
available at three locations:
$ ls -larth /lib*/**/libc.so.6
lrwxrwxrwx 1 root root 12 nov. 22 14:32 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so*
lrwxrwxrwx 1 root root 12 nov. 22 14:32 /lib/i386-linux-gnu/libc.so.6 -> libc-2.31.so*
lrwxrwxrwx 1 root root 12 nov. 22 14:32 /lib32/libc.so.6 -> libc-2.31.so*
So I guess I'm off compiling libc.so.6? But this could break other programs installed on my machine -- I won't take the risk (like upgrading to a recent Ubuntu, I don't have time now and am a bit afraid of doing so later on).
The three lines of errors are most likely due to the fact that the aw-watcher-media-player
binary requires a version between 2.32, 2.33 and 2.34.
I tried to look for an Ubuntu or Debian package from which I could easily extract a working locally "droppable" version of libc.so.6, but found only 2.31 (the one I have, in Ubuntu focal 20.04), or 2.35 (in Ubuntu 22.04 jammy).
Ah, rather than compiling libc, it makes sense to just recompile aw-watcher-media-player
especially that you already compile alright. That's what I used to do not so long ago being on Ubuntu 21. I think it worked by sudo make install
on OpenSSL3 and then installing libssl-dev
out of box, then cargo build --release
just worked IIRC.
Using https://stackoverflow.com/a/52454710 I compiled locally the GLIBC_2.34 (glibc-2.34.9000
branch) version of the GLIBC.
When launching the aw-watcher-media-player
binary, now I have a segfault error.
I'll stop trying now, it's not reasonable to spend more time on this, even though I would have love to get some ActivityWatch visualizations of what music/videos I'm listening/watching! Regards. -- @Naereen
I tried to build using cargo build --release
but got this error:
cargo build --release
error: failed to parse manifest at `/home/lilian/.local/bin/activitywatch/aw-watcher-media-player/Cargo.toml`
Caused by:
failed to parse the `edition` key
Caused by:
this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.
So I think the issue is quite similar: my old Ubuntu 20.04 has only Cargo 2020 or less, not Cargo 2021.
I guess you've got it from repos, but rust/cargo distribution in Ubuntu should be really old and barely ever useful whatever you use. This and rustc is better to install with https://rustup.rs/ easy and intuitive ( https://www.rust-lang.org/tools/install ).
Thanks again for the suggestion. I'll keep this AW plugin in mind if I ever upgrade my Ubuntu to 22.04 or a more recent version.
Apparently I had cargo and rustc installed using RustUP.rs but still with a 2020 version. Weird, as I remember trying on Rust last summer.
You might already know, just in case, rustup update
should fix it. rustup override set stable
inside the project if there is a different global setting.
Wow building it worked! Yeepee! Now, I can I add visualizations of data extracted from the plugin on the ActivityWatch overview web page? I don't see documentation on that aspect (yet) in the README.
I managed to verify that the buckets of data were correctly implemented (using http://localhost:5600/#/buckets/aw-watcher-media-player_MYMACHINENAME).
There is no urgency what so ever in my last question, don't worry :smile_cat: . Thanks again for your help, and let's keep in touch if you need someone to help testing any new features regarding using this data for vizualisations in the AW overview page.
This is also displayed in http://localhost:5600/#/timeline by the way, which is how I keep track of my data for the most pat. Thank you for your feature request with an example of another watcher with a visualization. I'll look into it after a couple other things.
Hi there, I was/am very interested in using this project. I tried to install it, following the guide, using either the
.zip
or the.deb
file. I got the following issues:With the
.zip
file:I guess I could work around that issue by manually downloading all the required shared libraries (like
libssl.so.3
). But I find it quite weird to be dependent on this latest version, for your tool, when the official ActivityWatch tools all depend onlibssl.so.1.1
.With the
.deb
file:This issue I understand: my system (Ubuntu 20.04 LTS) is too old for this binary to work, right?
Is there a way to solve this issue (other than upgrading my distro)?
Thanks in advance if you think about one.
Apparently wishing for OpenSSL v3+ was meant by the developpers (https://github.com/2e3s/aw-watcher-media-player/blob/main/.github/workflows/release.yml#L20). Regards, -- @Naereen