Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on FreeBSD-14-RELEASE #738

Open
f0rrest opened this issue Dec 27, 2023 · 7 comments
Open

Cannot compile on FreeBSD-14-RELEASE #738

f0rrest opened this issue Dec 27, 2023 · 7 comments

Comments

@f0rrest
Copy link

f0rrest commented Dec 27, 2023

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
Copy link
Member

lukefromdc commented Dec 27, 2023 via email

@zhuyaliang
Copy link
Member

    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
Copy link
Member

Found the problem: commit 5d9cbe6
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
Copy link
Member

raveit65 commented Jan 1, 2024

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
Copy link
Contributor

oz123 commented Mar 4, 2024

@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
Copy link
Contributor

oz123 commented Mar 4, 2024

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

@oz123
Copy link
Contributor

oz123 commented Mar 11, 2024

Fixed in : #746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants