linuxmint / nemo

File browser for Cinnamon
GNU General Public License v2.0
1.23k stars 299 forks source link

Build breaks with Tracker support enabled #3247

Closed z1atk0 closed 1 year ago

z1atk0 commented 1 year ago

Distribution

Slackware64-15.0

Package version

5.8.0

Frequency

Always

Bug description

The build breaks when Tracker support is enabled, ie. meson setup -D tracker=true. This is due to 3c691a8, which changed the number of parameters of file_search_result_new(). The following patch "fixes" this problem - ie. at least the build works fine, I don't know yet if search via tracker actually still works or not.

diff -pru nemo-5.8.0-orig/libnemo-private/nemo-search-engine-tracker.c nemo-5.8.0/libnemo-private/nemo-search-engine-tracker.c
--- nemo-5.8.0-orig/libnemo-private/nemo-search-engine-tracker.c    2023-06-01 17:22:15.000000000 +0200
+++ nemo-5.8.0/libnemo-private/nemo-search-engine-tracker.c 2023-06-02 22:36:01.363324831 +0200
@@ -129,7 +129,7 @@ cursor_callback (GObject      *object,

    /* We iterate result by result, not n at a time. */

-    fsr = file_search_result_new (g_strdup (tracker_sparql_cursor_get_string (cursor, 0, NULL)));
+    fsr = file_search_result_new (g_strdup (tracker_sparql_cursor_get_string (cursor, 0, NULL)), NULL);
     hits = g_list_append (NULL, fsr);
     nemo_search_engine_hits_added (NEMO_SEARCH_ENGINE (tracker), hits);
     g_list_free_full (hits, (GDestroyNotify) file_search_result_free);

Steps to reproduce

meson setup -D tracker=true builddir
ninja -v -C builddir
[...]
[217/274] ccache cc -Ilibnemo-private/libnemo-private.a.p -Ilibnemo-private -I../libnemo-private -I. -I.. -Ieel -I../eel -Ilibnemo-extension -I../libnemo-extension -I/usr/local/include/cinnamon-desktop -I/usr/local/include/gtk-3.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib64/dbus-1.0/include -I/usr/local/include -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz -I/usr/local/include/fribidi -I/usr/local/include/atk-1.0 -I/usr/local/include/pixman-1 -I/usr/local/include/libxml2 -I/usr/local/include/libpng16 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/local/include/gail-3.0 -I/usr/local/include/xapp -I/usr/include/libexif -I/usr/local/include/tracker-2.0 -I/usr/local/include/tracker-2.0/libtracker-sparql -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -Wno-deprecated-declarations -Wno-deprecated -Wno-declaration-after-statement -DGLIB_DISABLE_DEPRECATION_WARNINGS -fPIC -pthread '-DNEMO_DATADIR="/usr/local/share/nemo"' '-DNEMO_EXTENSIONDIR="/usr/local/lib64/nemo/extensions-3.0"' '-DLIBEXECDIR="/usr/local/libexec"' -MD -MQ libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o -MF libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o.d -o libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o -c ../libnemo-private/nemo-search-engine-tracker.c
FAILED: libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o 
ccache cc -Ilibnemo-private/libnemo-private.a.p -Ilibnemo-private -I../libnemo-private -I. -I.. -Ieel -I../eel -Ilibnemo-extension -I../libnemo-extension -I/usr/local/include/cinnamon-desktop -I/usr/local/include/gtk-3.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib64/dbus-1.0/include -I/usr/local/include -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz -I/usr/local/include/fribidi -I/usr/local/include/atk-1.0 -I/usr/local/include/pixman-1 -I/usr/local/include/libxml2 -I/usr/local/include/libpng16 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/local/include/gail-3.0 -I/usr/local/include/xapp -I/usr/include/libexif -I/usr/local/include/tracker-2.0 -I/usr/local/include/tracker-2.0/libtracker-sparql -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -Wno-deprecated-declarations -Wno-deprecated -Wno-declaration-after-statement -DGLIB_DISABLE_DEPRECATION_WARNINGS -fPIC -pthread '-DNEMO_DATADIR="/usr/local/share/nemo"' '-DNEMO_EXTENSIONDIR="/usr/local/lib64/nemo/extensions-3.0"' '-DLIBEXECDIR="/usr/local/libexec"' -MD -MQ libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o -MF libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o.d -o libnemo-private/libnemo-private.a.p/nemo-search-engine-tracker.c.o -c ../libnemo-private/nemo-search-engine-tracker.c
../libnemo-private/nemo-search-engine-tracker.c: In function ‘cursor_callback’:
../libnemo-private/nemo-search-engine-tracker.c:132:11: error: too few arguments to function ‘file_search_result_new’
  132 |     fsr = file_search_result_new (g_strdup (tracker_sparql_cursor_get_string (cursor, 0, NULL)));
      |           ^~~~~~~~~~~~~~~~~~~~~~
In file included from ../libnemo-private/nemo-search-engine-tracker.h:27,
                 from ../libnemo-private/nemo-search-engine-tracker.c:25:
../libnemo-private/nemo-search-engine.h:79:19: note: declared here
   79 | FileSearchResult *file_search_result_new     (gchar *uri, gchar *snippet);
      |                   ^~~~~~~~~~~~~~~~~~~~~~
[...]
ninja: build stopped: subcommand failed.

Expected behavior

The build should work fine with any combinations of build options available, unless documented otherwise.

Additional information

No response

mtwebster commented 1 year ago

Hi, sorry I'm working on this - fixing the build isn't an issue, but I need to update the sql query for tracker3 (and keep compatibility with older versions).