HarborWallet / harbor

Ecash management tool
https://harbor.cash
MIT License
133 stars 17 forks source link

Cannot load libxkbcommon-x11.so dep on 'just run' #67

Closed toyota-corolla0 closed 5 months ago

toyota-corolla0 commented 5 months ago

Using nix on debian 12.

user@debian:~/dev/harbor$ just run
RUST_LOG=harbor=debug,iced_wgpu=error,wgpu_core=error,info cargo run 
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.32s
     Running `target/debug/harbor`
 INFO  xkbcommon_dl > Failed loading `libxkbcommon-x11.so.0`. Error: CantOpen(DlOpen { desc: "libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory" })
 INFO  xkbcommon_dl > Failed loading `libxkbcommon-x11.so`. Error: CantOpen(DlOpen { desc: "libxkbcommon-x11.so: cannot open shared object file: No such file or directory" })
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xkbcommon-dl-0.4.2/src/x11.rs:59:28:
Library libxkbcommon-x11.so could not be loaded.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: Recipe `run` failed on line 8 with exit code 101
benthecarman commented 5 months ago

Can you try running without nix?

toyota-corolla0 commented 5 months ago
user@debian:~/dev/harbor$ cargo run
   Compiling harbor v0.1.0 (/home/user/dev/harbor)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/user/.rustup/toolchains/nightly-2024-05-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/user/.cargo/bin:/home/user/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" VSLANG="1033" "cc" "-m64" "/tmp/rustc6PX3MH/symbols.o" "/home/user/dev/harbor/target/debug/deps/harbor-23fdc938f131d80d.0236bv7hk8dqy6vvpbrji2e74.rcgu.o"

I trimmed a large number of directories from the end of the above output.

FiliTol commented 5 months ago

The answer in #68 may be useful to solve also this issue.

toyota-corolla0 commented 5 months ago

The answer in #68 may be useful to solve also this issue.

This fixed the issue for me outside of nix dev enviroment, but this does not fix the issue inside dev enviroment:

user@debian:~/dev/harbor$ export USE_VENDOR_FEATURE=1
user@debian:~/dev/harbor$ just run
RUST_LOG=harbor=debug,iced_wgpu=error,wgpu_core=error,info cargo run --features vendored
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.38s
     Running `target/debug/harbor`
 INFO  xkbcommon_dl > Failed loading `libxkbcommon-x11.so.0`. Error: CantOpen(DlOpen { desc: "libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory" })
 INFO  xkbcommon_dl > Failed loading `libxkbcommon-x11.so`. Error: CantOpen(DlOpen { desc: "libxkbcommon-x11.so: cannot open shared object file: No such file or directory" })
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xkbcommon-dl-0.4.2/src/x11.rs:59:28:
Library libxkbcommon-x11.so could not be loaded.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: Recipe `run` failed on line 8 with exit code 101
TonyGiorgio commented 5 months ago

We just merged a nix+linux fix that might work for both of you. Maybe try that. Otherwise, for lib problems on local environments, you will just have to search online for install the correct dependencies for your machine on your given distro. Our nix flake file can give hints to all of what is needed to be installed on your machine. https://github.com/MutinyWallet/harbor/blob/master/flake.nix

toyota-corolla0 commented 5 months ago

We just merged a nix+linux fix that might work for both of you. Maybe try that. Otherwise, for lib problems on local environments, you will just have to search online for install the correct dependencies for your machine on your given distro. Our nix flake file can give hints to all of what is needed to be installed on your machine. https://github.com/MutinyWallet/harbor/blob/master/flake.nix

The merge fixed this issue. I am now having another issue described in #79. Thanks!