Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
toyota-corolla0 opened this issue May 30, 2024 · 6 comments
Closed

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

toyota-corolla0 opened this issue May 30, 2024 · 6 comments

Comments

@toyota-corolla0
Copy link

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
Copy link
Contributor

Can you try running without nix?

@toyota-corolla0
Copy link
Author

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
Copy link

FiliTol commented May 30, 2024

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

@toyota-corolla0
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants