After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774786 - totem fails to compile due to wrong top_builddir path generation by gnome-autogen.sh
totem fails to compile due to wrong top_builddir path generation by gnome-aut...
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-11-21 13:51 UTC by Adrien Plazas
Modified: 2018-02-16 16:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adrien Plazas 2016-11-21 13:51:01 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.
Comment 1 Bastien Nocera 2016-11-21 14:08:06 UTC
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