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

[Linux] failed compilation of dependency: javascriptcore-rs #18

Open
Houkime opened this issue Jul 11, 2023 · 5 comments
Open

[Linux] failed compilation of dependency: javascriptcore-rs #18

Houkime opened this issue Jul 11, 2023 · 5 comments

Comments

@Houkime
Copy link

Houkime commented Jul 11, 2023

OS: Arch Linux (6.4.1 kernel)
/usr/lib/libjavascriptcoregtk-4.0.so is present as a part of webkit2gtk (btw, list it as a dep maybe)
but it misses a pkg-config file so the compilation fails because it depends on it.

Tried:
cargo build --release

output:

warning: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" "pkg-config" "--libs" "--cflags" "javascriptcoregtk-4.1" "javascriptcoregtk-4.1 >= 2.24"` did not exit successfully: exit status: 1

error: failed to run custom build command for `javascriptcore-rs-sys v0.5.1`

Caused by:
  process didn't exit successfully: `/home/user/Ebou/target/release/build/javascriptcore-rs-sys-e2aec79b2d46c4e2/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=JAVASCRIPTCOREGTK_4.1_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" "pkg-config" "--libs" "--cflags" "javascriptcoregtk-4.1" "javascriptcoregtk-4.1 >= 2.24"` did not exit successfully: exit status: 1
  error: could not find system library 'javascriptcoregtk-4.1' required by the 'javascriptcore-rs-sys' crate

  --- stderr
  Package javascriptcoregtk-4.1 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `javascriptcoregtk-4.1.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'javascriptcoregtk-4.1', required by 'virtual:world', not found
  Package 'javascriptcoregtk-4.1', required by 'virtual:world', not found

@Houkime Houkime changed the title [Linux] failed compilation of dependency: javascriptcoregtk-rs [Linux] failed compilation of dependency: javascriptcore-rs Jul 11, 2023
@StandingPadAnimations
Copy link

Can you try and see if the AUR package works? The dependency in question is webkit2gtk-4.1 (webkit2gtk is a different package on Arch Linux)

@Houkime
Copy link
Author

Houkime commented Jul 12, 2023

AUR package works (there is a different bug on login, but it compiles and runs)

@terhechte
Copy link
Owner

@Houkime did you get it to work? I was able to run it without issues on PopOS

@Freyert
Copy link

Freyert commented Oct 15, 2023

pacman -S pacman -S extra/webkit2gtk-4.1 solves that issue, but then we run into some import errors in navicula.

error[E0432]: unresolved import `dioxus_desktop::EvalResult`
 --> /home/fbyrne/.cargo/git/checkouts/navicula-66e4e16cd8702a1c/b7eb3d0/src/types.rs:5:50
  |
5 | use dioxus_desktop::{use_window, DesktopContext, EvalResult};
  |                                                  ^^^^^^^^^^ no `EvalResult` in the root

error[E0425]: cannot find function `use_eval` in crate `dioxus_desktop`
   --> /home/fbyrne/.cargo/git/checkouts/navicula-66e4e16cd8702a1c/b7eb3d0/src/logic.rs:384:32
    |
384 |     let eval = dioxus_desktop::use_eval(cx);
    |                                ^^^^^^^^ not found in `dioxus_desktop`
    |
help: consider importing one of these items
    |
1   + use crate::logic::dioxus_elements::prelude::use_eval;
    |
1   + use dioxus::prelude::use_eval;
    |
help: if you import `use_eval`, refer to it directly
    |
384 -     let eval = dioxus_desktop::use_eval(cx);
384 +     let eval = use_eval(cx);
    |

error[E0599]: no method named `eval` found for reference `&'a Rc<DesktopService>` in the current scope
  --> /home/fbyrne/.cargo/git/checkouts/navicula-66e4e16cd8702a1c/b7eb3d0/src/types.rs:20:21
   |
20 |         self.window.eval(code)
   |                     ^^^^ method not found in `&Rc<DesktopService>`

@Freyert
Copy link

Freyert commented Oct 15, 2023

Following the AUR building with cargo build --release makes it progress much further. You might also need to set the C compiler using CC.

And finally if the ld command says it can't find xdo you're missing the xdotool.

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