gigitux / youpforwhatsapp

A simple wrapper written in rust and gtk-rs for whatsapp web
MIT License
84 stars 9 forks source link

Compiles but doesn't run on musl linux 'g-file-error-quark' '/app/share/com.gigitux.youp/com.gigitux.youp.gresource' #64

Open Rabioli opened 2 years ago

Rabioli commented 2 years ago

It was quite hard to get it to even compile since no deps are listed anywhere. Once it did and I try to run the binary, I get the following error:

$ ./youp                                  
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { domain: g-file-error-quark, code: 4, message: "Failed to open file “/app/share/com.gigitux.youp/com.gigitux.youp.gresource”: open() failed: No such file or directory" }', src/main.rs:20:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Reading the error I guess it is failing because it is hardcoded to work with flatpak because that's a flatpak path, is this a correct assumption?

I have to mention that rust have good support for linux musl, I have other programs self compiled or using the package manager written in rust that work just fine.

Info on the compiled binary:

$ youp                                        
youp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, BuildID[sha1]=bef6b11abcb04cc76df398a169e2b6e49a5b308d, with debug_info, not stripped
yash: no such command `youp'
bordam commented 2 years ago

On Arch I was able to get around this replacing /app/share/com.gigitux.youp/com.gigitux.youp.gresource with /usr/share/com.gigitux.youp/com.gigitux.youp.gresource in src/main.rs. Don't know if this is a correct way to fix the issue