When using the source from git master branch build fails because of missing file xfmpc.h mpdclient.c:28:10: fatal error: xfmpc.h: No such file or directory
Similar to the xfce4-notes-plugin.git, it misses XDT_CHECK_PACKAGE([XFCE4VALA], [xfce4-vala], [4.10]) That pkg in turn needs a dependency to libxfce4ui-2
I can reproduce, but it's easy to workaround with the --enable-maintainer-mode flag. (In reply to olaf from comment #1) > Similar to the xfce4-notes-plugin.git, it misses > XDT_CHECK_PACKAGE([XFCE4VALA], [xfce4-vala], [4.10]) > That pkg in turn needs a dependency to libxfce4ui-2 It did not help, I get: checking for xfce4-vala >= 4.10... not found *** The required package xfce4-vala was not found on your system.
(In reply to Andre Miranda from comment #2) > I can reproduce, but it's easy to workaround with the > --enable-maintainer-mode flag. --enable-maintainer-mode flag is there but I still get the error.
Created attachment 8396 full build log
Andre Miranda referenced this bugreport in commit 8c23fcea5520023ad7eeb0b19ddb4694cf186a89 Fix autotools warnings (Bug #15270) https://git.xfce.org/apps/xfmpc/commit?id=8c23fcea5520023ad7eeb0b19ddb4694cf186a89
Please try again with the latest changes.
(In reply to Andre Miranda from comment #6) > Please try again with the latest changes. Still getting the same error. https://build.opensuse.org/build/X11:xfce:rat/openSUSE_Tumbleweed/x86_64/xfmpc/_log You can see the full spec file used for the build here: https://build.opensuse.org/package/view_file/X11:xfce:rat/xfmpc/_service:set_version:xfmpc.spec?expand=1 Please let me know what other infos I should provide.
vala is required, configure does not check for it. The Makefile lacks dependencies. There is no rule to state the fact that mpdclient.c depends on xfmpc.h. I briefly asked google, but it was not obvious how to do it.
I noticed that it won't work without --prefix=/usr, can you try with the prefix where vala is installed?
I was able to successfully build it by using make %{?_smp_mflags} -O -j1 V=1 instead of the default -j4 used by the rpm macro %make_build. Somehow allowing more than 1 job at once fails to build. Please double check.
Indeed "./autogen.sh && make -j1" works, so it seems to be a race condition. Unfortunately my autotools knowledge is limited, I tried to check how vala-based Gnome apps are configured, but they use meson. Sorry, but I'm out of ideas :/
Fwiw, adding 'mpdclient.c: $(srcdir)/xfmpc_vala.stamp' to src/Makefile.am seems to help here, that ensures the valac generator is run to generate xfmpc.h before trying to build mpdclient.c. Just a shot in the dark :)
Created attachment 8579 xfmpc.diff Thanks Landry for the hint, it fixes the problem for me. @Maurizio, @Olaf, before I push this to master, can you guys give the patch a try?
yes the patch seems to work
note that there might be a better idiom, hardcoding 'xfmpc_vala.stamp' feels wrong..
We can also use BUILT_SOURCES = xfmpc_vala.stamp to force the vala build before other builds. Also note that the problem is only present when building from git (a.k.a maintainer mode), the releases tarball includes xfmpc.h We don't need xfce4-vala anymore (which is kinda "deprecated") as libxfce4util and libxfce4ui have native vala support (via gobject introspection).
Andre Miranda referenced this bugreport in commit 24c45a19e4556f4e53ee251e039d29cbe52bc725 Fix git master build (Bug #15270) https://git.xfce.org/apps/xfmpc/commit?id=24c45a19e4556f4e53ee251e039d29cbe52bc725
(In reply to Skunnyk from comment #16) > We can also use BUILT_SOURCES = xfmpc_vala.stamp to force the vala build > before other builds. I went with this approach because it feels less wrong than Landry's :) > We don't need xfce4-vala anymore (which is kinda "deprecated") as > libxfce4util and libxfce4ui have native vala support (via gobject > introspection). I'm not sure xfmpc uses xfce4-vala, there is an entry in the NEWS file telling it was removed in version 0.2.1. Do you mean removing .vapi files of third-party folder? Like this one you added 9 years ago :) https://git.xfce.org/apps/xfmpc/commit/?id=1e0602f93fefb64ec9005c08fe6db1c870599a1d Then patches are more than welcome.