! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Xfmpc git master: mpdclient.c:28:10: fatal error: xfmpc.h: No such file or di...
Status:
RESOLVED: FIXED

Comments

Description Maurizio Galli 2019-04-09 04:05:49 CEST
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
Comment 1 olaf 2019-04-09 20:17:08 CEST
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
Comment 2 Andre Miranda editbugs 2019-04-10 05:30:08 CEST
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.
Comment 3 Maurizio Galli 2019-04-10 05:58:11 CEST
(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.
Comment 4 Maurizio Galli 2019-04-10 06:04:18 CEST
Created attachment 8396 
full build log
Comment 5 Git Bot editbugs 2019-04-12 03:12:24 CEST
Andre Miranda referenced this bugreport in commit 8c23fcea5520023ad7eeb0b19ddb4694cf186a89

Fix autotools warnings (Bug #15270)

https://git.xfce.org/apps/xfmpc/commit?id=8c23fcea5520023ad7eeb0b19ddb4694cf186a89
Comment 6 Andre Miranda editbugs 2019-04-12 03:12:48 CEST
Please try again with the latest changes.
Comment 7 Maurizio Galli 2019-04-12 08:54:25 CEST
(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.
Comment 8 olaf 2019-04-12 09:53:07 CEST
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.
Comment 9 Andre Miranda editbugs 2019-04-13 18:40:12 CEST
I noticed that it won't work without --prefix=/usr, can you try with the prefix where vala is installed?
Comment 10 Maurizio Galli 2019-04-30 17:29:12 CEST
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.
Comment 11 Andre Miranda editbugs 2019-05-14 06:46:02 CEST
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 :/
Comment 12 Landry Breuil editbugs 2019-05-23 19:14:52 CEST
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 :)
Comment 13 Andre Miranda editbugs 2019-05-24 04:53:36 CEST
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?
Comment 14 Maurizio Galli 2019-05-24 06:44:37 CEST
yes the patch seems to work
Comment 15 Landry Breuil editbugs 2019-05-24 07:45:55 CEST
note that there might be a better idiom, hardcoding 'xfmpc_vala.stamp' feels wrong..
Comment 16 Skunnyk editbugs 2019-05-24 11:12:06 CEST
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).
Comment 17 Git Bot editbugs 2019-05-27 00:37:54 CEST
Andre Miranda referenced this bugreport in commit 24c45a19e4556f4e53ee251e039d29cbe52bc725

Fix git master build (Bug #15270)

https://git.xfce.org/apps/xfmpc/commit?id=24c45a19e4556f4e53ee251e039d29cbe52bc725
Comment 18 Andre Miranda editbugs 2019-05-27 00:45:44 CEST
(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.

Bug #15270

Reported by:
Maurizio Galli
Reported on: 2019-04-09
Last modified on: 2019-05-27

People

Assignee:
Vincent Legout
CC List:
4 users

Version

Version:
unspecified

Attachments

full build log (91.81 KB, text/plain)
2019-04-10 06:04 CEST , Maurizio Galli
no flags
xfmpc.diff (322 bytes, patch)
2019-05-24 04:53 CEST , Andre Miranda
no flags

Additional information