mate-desktop / mate-control-center

Utilities to configure the MATE desktop
https://mate-desktop.org
GNU General Public License v2.0
68 stars 59 forks source link

Cannot compile on FreeBSD-14-RELEASE #738

Open f0rrest opened 11 months ago

f0rrest commented 11 months ago

Current master branch of Mate control center cannot compile on FreeBSD 14 which gives following error:

configure: error: Package requirements (systemd >= 248) were not met:

Package 'systemd', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables SYSTEMD_CFLAGS and SYSTEMD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

I have made a patch:

diff --git a/configure.ac b/configure.ac
index a4272e1d..a66b7f3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,6 @@ AC_SUBST(TYPING_BREAK)
 AC_SUBST(SCREENSAVER_LIBS)

 GLIB_REQUIRED=2.64.0
-SYSTEMD_REQUIRED=248
 GTK_REQUIRED=3.22.0
 MARCO_REQUIRED=1.17.0
 MATEKBD_REQUIRED=1.17.0
@@ -121,7 +120,6 @@ PKG_CHECK_MODULES(TYPING, $GMODULE_ADD glib-2.0 >= $GLIB_REQUIRED gio-2.0 gtk+-3
 PKG_CHECK_MODULES(GIO, gio-2.0)
 PKG_CHECK_MODULES(GLIBTOP, libgtop-2.0)
 PKG_CHECK_MODULES(UDISKS, udisks2)
-PKG_CHECK_MODULES(SYSTEMD, systemd >= $SYSTEMD_REQUIRED)

 PKG_CHECK_MODULES([DCONF], [dconf >= 0.13.4])
 AC_SUBST(DCONF_CFLAGS)

Actually Mate does not depends on Systemd , am I right ?

lukefromdc commented 11 months ago

To my knowledge systemd is supposed to be SUPPORTED but not REQUIRED. Make sure you are not enabling any options to support it.

zhuyaliang commented 11 months ago
    vendor_variant = g_dbus_proxy_get_cached_property (hostnamed_proxy, "HardwareVendor");
    if (!vendor_variant)
    {   
        g_debug ("Unable to retrieve org.freedesktop.hostname1.HardwareVendor property");
        return NULL;
    }

    model_variant = g_dbus_proxy_get_cached_property (hostnamed_proxy, "HardwareModel");
    if (!model_variant)
    {                                     
        g_debug ("Unable to retrieve org.freedesktop.hostname1.HardwareModel property");
        return NULL;
    }

This relies on a higher version (>=248)of the systemd

lukefromdc commented 11 months ago

Found the problem: commit 5d9cbe65cdf296d9a69c93712243617dd6ba6848 which adds the system-info capplet depends on systemd, probably it was written without intent of running on non-systemd distros. This affects not only the BSD's but Devuan et all as well.

The easiest fix is to make building the system info capplet optional, ideally defaulting to yes if systemd is found and to no if it is not found.

Test your build of the system info capplet, my guess is it will not run but if it does, the systemd portions of it could be made optional instead.

Note that I have no way of testing without systemd as I do all my development on a live/bare metal system w backup partitions available, have never played with VMs and with no landline cannot download distro installers without a lot of trial and error wardriving.

I will leave this for the rest of the team for now

raveit65 commented 10 months ago

The easiest fix is to make building the system info capplet optional, ideally defaulting to yes if systemd is found and to no if it is not found.

+1

oz123 commented 8 months ago

@f0rrest I have a patch that compiles on gentoo. The only problem now is that I don't know how to fill the hostname on systems which are not OpenRC based. In gentoo I will just read /etc/hostname or /etc/conf.d/hostname. Is this also going to work for FreeBSD?

oz123 commented 8 months ago

Apparently, this is much easier than I thought: https://docs.gtk.org/glib/func.get_host_name.html

oz123 commented 8 months ago

Fixed in : #746