way-cooler / rust-wlc

[DEPRECATED] Rust bindings for wlc, the Wayland compositor library
54 stars 12 forks source link

Statically link to wlc #55

Closed SnirkImmington closed 7 years ago

SnirkImmington commented 7 years ago

We have had various issues filed in Way Cooler about the window manager not working because wlc was not installed, or was the wrong version. We have mentioned this as a way-cooler issue and Cloudef has given us suggestions for statically linking to wlc. However, we need to statically link in rustwlc, not way-cooler; we can also pass these benefits on to other window managers who use it.

We will look into providing this as a feature flag, possibly in conjunction with a wlc-sys crate.

Timidger commented 7 years ago

Started work on static linking f7993ffd12f4cbf0b74ddf70118f0dffad5511c9.

Tried to compile Way Cooler against it, ran into undefined reference errors. Checked the internals of the statically compiled library, looks like that there are certain things it does not compile into the static library. For example, libwayland-*. A custom build script will be needed to tell ~Way Cooler~ rust-wlc to build against those dynamic libraries.

EDIT: Note that chck, the helper library/framework/project that is used in wlc, is also not compiled in... It is very unlikely to be installed on user's machines and so the cmake script will need to be modified to include that as well (all the rest can be assumed to be dependencies the user should install / can be handled by the package manager).

Ultimately, I think we'd just have to wait for wlc to be added to official packages. Sway is now on fedora, which is possible because wlc was added as well

Timidger commented 7 years ago

This is done