GNOME Bugzilla – Bug 543064
configure script does not pick up giomoduledir
Last modified: 2018-05-04 10:17:39 UTC
Please describe the problem: The build has broken at some point between gvfs-0.2.3 (which picks up giomoduledir) and gvfs-0.2.5 (which does not). When configuring gvfs, configure no longer correctly examines the giomoduledir value in gio-2.0.pc. Instead it installs modules by reference to gvfs's own exec_prefix value. This means that with gvfs-0.2.5 (and possibly gvfs-0.2.4) it is not possible to install glib and gvfs in different prefixes. Steps to reproduce: 1. Run ./configure in gvfs-0.2.5 2. 3. Actual results: configure reports giomoduledir as being ${exec_prefix}/lib/gio/modules Expected results: configure should report giomoduledir by reference to the value of ${libdir}/gio/modules in gio-2.0.pc. Does this happen every time? Yes Other information:
in my testing, this works fine in 0.99.3
It is still broken in gvfs-1.0.1, so either it wasn't fixed in 0.99.3 or it has been broken again.
giomoduledir is not picked up in gvfs-1.0.2 either.
This seems to be caused by: http://svn.gnome.org/viewvc/gvfs/trunk/configure.ac?revision=1794&view=markup hpj: Why was this changed?
It's quite some time ago, so I don't remember the details, but I think the gio libdir wasn't being defined, causing gvfs to fail distcheck.
But setting this will override the libdir to the gvfs specified one, thus installing potentially in the wrong place...
Yeah. Maybe it isn't needed anymore anyway? If you remove it and gvfs passes distcheck, we're good.
2009-03-09 Alexander Larsson <alexl@redhat.com> Bug 543064 – configure script does not pick up giomoduledir * configure.ac: Don't pass --define-variable libdir when getting giomoduledir. This was added wrongly before. Reverted, and it passes distcheck here. But in my install glib and gvfs are in the same directory. If we get a failure later we'll have to fix it in some other way.
I do have glib and gvfs in different prefixes, and this fixes it for me.
I am afraid that after working in gvfs-1.2, the build system is broken again in gvfs-1.4.0/1.4.1. Someone seems repeatedly of the opinion that modules should be installed in ${exec_prefix}/lib/gio/modules, and reintroduces this bug every time it is corrected. Please, they should be installed in the value of giomoduledir given in gio-2.0.pc. Can this be corrected again, and a note put in the build system that examining gio-2.0.pc is correct and not a bug, to prevent it being changed back again? (I can't seem to change state to REOPENED so I have changed it to UNCONFIRMED.) Chris
David touched this bit the last time. CC'ing him. Commit msg was: commit 197a9d0b89a563965ef0f411b00dfb73d7eaea2e Author: David Zeuthen <davidz@redhat.com> Date: Mon Jul 13 16:31:43 2009 -0400 Fix 'make distcheck' In particular this snippet giomodulesdir=`pkg-config --variable=giomoduledir gio-2.0` is wrong as it breaks 'make distcheck' unless you can write to where the gio modules are installed. While this is true for jhbuild setups it is patently not true for normal setups. In fact, one could argue that glib's --with-gio-module-dir option is incompatible with how we build things, but that is more of a GLib problem.
I have to say that I think a line is being crossed when users are obliged to adopt particular file prefixes for gnome components (or any other components) in order to satisfy distributors such as Redhat. That is the tail wagging the dog. It would have been a little less high-handed if the person making this change had provided a configuration option allowing giomoduledir to be chosen by a configure option, if automatic detection by pkgconfig is to be abandoned. There are many other cases where this applies - for example most gnome components depending on dbus allow a configuration option to choose the dbus system or services directories, and all having that dependency should do so. It would also have been a little less high-handed if the gio developers had been involved in the decision to ignore giomoduledir.
Created attachment 153208 [details] Add configure switch for gio modules directory A compromise. Defaults to $libdir/gio/modules, optional switch to redefine it for those not doing system installations.
Actually, that is a horrible, idea. The correct default is using pkg-config. Those who are complaining about distcheck failing need to modify their build scripts to adapt to the new switch. Proper patch attached in next message.
Created attachment 153217 [details] Fix $giomodulesdir correctly Corrected trivial patch.
ping? Can we get this into trunk please, or some comments about why not?
I haven't looked, but what is failing exactly with the distcheck target? Shouldn't distcheck be run with DESTDIR set and the test on $(DESTDIR)/$(giomodulesdir)?
Status? This bug is terribly old, but still exists in 1.7.0. This hasn't had an update by gvfs developers since 2009-11-06. The patches from 2010-02-07 16:48:08 and 2010-02-07 17:48:27 UTC both still apply. The last submitted patch is a proper IMO, but the earlier patch (although technically incorrect, as is the currently shipped product) would not require modification to existing build instructions for distribution maintainers. Please commit one or the other as it is currently broken behavior that has been fixed and broken repeatedly in the past. TIA.
I have the same problem in gconf where distcheck is broken because it tries to remove a gsettings module from /usr/lib/gio/modules. Would be nice if there was a correct documented way to specify the gio modules dir in a package regardless of having glib and $package in the same or different prefixes.
*** Bug 663953 has been marked as a duplicate of this bug. ***
This is an old bug and autotools support was already removed (the modulesdir is determined from pkgconfig by meson currently). Let's close as obsolete.