Compilation: update-desktop-database not found on macos #96

Closed
opened 2023-09-10 19:59:03 +02:00 by lpil · 9 comments
lpil commented 2023-09-10 19:59:03 +02:00 (Migrated from gitlab.com)

Hello! Thank you for this software. I've yet to actually try it due to this compilation error, but the impression of the philosophy and design from the website seem delightful!

I'm attempting to compile the program as instructed in the readme, but I encounter an error

$ meson build
The Meson build system
Version: 1.2.1
Source dir: /Users/louis/Desktop/mcg
Build dir: /Users/louis/Desktop/mcg/build
Build type: native build
Project name: mcg
Project version: 3.2.1
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program msgfmt found: YES (/opt/homebrew/bin/msgfmt)
Program desktop-file-validate found: NO
Found pkg-config: /opt/homebrew/bin/pkg-config (0.29.2)
Program glib-compile-resources found: YES (/opt/homebrew/bin/glib-compile-resources)
Program glib-compile-schemas found: YES (/opt/homebrew/bin/glib-compile-schemas)
Program python3 found: YES (/Users/louis/.asdf/shims/python3)
Configuring mcg using configuration
Program msginit found: YES (/opt/homebrew/bin/msginit)
Program msgmerge found: YES (/opt/homebrew/bin/msgmerge)
Program xgettext found: YES (/opt/homebrew/bin/xgettext)
Build-time dependency gio-2.0 found: YES 2.76.5
Program glib-compile-schemas found: YES (/opt/homebrew/Cellar/glib/2.76.5/bin/glib-compile-schemas)
Program gtk4-update-icon-cache found: NO
Program gtk-update-icon-cache found: YES (/opt/homebrew/bin/gtk-update-icon-cache)
Program update-desktop-database found: NO

meson.build:15:6: ERROR: Program 'update-desktop-database' not found or not executable

A full log can be found at /Users/louis/Desktop/mcg/build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

I'm using macOS 13.1 on an M1 ARM aarch64 Apple computer. I'm not very familiar with GUI development, but I believe that update-desktop-database may be a Linux specific program that is not available on macOS.

How do I compile this program?

Thanks for your help,
Louis

Hello! Thank you for this software. I've yet to actually try it due to this compilation error, but the impression of the philosophy and design from the website seem delightful! I'm attempting to compile the program as instructed in the readme, but I encounter an error ``` $ meson build The Meson build system Version: 1.2.1 Source dir: /Users/louis/Desktop/mcg Build dir: /Users/louis/Desktop/mcg/build Build type: native build Project name: mcg Project version: 3.2.1 Host machine cpu family: aarch64 Host machine cpu: aarch64 Program msgfmt found: YES (/opt/homebrew/bin/msgfmt) Program desktop-file-validate found: NO Found pkg-config: /opt/homebrew/bin/pkg-config (0.29.2) Program glib-compile-resources found: YES (/opt/homebrew/bin/glib-compile-resources) Program glib-compile-schemas found: YES (/opt/homebrew/bin/glib-compile-schemas) Program python3 found: YES (/Users/louis/.asdf/shims/python3) Configuring mcg using configuration Program msginit found: YES (/opt/homebrew/bin/msginit) Program msgmerge found: YES (/opt/homebrew/bin/msgmerge) Program xgettext found: YES (/opt/homebrew/bin/xgettext) Build-time dependency gio-2.0 found: YES 2.76.5 Program glib-compile-schemas found: YES (/opt/homebrew/Cellar/glib/2.76.5/bin/glib-compile-schemas) Program gtk4-update-icon-cache found: NO Program gtk-update-icon-cache found: YES (/opt/homebrew/bin/gtk-update-icon-cache) Program update-desktop-database found: NO meson.build:15:6: ERROR: Program 'update-desktop-database' not found or not executable A full log can be found at /Users/louis/Desktop/mcg/build/meson-logs/meson-log.txt WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. ``` I'm using macOS 13.1 on an M1 ARM aarch64 Apple computer. I'm not very familiar with GUI development, but I believe that `update-desktop-database` may be a Linux specific program that is not available on macOS. How do I compile this program? Thanks for your help, Louis
coderkun commented 2023-09-12 09:02:15 +02:00 (Migrated from gitlab.com)

update-desktop-database is a standard thing on Linux desktops (from desktop-file-utils) and used by Meson.

