terhechte/Ebou

Failing compilation on Linux

fbanning opened this issue · 17 comments

I'm no Rustacean, so I can't help with the coding part but I know my way around the basics of cargo, so I've tried my hand at compiling Ebou on my Linux machine.

I just tried to cargo run it and after installing a few missing development dependencies1 on my OpenSUSE Tumbleweed, I received a lot of error[E0433]: failed to resolve: use of undeclared crate or module during compilation of Ebou itself. Not sure what's missing but here's the error log I collected from cargo run: error-log.txt

If you need any further information or would like me to test some things, I'd be happy to help.

Footnotes

  1. Namely gtk3-devel, libsoup-devel, webkit2gtk3-soup2-devel, webkit2gtk3-devel, webkit2gtk4-devel. I'm not sure which of the webkit2gtk3-* packages were really needed but webkit2gtk4-devel alone was certainly not enough, so I just installed them both for good measure.

Hello, I forked the repository to make it compile and launch on linux (https://github.com/cantudo/Ebou).

The main issue that I have with this, and the reason I do not want to make a pull request is that I had to change the muda dependency for windows and macos too, as the original one was not working on linux, due to some specific dependencies being missing in Cargo.toml (see the commented lines here). The project does not compile if the muda dependency version is different between operating systems. I think the best way to approach this is to uncomment the lines I mentioned in Cargo.toml from the forked muda repository.

This is how it looks on my desktop:
image

@cantudo building on Arch Linux, I get the following error:

/usr/bin/ld: cannot find -lxdo: No such file or 
collect2: error: ld returned 1 exit status

That helps, although on Arch I'm getting the following errors while it's running:

(WebKitWebProcess:2053756): GLib-GObject-CRITICAL **: 20:46:24.133: invalid (NULL) pointer instance

(WebKitWebProcess:2053756): GLib-GObject-CRITICAL **: 20:46:24.133: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

in addition, once signed in, nothing loads, and the output keeps repeating the following:

/home/USER/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.14/src/connect.rs:429 2023-06-16T20:47:31 [DEBUG] - starting new connection: https://social.vivaldi.net/

Hello, I forked the repository to make it compile and launch on linux (https://github.com/cantudo/Ebou).

The main issue that I have with this, and the reason I do not want to make a pull request is that I had to change the muda dependency for windows and macos too, as the original one was not working on linux, due to some specific dependencies being missing in Cargo.toml (see the commented lines here). The project does not compile if the muda dependency version is different between operating systems. I think the best way to approach this is to uncomment the lines I mentioned in Cargo.toml from the forked muda repository.

This is how it looks on my desktop: image

I can confirm it works. Arch Linux 6.3.7-arch1-1, Wayland, sway.
image

Tried installing both using this repo and via cantudo's fork, on Fedora 38, Wayland, Sway.

Both ways, cargo run exits with build failed, the error occuring with openssl-sys v0.9.80.

error: failed to run custom build command for openssl-sys v0.9.80

Caused by:
process didn't exit successfully: /home/marty/git/Ebou/target/debug/build/openssl-sys-4d273fdc11afcca7/build-script-main (exit status: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rustc-cfg=openssl
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_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=OPENSSL_STATIC
cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
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
run pkg_config fail: "PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=\"1\" \"pkg-config\" \"--libs\" \"--cflags\" \"openssl\" did not exit successfully: exit status: 1\nerror: could not find system library 'openssl' required by the 'openssl-sys' crate\n\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'openssl', required by 'virtual:world', not found\n"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this -sys crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the OPENSSL_DIR environment variable for the
compilation process.

Make sure you also have the development packages of openssl installed.
For example, libssl-dev on Ubuntu or openssl-devel on Fedora.

If you're in a situation where you think the directory should be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

$HOST = x86_64-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-gnu
openssl-sys = 0.9.80

Dunno if this is the right place to post this, or if opening an issue on cantudo's fork would be better, but since there's already a linux thread here, I'mma just try it here.

I think this issue is also due to missing dependencies, see this.
Try this:
# dnf install pkg-config openssl-devel

Ight, that makes sense.
Thank you :D

I had to fork muda because an older version of it didn't compile on macOS when the Linux gtk = 0.16.0 was enabled because it conflicted with Dioxus (I don't remember the details). As it seems to work now, moving to official muda would be great.

@cantudo could you create a PR with your changes? I just checked whether they work on macOS and it seems to work fine there.

Once there is a PR I can double-check macOS / Windows support and then streamline this so that basic Linux support also works. Thanks @cantudo already for looking into this!

sure! i will submit a pr

@cantudo @martyTF

I've updated the readme to include the proper Linux requirements. I tested the Ubuntu section, could you say if the Arch and Fedora/RPM sections look correct for you?

e6c9dff

Many Thanks! :)

@terhechte
The arch section at least is wrong, I think the correct line is:

pacman -S gtk3 xdotool libsoup webkit2gtk

All these

xdotool-dev gtk3-devel libsoup-devel webkit2gtk3-soup2-devel webkit2gtk3-devel webkit2gtk4-devel

do not exist in the repos.

I don't recall seeing webkit2gtk in the repos either (at least with autocompletion)

Correction: it does exist

Ok so it builds in release mode, but the webkit2gtk dependency needs to be webkit2gtk-4.1 and the dependencies gst-libav, gst-plugins-base, and gst-plugins-good are needed.

I'll make a PKGBUILD and verify the dependencies further

Alright I've confirmed the dependencies and I've made an AUR package for it: https://aur.archlinux.org/packages/ebou-git

Let me know if there's any issues

Thanks @StandingPadAnimations I've added it to the readme! :)

With this, basic Linux support is there.