GNOME Bugzilla – Bug 774786
totem fails to compile due to wrong top_builddir path generation by gnome-autogen.sh
Last modified: 2018-02-16 16:27:49 UTC
There is a problem likely caused by gnome-autogen.sh that is affecting Totem. Totem has plugins and some of them use GI to access the plugin API. The .gir file is generated in the builddir before the plugins are compiled and the location of the gir file is correctly passed to the compiler: $(top_builddir)/src. The plugin is located at checkout/totem/src/plugins/rotation and the path to the generated Makefile is build/totem/src, as the generated Makefile is located build/totem/src/plugins/rotation, top_builddir is converted to ../../.. which is correct. But when compiling, the generated command cd to the checkoutdir and the path to the top_builddir is resolved wrongly. The compiler ends up looking for the gir file in the checkout dir instead of the build dir and the compilation fails. Hardcoding the path to the gir file seems to work, so replacing the generated top_builddir by a fullpath rather than a relative path may help. To reproduce please make sure you don't have Totem-1.0.gir installed system-wise or in JHBuild.
Worked around in totem. The problem is with the automake rules: commit 310596eaa913459e89082eaf39bd9e5fdc3e21be Author: Bastien Nocera <hadess@hadess.net> Date: Mon Nov 21 15:05:28 2016 +0100 plugins: Work-around srcdir != builddir for Vala The vala automake rules "cd" into the srcdir to generate its C files, completely ignoring the fact that the relative paths it's passed as arguments won't be valid after that directory change. Work-around it by using the absolute paths in the --girdir argument instead. See https://bugzilla.gnome.org/show_bug.cgi?id=774786