! 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 !
mousepad-0.4.2 fails to build with --enable-dbus --disable-gtk3
Status:
RESOLVED: FIXED
Product:
Mousepad
Component:
General

Comments

Description Michał Górny 2019-07-28 17:39:39 CEST
Created attachment 8819 
app-editors:mousepad-0.4.2:20190728-153647.log

When configured with '--enable-dbus --disable-gtk3', mousepad fails to build:

x86_64-pc-linux-gnu-gcc-8.3.0 -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -DBINDIR=\"/usr/bin\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib64\" -DG_LOG_DOMAIN=\"Mousepad\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES   -DNDEBUG -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/lib64/libffi-3.3_rc0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtksourceview-2.0 -I/usr/include/libxml2 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/lib64/libffi-3.3_rc0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2  -pthread -I/usr/include/xfce4/xfconf-0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/lib64/libffi-3.3_rc0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DMOUSEPAD_GSETTINGS_SCHEMA_DIR=\""/usr/share/glib-2.0/schemas"\" -DDBUS_API_SUBJECT_TO_CHANGE   -march=x86-64 -mtune=k8 -mcx16 -msahf -msse3 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -c -o mousepad-mousepad-dbus-infos.o `test -f 'mousepad-dbus-infos.c' || echo './'`mousepad-dbus-infos.c
distcc[45] ERROR: compile (null) on localhost failed
mousepad-dbus-infos.c:16:12: fatal error: gio/gunixfdlist.h: No such file or directory
 #  include <gio/gunixfdlist.h>
            ^~~~~~~~~~~~~~~~~~~
compilation terminated.
distcc[43] ERROR: compile mousepad-dbus-infos.c on localhost failed
make[3]: *** [Makefile:708: mousepad-mousepad-dbus-infos.o] Error 1


I'm attaching the complete build log.
Comment 1 Matthew Brush editbugs 2019-07-28 19:13:06 CEST
Thanks for the report. I cannot reproduce with Git master.

I would suggest maybe your GLib is too old, since that header requires GLib 2.24, but the `configure` script requires 2.42, so it never would've got past that to the point of compiling.

Just out of curiosity, what is your GLib version (`pkg-config --modversion glib-2.0`)?
Comment 2 Michał Górny 2019-07-28 19:24:40 CEST
$ pkg-config --modversion glib-2.0
2.60.6

Apparently the problem is that gtk+-3.0 pkg-config file includes a dependency on gio-unix-2.0, which causes -I/usr/include/gio-unix-2.0 to implicitly appear in flags, while gtk+-2.0 doesn't. I think the correct fix here would be to (conditionally to D-Bus) depend on gio-unix-2.0. I'd submit a patch but I don't really know what condition to use for whether to include gio-unix-2.0 on the system in question or not.
Comment 3 Andre Miranda editbugs 2019-07-28 21:30:32 CEST
@Matthew what about dropping gtk2 support? Just say the word and I'll handle this.
Comment 4 Matthew Brush editbugs 2019-07-28 22:28:15 CEST
The fix suggested by Michał Górny sounds like the best action here, regardless of GTK+2 vs 3.
Comment 5 Matthew Brush editbugs 2019-07-28 22:38:27 CEST
Created attachment 8822 
Depend on gio-unix-2.0 when DBus is enabled.

Something like this might do.
Comment 6 Michał Górny 2019-07-28 23:08:05 CEST
(In reply to Matthew Brush from comment #5)
> Created attachment 8822 
> Depend on gio-unix-2.0 when DBus is enabled.
> 
> Something like this might do.

I can confirm that it fixes the issue for me. I was wondering if it wouldn't break other platforms (e.g. Windows) though.
Comment 7 Matthew Brush editbugs 2019-07-29 03:18:51 CEST
(In reply to Michał Górny from comment #6)
> (In reply to Matthew Brush from comment #5)
> > Created attachment 8822 
> > Depend on gio-unix-2.0 when DBus is enabled.
> > 
> > Something like this might do.
> 
> I can confirm that it fixes the issue for me.
Thanks for testing.

> I was wondering if it wouldn't break other platforms (e.g. Windows) though.
Good point but I don't think Mousepad really supports non-Unixey platforms anyway though, does it? Even if someone built for Windows, I assume they'd be using something like msys2 or cygwin or whatever to emulate a *nix environment, but I'd like to be proven wrong.

Bug #15755

Reported by:
Michał Górny
Reported on: 2019-07-28
Last modified on: 2019-10-05

People

Assignee:
Matthew Brush
CC List:
2 users

Version

Version:
Unspecified
Target Milestone:
Mousepad 0.4.x

Attachments

Additional information