[AppStream] AppStream 0.12.7 compile problems
Matthias Klumpp
matthias at tenstral.net
Mon Jun 17 18:53:37 UTC 2019
Am Mo., 17. Juni 2019 um 15:21 Uhr schrieb Matthias Klumpp
<matthias at tenstral.net>:
>
> Am Mo., 17. Juni 2019 um 14:23 Uhr schrieb Jonathan Riddell <jr at jriddell.org>:
> >
> > Compiling AppStream 0.12.7 I get an error:
> >
> > [20/69] Compiling C object 'src/appstream at sha/as-cache.c.o'.
> > FAILED: src/appstream at sha/as-cache.c.o
> > cc -Isrc/appstream at sha -Isrc/ -I../src -I/usr/include -Isrc/.. -I../src/.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/libxml2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O0 -g -Werror=implicit-function-declaration -Wno-unused-parameter -DAS_COMPILATION -fPIC -pthread -MD -MQ 'src/appstream at sha/as-cache.c.o' -MF 'src/appstream at sha/as-cache.c.o.d' -o 'src/appstream at sha/as-cache.c.o' -c ../src/as-cache.c
> > ../src/as-cache.c: In function ‘as_cache_get_components_by_categories’:
> > ../src/as-cache.c:1913:29: error: implicit declaration of function ‘g_ptr_array_steal_index_fast’; did you mean ‘g_ptr_array_remove_index_fast’? [-Werror=implicit-function-declaration]
> > g_ptr_array_add (result, g_ptr_array_steal_index_fast (tmp_res, 0));
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > g_ptr_array_remove_index_fast
> > ../src/as-cache.c:1913:29: warning: passing argument 2 of ‘g_ptr_array_add’ makes pointer from integer without a cast [-Wint-conversion]
> > In file included from /usr/include/glib-2.0/glib.h:31:0,
> > from /usr/include/glib-2.0/gobject/gbinding.h:28,
> > from /usr/include/glib-2.0/glib-object.h:23,
> > from ../src/as-cache.h:28,
> > from ../src/as-cache.c:33:
> > /usr/include/glib-2.0/glib/garray.h:168:12: note: expected ‘gpointer {aka void *}’ but argument is of type ‘int’
> > void g_ptr_array_add (GPtrArray *array,
> > ^~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> > [25/69] Compiling C object 'src/appstream at sha/as-component.c.o'.
> > ninja: build stopped: subcommand failed.
> >
> > This is with KDE neon which uses Ubuntu 18.04. it has libglib2.0 2.56.4-0ubuntu0.18.04.3
>
> And that's the problem - steal_index_fast is only available since GLib 2.58.
> I'll add a patch to make this code compatible with older GLib versions
> later today, thanks for noticing this!
Try this patch:
https://github.com/ximion/appstream/commit/919bea53ada992d8f02b5e6e1e016c912ca9aadf.patch
Or, of course, upgrade your GLib ;-)
Cheers,
Matthias
--
I welcome VSRE emails. See http://vsre.info/
More information about the AppStream
mailing list