mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
44 stars 47 forks source link

1.22.0: rfkill build fails #267

Closed kloczek closed 5 years ago

kloczek commented 5 years ago
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/mate-settings-daemon-1.22.0/plugins/rfkill'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I../../mate-settings-daemon -I../../data/ -DMATE_SETTINGS_LOCALEDIR=\""/usr/share/locale"\" -DLIBEXECDIR=\""/usr/libexec"\"  -I/usr/include    -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include   -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -c -o librfkill_la-rfkill-glib.lo `test -f 'rfkill-glib.c' || echo './'`rfkill-glib.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../mate-settings-daemon -I../../data/ -DMATE_SETTINGS_LOCALEDIR=\"/usr/share/locale\" -DLIBEXECDIR=\"/usr/libexec\" -I/usr/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -c rfkill-glib.c  -fPIC -DPIC -o .libs/librfkill_la-rfkill-glib.o
rfkill-glib.c:37:10: fatal error: gio/gunixoutputstream.h: No such file or directory
   37 | #include <gio/gunixoutputstream.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

All because in plugins/rfkill/Makefile.am is:

librfkill_la_CFLAGS = \
        $(PLUGIN_CFLAGS)                \
        $(RFKILL_CFLAGS)                \
        $(SETTINGS_PLUGIN_CFLAGS)       \
        $(AM_CFLAGS)

librfkill_la_LDFLAGS =          \
        $(MSD_PLUGIN_LDFLAGS)

librfkill_la_LIBADD  =                                          \
        $(RFKILL_LIBS)                                          \
        $(SETTINGS_PLUGIN_LIBS)

But there is no in configure.ac pkgconfig call to fill $(RFKILL_CFLAGS) and $(RFKILL_LIBS).

[tkloczko@domek mate-settings-daemon-1.22.0]$ grep -r RFKILL configure.ac
AM_CONDITIONAL(BUILD_RFKILL, [test x"$enable_rfkill" = x"yes"])
raveit65 commented 5 years ago

This isn't a help forum for learning compiling! Only bugs should be reported. All is written in your log. fatal error: gio/gunixoutputstream.h: No such file or directory You need to intall glib2-devel.

[root@mother rave]# dnf provides */gio/gunixoutputstream.h

glib2-devel-2.60.1-2.fc30.x86_64 : A library of handy utility functions
Quelle      : @System
Übereinstimmung von:
Dateiname     : /usr/include/gio-unix-2.0/gio/gunixoutputstream.h

Thank you.

raveit65 commented 5 years ago

And please honor our template, next time.

kloczek commented 5 years ago

I have installed glib-devel and in attachment is patch which fixes the issue. If I would not have installed proper devel resources autoconf script would be not able to finish and generate make files.

kloczek commented 5 years ago

Here is the patch

--- mate-settings-daemon-1.22.0/plugins/rfkill/Makefile.am~ 2019-02-10 13:56:46.000000000 +0000
+++ mate-settings-daemon-1.22.0/plugins/rfkill/Makefile.am  2019-04-27 11:58:25.262670356 +0100
@@ -17,7 +17,7 @@
    $(AM_CPPFLAGS)

 librfkill_la_CFLAGS = \
-   $(PLUGIN_CFLAGS)        \
+   $(GIOUNIX_CFLAGS)       \
    $(RFKILL_CFLAGS)        \
    $(SETTINGS_PLUGIN_CFLAGS)   \
    $(AM_CFLAGS)
@@ -26,7 +26,7 @@
    $(MSD_PLUGIN_LDFLAGS)

 librfkill_la_LIBADD  =                     \
-   $(RFKILL_LIBS)                      \
+   $(GIOUNIX_LIBS)                     \
    $(SETTINGS_PLUGIN_LIBS)

 plugin_in_files = rfkill.mate-settings-plugin.in
rbuj commented 5 years ago

@kloczek Thank you for reporting your build experience, but I can't reproduce your build issue on Fedora.

sudo dnf builddep mate-settings-daemon -y
git clone https://github.com/mate-desktop/mate-settings-daemon.git
cd mate-settings-daemon
./autogen.sh --enable-rfkill --prefix=/usr
cd plugins/rfkill
make V=1

Reason:

See config.log file:

grep SETTINGS_PLUGIN config.log