If you don’t have it available, try to set update_desktop_database in meson.build to false.

`update-desktop-database` is a standard thing on Linux desktops (from [desktop-file-utils](https://www.freedesktop.org/wiki/Software/desktop-file-utils/)) and used by Meson. If you don’t have it available, try to set `update_desktop_database` in `meson.build` to `false`.
lpil commented 2023-09-12 14:13:53 +02:00 (Migrated from gitlab.com)

Hey @coderkun, that's right, but I'm using macOS rather than Linux here.

How do I build it for macOS? I'm not familiar with meson so I tried removing the gnome section from meson.build. With that the compile commands would not error, but I couldn't find an executable within the build directory.

Thank you

Hey @coderkun, that's right, but I'm using macOS rather than Linux here. How do I build it for macOS? I'm not familiar with meson so I tried removing the `gnome` section from `meson.build`. With that the compile commands would not error, but I couldn't find an executable within the build directory. Thank you
coderkun commented 2023-09-15 08:45:55 +02:00 (Migrated from gitlab.com)

I would not remove the entire Gnome section but only disable individual features like update_desktop_database.

If you use meson build and ninja -C build to build the application, you can use ninja -C build install to install it. The --prefix flag can be used to change the installation directory. If you want to test it without installing, run a dev environment as explained in the readme under Running/Testing.

I would not remove the entire Gnome section but only disable individual features like `update_desktop_database`. If you use `meson build` and `ninja -C build` to build the application, you can use `ninja -C build install` to install it. The `--prefix` flag can be used to change the installation directory. If you want to test it without installing, run a dev environment as explained in the readme under [Running/Testing](https://gitlab.com/coderkun/mcg#runningtesting).
lpil commented 2023-09-15 14:42:37 +02:00 (Migrated from gitlab.com)

Thank you.

I've followed the steps and when I attempt to run the $PREFIX/bin/mcg binary it outputs many errors and then crashes due to an invalid shebang.

If I run it with Python directly it fails when attempting to import a module named gi. Do you know what Python package this belongs to?

Thank you. I've followed the steps and when I attempt to run the `$PREFIX/bin/mcg` binary it outputs many errors and then crashes due to an invalid shebang. If I run it with Python directly it fails when attempting to import a module named `gi`. Do you know what Python package this belongs to?
coderkun commented 2023-09-15 14:46:41 +02:00 (Migrated from gitlab.com)

gi are the Gnome python bindings. Did you read the README? It lists all dependencies.

`gi` are the [Gnome python bindings](https://wiki.gnome.org/action/show/Projects/PyGObject?action=show&redirect=PyGObject). Did you read the README? It lists all dependencies.
lpil commented 2023-09-15 14:52:22 +02:00 (Migrated from gitlab.com)

I believe I have them all installed. Forgive me, I'm not familiar with the Python GUI ecosystem, is there something else I need to beyond install GTK to get those bindings?

Just to check, am I right in thinking that this project supports macOS? The "OS: cross platform" on the website made me think it was Linux + Windows + macOS, but it seems the code is Linux only currently?

I believe I have them all installed. Forgive me, I'm not familiar with the Python GUI ecosystem, is there something else I need to beyond install GTK to get those bindings? Just to check, am I right in thinking that this project supports macOS? The "OS: cross platform" on the website made me think it was Linux + Windows + macOS, but it seems the code is Linux only currently?
coderkun commented 2023-09-15 14:59:10 +02:00 (Migrated from gitlab.com)

There is no platform-specific code in this application. However, you will need to check the dependencies yourself.

I am in the process of rewriting the application in go, which might make this easier. But it will take some time and I won’t be able to test it on Mac.

There is no platform-specific code in this application. However, you will need to check the dependencies yourself. I am in the process of rewriting the application in `go`, which might make this easier. But it will take some time and I won’t be able to test it on Mac.
lpil commented 2023-09-15 16:52:14 +02:00 (Migrated from gitlab.com)

Ah that's very exciting to hear! I'll try again with that one when it is released, I find Go applications much easier to install and distribute. Thank you for your help!

Ah that's very exciting to hear! I'll try again with that one when it is released, I find Go applications much easier to install and distribute. Thank you for your help!

I spent a lot of time working on a go version but decided to stick with python for now.

I spent a lot of time working on a go version but decided to stick with python for now.
Sign in to join this conversation.
No description provided.