[GH-ISSUE #1] [BUG] libayatana is a lazy dependency instead of a linked one #3

Open
opened 2026-02-17 17:16:34 -05:00 by yindo · 21 comments
Owner

Originally created by @Beethoven-n on GitHub (Aug 8, 2025).
Original GitHub issue: https://github.com/Drop-OSS/packages/issues/1

this is getting in the way of making a tauri-independent appimage, @quexeky could you look at this?
https://github.com/Drop-OSS/drop-app/pull/103/#issuecomment-3161699871

Originally created by @Beethoven-n on GitHub (Aug 8, 2025). Original GitHub issue: https://github.com/Drop-OSS/packages/issues/1 this is getting in the way of making a tauri-independent appimage, @quexeky could you look at this? https://github.com/Drop-OSS/drop-app/pull/103/#issuecomment-3161699871
Author
Owner

@quexeky commented on GitHub (Aug 8, 2025):

I'm thinking that the solution is probably something in the build script. I haven't looked much into it, but I believe that there are a few ways to force packaging libraries into the actual binary

@quexeky commented on GitHub (Aug 8, 2025): I'm thinking that the solution is probably something in the build script. I haven't looked much into it, but I believe that there are a few ways to force packaging libraries into the actual binary
Author
Owner

@quexeky commented on GitHub (Aug 8, 2025):

The only way that I've found to do it is by actually including it in the appimage files: https://v2.tauri.app/distribute/appimage/#custom-files

@quexeky commented on GitHub (Aug 8, 2025): The only way that I've found to do it is by actually including it in the appimage files: https://v2.tauri.app/distribute/appimage/#custom-files
Author
Owner

@Beethoven-n commented on GitHub (Aug 8, 2025):

so when is it actually used? how does the lazy part work, and what would happen if you were to actually import it instead?

@Beethoven-n commented on GitHub (Aug 8, 2025): so when is it actually used? how does the lazy part work, and what would happen if you were to actually import it instead?
Author
Owner

@quexeky commented on GitHub (Aug 8, 2025):

The problem is that we don't do that - it's done through libappindicator, which itself is referenced by tauri's System Tray, so unless we want to rewrite that, it's only ever loaded at runtime instead of at compile time. The Lazy part is that "load at runtime" part

@quexeky commented on GitHub (Aug 8, 2025): The problem is that we don't do that - it's done through [libappindicator](https://docs.rs/libappindicator/latest/libappindicator/), which itself is referenced by tauri's [System Tray](https://v2.tauri.app/learn/system-tray/), so unless we want to rewrite that, it's only ever loaded at runtime instead of at compile time. The Lazy part is that "load at runtime" part
Author
Owner

@Beethoven-n commented on GitHub (Aug 11, 2025):

i think the more pressing issue is this kind of breaks the aur package. maybe i should close this and put it in the new packages repo?

@Beethoven-n commented on GitHub (Aug 11, 2025): i think the more pressing issue is this kind of breaks the aur package. maybe i should close this and put it in the new packages repo?
Author
Owner

@quexeky commented on GitHub (Aug 11, 2025):

Don't mind me forgetting that I can transfer issues here lmao. But yeah that's a good point that we need to update the dependencies for the aur package

@quexeky commented on GitHub (Aug 11, 2025): Don't mind me forgetting that I can transfer issues here lmao. But yeah that's a good point that we need to update the dependencies for the aur package
Author
Owner

@Beethoven-n commented on GitHub (Aug 11, 2025):

i would say it should probably be done in a way that Kind of links to it explicitly, at least technically, just so that ldd or readelf can see that it's a dependency so my appimage PR can work, but i think that's probably why paru refuses to install it when you naively add the library to the depends array

@Beethoven-n commented on GitHub (Aug 11, 2025): i would say it should probably be done in a way that Kind of links to it explicitly, at least technically, just so that `ldd` or `readelf` can see that it's a dependency so my appimage PR can work, but i think that's probably why paru refuses to install it when you naively add the library to the depends array
Author
Owner

@DecDuck commented on GitHub (Aug 12, 2025):

I got it to link:

Image

Using the appindicator3-sys package, and then just calling the simplest function in lib.rs like this:

    let _ = unsafe { app_indicator_category_get_type() };
@DecDuck commented on GitHub (Aug 12, 2025): I got it to link: <img width="843" height="77" alt="Image" src="https://github.com/user-attachments/assets/ebada81e-bfa7-4f4c-9ae9-bfe834b3c9a0" /> Using the `appindicator3-sys` package, and then just calling the simplest function in lib.rs like this: ``` let _ = unsafe { app_indicator_category_get_type() }; ```
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

that'll do it lmao
is that in main already?

@Beethoven-n commented on GitHub (Aug 12, 2025): that'll do it lmao is that in main already?
Author
Owner

@DecDuck commented on GitHub (Aug 12, 2025):

Just added to your AppImage PR.

@DecDuck commented on GitHub (Aug 12, 2025): Just added to your AppImage PR.
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

gonna test the build to see if it runs, and then if it uses all the correct libs
thank u

@Beethoven-n commented on GitHub (Aug 12, 2025): gonna test the build to see if it runs, and then if it uses all the correct libs thank u
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

it does not run, it segfaults
/tmp/.mount_Drop_DSS9THz/AppRun: line 6: 1379072 Segmentation fault (core dumped) LD_LIBRARY_PATH=$APPDIR/usr/lib:/usr/local/lib:/usr/lib $APPDIR/usr/bin/$program $@

@Beethoven-n commented on GitHub (Aug 12, 2025): it does not run, it segfaults `/tmp/.mount_Drop_DSS9THz/AppRun: line 6: 1379072 Segmentation fault (core dumped) LD_LIBRARY_PATH=$APPDIR/usr/lib:/usr/local/lib:/usr/lib $APPDIR/usr/bin/$program $@`
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

do i need to do ./optimize-appimage.sh after?

@Beethoven-n commented on GitHub (Aug 12, 2025): do i need to do `./optimize-appimage.sh` after?
Author
Owner

@DecDuck commented on GitHub (Aug 12, 2025):

Tauri should spit out an AppImage of its own, can you see if that runs?

@DecDuck commented on GitHub (Aug 12, 2025): Tauri should spit out an AppImage of its own, can you see if that runs?
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

if it did, i wouldn't have made this PR
but i'll check

@Beethoven-n commented on GitHub (Aug 12, 2025): if it did, i wouldn't have made this PR but i'll check
Author
Owner

@DecDuck commented on GitHub (Aug 12, 2025):

The Tauri AppImage was failing because the exact library we're trying to fix was getting "stripped" out of it. It's the same fundamental issue, I'm just curious if it's a problem with our build script or the actual application.

@DecDuck commented on GitHub (Aug 12, 2025): The Tauri AppImage was failing because the exact library we're trying to fix was getting "stripped" out of it. It's the same fundamental issue, I'm just curious if it's a problem with our build script or the actual application.
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

Image tauri isn't actually spitting out a build
@Beethoven-n commented on GitHub (Aug 12, 2025): <img width="1716" height="246" alt="Image" src="https://github.com/user-attachments/assets/689cd08b-4f49-4e90-9f8b-6fc851732c6d" /> tauri isn't actually spitting out a build
Author
Owner

@DecDuck commented on GitHub (Aug 12, 2025):

Oh right, you're on Arch Linux. Tauri's AppImage builder doesn't play nice with anything other than Ubuntu 22 it seems.

Can you check if you can run the release binary directly?

@DecDuck commented on GitHub (Aug 12, 2025): Oh right, you're on Arch Linux. Tauri's AppImage builder doesn't play nice with anything other than Ubuntu 22 it seems. Can you check if you can run the release binary directly?
Author
Owner

@Beethoven-n commented on GitHub (Aug 12, 2025):

checked.
can't run it, it also segfaults

@Beethoven-n commented on GitHub (Aug 12, 2025): checked. can't run it, it also segfaults
Author
Owner

@DecDuck commented on GitHub (Aug 12, 2025):

Yeah, no idea then. Needs investigation.

@DecDuck commented on GitHub (Aug 12, 2025): Yeah, no idea then. Needs investigation.
yindo changed title from [BUG] libayatana is a lazy dependency instead of a linked one to [GH-ISSUE #1] [BUG] libayatana is a lazy dependency instead of a linked one 2026-06-05 14:27:57 -04:00
Author
Owner

@nek0d3r commented on GitHub (Mar 21, 2026):

This dependency is also the source of some problems I've been having trying to write a NixOS flake that wraps the AppImage using pkgs.appimageTools:

[nek0d3r@ra:~/source/repos/nix-flakes]$ ./result/bin/drop-app 
2026-03-21T17:53:13.512915135-04:00 | INFO | src/lib.rs:288 - initialized drop client
Gtk-Message: 17:53:13.533: Failed to load module "colorreload-gtk-module"
panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libappindicator-sys-0.9.0/src/lib.rs:41:5:
Failed to load ayatana-appindicator3 or appindicator3 dynamic library
libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory
/nix/store/c1l3m7ws7r8h57w5h00ikk64sppbf7xx-libdbusmenu-glib-16.04.0/lib/libdbusmenu-glib.so.4: undefined symbol: g_once_init_leave_pointer
libayatana-appindicator3.so: cannot open shared object file: No such file or directory
/nix/store/c1l3m7ws7r8h57w5h00ikk64sppbf7xx-libdbusmenu-glib-16.04.0/lib/libdbusmenu-glib.so.4: undefined symbol: g_once_init_leave_pointer

This is a bit out of my wheelhouse but I'm hoping I can figure this out as well!

<!-- gh-comment-id:4104534756 --> @nek0d3r commented on GitHub (Mar 21, 2026): This dependency is also the source of some problems I've been having trying to write a NixOS flake that wraps the AppImage using `pkgs.appimageTools`: ``` [nek0d3r@ra:~/source/repos/nix-flakes]$ ./result/bin/drop-app 2026-03-21T17:53:13.512915135-04:00 | INFO | src/lib.rs:288 - initialized drop client Gtk-Message: 17:53:13.533: Failed to load module "colorreload-gtk-module" panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libappindicator-sys-0.9.0/src/lib.rs:41:5: Failed to load ayatana-appindicator3 or appindicator3 dynamic library libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory /nix/store/c1l3m7ws7r8h57w5h00ikk64sppbf7xx-libdbusmenu-glib-16.04.0/lib/libdbusmenu-glib.so.4: undefined symbol: g_once_init_leave_pointer libayatana-appindicator3.so: cannot open shared object file: No such file or directory /nix/store/c1l3m7ws7r8h57w5h00ikk64sppbf7xx-libdbusmenu-glib-16.04.0/lib/libdbusmenu-glib.so.4: undefined symbol: g_once_init_leave_pointer ``` This is a bit out of my wheelhouse but I'm hoping I can figure this out as well!
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Drop-OSS/packages#3