Error trying to build in flatpak: g_type_class_add_private is deprecated
In Gnome-builder, I just pulled the latest code from here and tried to build, then the error messages were raised as below.
But g_type_class_add_private
is not deprecated, and compiling gexiv2 on host os doesn't raise any errors. It is so confusing.
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DPACKAGE_NAME=\"gexiv2\" -DPACKAGE_TARNAME=\"gexiv2\" -DPACKAGE_VERSION=\"0.10.8\" -DPACKAGE_STRING=\"gexiv2\ 0.10.8\" -DPACKAGE_BUGREPORT=\"https://bugzilla.gnome.org/enter_bug.cgi\?product=gexiv2\" -DPACKAGE_URL=\"https://wiki.gnome.org/Projects/gexiv2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I./gexiv2 -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -O2 -g -MT gexiv2/libgexiv2_la-gexiv2-preview-image.lo -MD -MP -MF gexiv2/.deps/libgexiv2_la-gexiv2-preview-image.Tpo -c -o gexiv2/libgexiv2_la-gexiv2-preview-image.lo `test -f 'gexiv2/gexiv2-preview-image.cpp' || echo './'`gexiv2/gexiv2-preview-image.cpp
libtool: compile: g++ -DPACKAGE_NAME=\"gexiv2\" -DPACKAGE_TARNAME=\"gexiv2\" -DPACKAGE_VERSION=\"0.10.8\" "-DPACKAGE_STRING=\"gexiv2 0.10.8\"" "-DPACKAGE_BUGREPORT=\"https://bugzilla.gnome.org/enter_bug.cgi?product=gexiv2\"" -DPACKAGE_URL=\"https://wiki.gnome.org/Projects/gexiv2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I./gexiv2 -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -O2 -g -MT gexiv2/libgexiv2_la-gexiv2-preview-image.lo -MD -MP -MF gexiv2/.deps/libgexiv2_la-gexiv2-preview-image.Tpo -c gexiv2/gexiv2-preview-image.cpp -fPIC -DPIC -o gexiv2/.libs/libgexiv2_la-gexiv2-preview-image.o
gexiv2/gexiv2-preview-properties.cpp: In function ‘void gexiv2_preview_properties_class_init(GExiv2PreviewPropertiesClass*)’:
gexiv2/gexiv2-preview-properties.cpp:32:76: error: ‘void g_type_class_add_private(gpointer, gsize)’ is deprecated [-Werror=deprecated-declarations]
g_type_class_add_private(klass, sizeof (GExiv2PreviewPropertiesPrivate));
^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gexiv2/gexiv2-preview-properties.h:13,
from gexiv2/gexiv2-preview-properties.cpp:10:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
void g_type_class_add_private (gpointer g_class,
^~~~~~~~~~~~~~~~~~~~~~~~
gexiv2/gexiv2-preview-properties.cpp:32:76: error: ‘void g_type_class_add_private(gpointer, gsize)’ is deprecated [-Werror=deprecated-declarations]
g_type_class_add_private(klass, sizeof (GExiv2PreviewPropertiesPrivate));
^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gexiv2/gexiv2-preview-properties.h:13,
from gexiv2/gexiv2-preview-properties.cpp:10:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
void g_type_class_add_private (gpointer g_class,
^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1101: gexiv2/libgexiv2_la-gexiv2-preview-properties.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f gexiv2/.deps/libgexiv2_la-gexiv2-stream-io.Tpo gexiv2/.deps/libgexiv2_la-gexiv2-stream-io.Plo
mv -f gexiv2/.deps/libgexiv2_la-gexiv2-metadata-exif.Tpo gexiv2/.deps/libgexiv2_la-gexiv2-metadata-exif.Plo
mv -f gexiv2/.deps/libgexiv2_la-gexiv2-metadata-gps.Tpo gexiv2/.deps/libgexiv2_la-gexiv2-metadata-gps.Plo
mv -f gexiv2/.deps/libgexiv2_la-gexiv2-metadata-xmp.Tpo gexiv2/.deps/libgexiv2_la-gexiv2-metadata-xmp.Plo
mv -f gexiv2/.deps/libgexiv2_la-gexiv2-metadata-iptc.Tpo gexiv2/.deps/libgexiv2_la-gexiv2-metadata-iptc.Plo
gexiv2/gexiv2-preview-image.cpp: In function ‘void gexiv2_preview_image_class_init(GExiv2PreviewImageClass*)’:
gexiv2/gexiv2-preview-image.cpp:34:72: error: ‘void g_type_class_add_private(gpointer, gsize)’ is deprecated [-Werror=deprecated-declarations]
g_type_class_add_private (klass, sizeof (GExiv2PreviewImagePrivate));
^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gexiv2/gexiv2-preview-image.h:13,
from gexiv2/gexiv2-preview-image.cpp:10:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
void g_type_class_add_private (gpointer g_class,
^~~~~~~~~~~~~~~~~~~~~~~~
gexiv2/gexiv2-preview-image.cpp:34:72: error: ‘void g_type_class_add_private(gpointer, gsize)’ is deprecated [-Werror=deprecated-declarations]
g_type_class_add_private (klass, sizeof (GExiv2PreviewImagePrivate));
^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gexiv2/gexiv2-preview-image.h:13,
from gexiv2/gexiv2-preview-image.cpp:10:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
void g_type_class_add_private (gpointer g_class,
^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1108: gexiv2/libgexiv2_la-gexiv2-preview-image.lo] Error 1
gexiv2/gexiv2-metadata.cpp: In function ‘void gexiv2_metadata_class_init(GExiv2MetadataClass*)’:
gexiv2/gexiv2-metadata.cpp:74:68: error: ‘void g_type_class_add_private(gpointer, gsize)’ is deprecated [-Werror=deprecated-declarations]
g_type_class_add_private (klass, sizeof (GExiv2MetadataPrivate));
^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gexiv2/gexiv2-metadata.h:14,
from gexiv2/gexiv2-metadata.cpp:11:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
void g_type_class_add_private (gpointer g_class,
^~~~~~~~~~~~~~~~~~~~~~~~
gexiv2/gexiv2-metadata.cpp:74:68: error: ‘void g_type_class_add_private(gpointer, gsize)’ is deprecated [-Werror=deprecated-declarations]
g_type_class_add_private (klass, sizeof (GExiv2MetadataPrivate));
^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gexiv2/gexiv2-metadata.h:14,
from gexiv2/gexiv2-metadata.cpp:11:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
void g_type_class_add_private (gpointer g_class,
^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1059: gexiv2/libgexiv2_la-gexiv2-metadata.lo] Error 1
make[2]: Leaving directory '/run/build/gexiv2'
make[1]: *** [Makefile:1309: all-recursive] Error 1
make[1]: Leaving directory '/run/build/gexiv2'
make: *** [Makefile:851: all] Error 2
Error: module gexiv2: 하위 프로세스가 2 코드로 끝났습니다