mate-desktop / mate-utils

GNU General Public License v2.0
39 stars 30 forks source link

FTBFS with --enable-wayland: Comparison operator but no version after package name 'gdk-wayland-3.0' #361

Open bobby285271 opened 8 months ago

bobby285271 commented 8 months ago

Expected behaviour

Building with explicit --enable-wayland succeeds

Actual behaviour

This line:

https://github.com/mate-desktop/mate-utils/blob/a51978473f24f11f4826a20dbd9148474530d652/configure.ac#L239

But neither GTK_LAYER_SHELL_REQUIRED_VERSION nor GDK_WAYLAND_REQUIRED_VERSION is set anywhere (also searched on GitHub to make sure it is not set elsewhere),

$ grep -inr 'GTK_LAYER_SHELL_REQUIRED_VERSION' 
configure.ac:239:WAYLAND_DEPS="gtk-layer-shell-0 >= $GTK_LAYER_SHELL_REQUIRED_VERSION wayland-client gdk-wayland-3.0 >= $GDK_WAYLAND_REQUIRED_VERSION"

$ grep -inr 'GDK_WAYLAND_REQUIRED_VERSION'                     
configure.ac:239:WAYLAND_DEPS="gtk-layer-shell-0 >= $GTK_LAYER_SHELL_REQUIRED_VERSION wayland-client gdk-wayland-3.0 >= $GDK_WAYLAND_REQUIRED_VERSION"

The build complains:

checking for gtk-layer-shell-0 >=  wayland-client gdk-wayland-3.0 >= ... no
configure: error: Package requirements (gtk-layer-shell-0 >=  wayland-client gdk-wayland-3.0 >= ) were not met:

Comparison operator but no version after package name 'gdk-wayland-3.0' in file '(command line arguments)'

The --enable-wayland build succeeds after I removed >= $GTK_LAYER_SHELL_REQUIRED_VERSION and >= $GDK_WAYLAND_REQUIRED_VERSION so I don't think needed libraries (or versions) are missing

Steps to reproduce the behaviour

Build with explicit --enable-wayland (I use release tarballs)

MATE general version

1.28

Package version

1.28

Linux Distribution

NixOS

Link to bugreport of your Distribution (requirement)

(I am the packager?)

lukefromdc commented 8 months ago

Odd that this didn't fail unconditionally. All my tests that worked but should NOT have, I just submitted https://github.com/mate-desktop/mate-utils/pull/362 to fix this.

raveit65 commented 8 months ago

I am still wondering about this report. I built successful mate-utils-1.28.0 with --enable-wayland flag for fedora https://koji.fedoraproject.org/koji/taskinfo?taskID=113969119 I used these BuildRequires and configure options:

BuildRequires: desktop-file-utils
BuildRequires: e2fsprogs-devel
BuildRequires: gtk-layer-shell-devel
BuildRequires: hardlink
BuildRequires: libcanberra-devel
BuildRequires: libgtop2-devel
BuildRequires: libudisks2-devel
BuildRequires: libX11-devel
BuildRequires: libXmu-devel
BuildRequires: make
BuildRequires: mate-common
BuildRequires: mate-desktop-devel
BuildRequires: mate-panel-devel
BuildRequires: mesa-libGL-devel
BuildRequires: popt-devel
BuildRequires: usermode
BuildRequires: yelp-tools

%if 0%{?fedora} && 0%{?fedora} >= 29
BuildRequires: gcc-c++
%endif

%build
%configure \
    --disable-static            \
    --disable-schemas-compile   \
    --enable-gdict-applet       \
    --enable-in-process         \
    --enable-wayland            \
    --enable-gtk-doc-html       \
    --enable-ipv6=yes           \
    --enable-maintainer-flags=no  \
    --with-x

Please show us your config. What package manager is used in NixOs ?

lukefromdc commented 8 months ago

I did find that GTK_LAYER_SHELL_REQUIRED_VERSION was not being defined but being used, so that might be specific to autotools version, compiler version, etc. Thus my PR

bobby285271 commented 8 months ago

Triggered a build on our CI: https://github.com/NixOS/nixpkgs/pull/289062/commits/375421f4cd23988df0cfbe73c2a82db931c8a24e, here is the build log: https://logs.ofborg.org/?attempt_id=c4d11f4c-ed6d-43e7-9656-eb0a36cf0ffb&key=nixos%2Fnixpkgs.289062

And by patching the undefined version requirements: https://github.com/NixOS/nixpkgs/pull/289062/commits/1b9d35e2010eb0369122bb5ad93235ef0524e3a9, the build went fine: https://logs.ofborg.org/?key=nixos/nixpkgs.289062&attempt_id=34a829c3-b186-405d-b459-f650ec352df8

The build log can be fetched as below, click "Details" next to the mate.mate-utils on x86_64-linux item:

Then click "View more details on OfBorg" (below "Partial log")

bobby285271 commented 8 months ago

I searched where the Comparison operator but no version after package message comes from and actually it comes from pkg-config. So this should explain why this cannot be reproduced on Fedora/Debian - https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation is not implemented on NixOS.

lukefromdc commented 8 months ago

https://github.com/mate-desktop/mate-utils/pull/362 is still waiting for a review