How to build it with gtk4-layer-shell feature?
murlakatamenka opened this issue · comments
Hi, thanks for the interesting project!
I have issue building it on my Arch, here is what I tried:
git clone --depth 1 <repo>
cd mixxc
cargo build --release --features=Sass,Wayland
output:
Compiling gdk4-sys v0.7.2
Compiling gsk4-sys v0.7.3
Compiling gtk4-sys v0.7.3
Compiling gtk4-layer-shell-sys v0.1.2
The following warnings were emitted during compilation:
warning: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" "pkg-config" "--libs" "--cflags" "gtk4-layer-shell-0" "gtk4-layer-shell-0 >= 1"` did not exit successfully: exit status: 1
error: failed to run custom build command for `gtk4-layer-shell-sys v0.1.2`
Caused by:
process didn't exit successfully: `/tmp/cargo-installBvtVwJ/release/build/gtk4-layer-shell-sys-3911a91337e99d03/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GTK4_LAYER_SHELL_0_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" "gtk4-layer-shell-0" "gtk4-layer-shell-0 >= 1"` did not exit successfully: exit status: 1
error: could not find system library 'gtk4-layer-shell-0' required by the 'gtk4-layer-shell-sys' crate
--- stderr
Package gtk4-layer-shell-0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk4-layer-shell-0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk4-layer-shell-0', required by 'virtual:world', not found
Package 'gtk4-layer-shell-0', required by 'virtual:world', not found
warning: build failed, waiting for other jobs to finish...
error: failed to compile `mixxc v0.1.5`, intermediate artifacts can be found at `/tmp/cargo-installBvtVwJ`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
While submitting the issue, I've realized I'm missing gtk4-layer-shell
shared, I've installed it via such PKGBUILD
:
# Maintainer: Shengyu Zhang <la@archlinuxcn.org>
# Contributor: Brett Cornwall <ainola@archlinux.org>
# Contributor: Adrian Perez de Castro <aperez@igalia.com>
pkgdesc='A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4'
pkgname=gtk4-layer-shell
pkgver=1.0.1
pkgrel=1
arch=(x86_64 aarch64)
license=(MIT)
url="https://github.com/wmww/gtk4-layer-shell"
depends=(
"gtk4"
"wayland"
)
makedepends=(
"gtk-doc"
"gobject-introspection"
"meson"
"ninja"
"valabind"
"python"
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('f7b8d352065a540d4cb7b0cbfdeb2c2efea55b57cfb717de5c880fde41e65cb1')
build() {
meson setup \
--prefix=/usr \
--wrap-mode=nofallback \
--buildtype=plain \
-Dtests=true \
-Ddocs=true \
-Dintrospection=true \
-Dvapi=true \
-Dexamples=true \
"$pkgname-$pkgver" \
build
ninja -C build
}
# See: https://github.com/wmww/gtk4-layer-shell/issues/12
# check() {
# ninja -C build test
# }
package() {
DESTDIR="$pkgdir" ninja -C build install
install -D -m 644 "$pkgname-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Then mixxc
can be successfully built \o/
Sorry for the noise. Hopefully this issue helps someone.
Cheers!
No problems, gtk4-layer-shell unlike it's gtk3 predecessor is not yet packaged for all Linux distributions.
(I had to make a template for Void Linux myself)
If you have any other questions, or if some things confuse you, feel free to open an issue, this might help me to improve README for everyone else.