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

flatpak-1.0.0 fails to build, undefined function not present in stable version of glib #20

Closed
donburris opened this issue Aug 22, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@donburris
Copy link

commented Aug 22, 2018

flatpak-1.0.0 fails on emerge at common/flatpak-utils.c

common/flatpak-utils.c:5728:28: error: ‘G_NUMBER_PARSER_ERROR’ undeclared (first use in this function); did you mean ‘JSON_PARSER_ERROR’?
                            G_NUMBER_PARSER_ERROR, G_NUMBER_PARSER_ERROR_INVALID,
                            ^~~~~~~~~~~~~~~~~~~~~
                            JSON_PARSER_ERROR

This function was added in glib-2.54, which is newer than the stable ebuild on Gentoo (currently 2.52.3). This was fixed in the flatpak repo after the release of 1.0.0. It built and ran successfully after applying a patch from that commit.

diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c
index db4f364..ac37569 100644
--- a/common/flatpak-utils.c
+++ b/common/flatpak-utils.c
@@ -5725,7 +5725,7 @@ flatpak_utils_ascii_string_to_unsigned (const gchar  *str,
   if (str[0] == '\0')
     {
       g_set_error_literal (error,
-                           G_NUMBER_PARSER_ERROR, G_NUMBER_PARSER_ERROR_INVALID,
+                           G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                            _("Empty string is not a number"));
       return FALSE;
     }
@@ -5751,7 +5751,7 @@ flatpak_utils_ascii_string_to_unsigned (const gchar  *str,
       *end_ptr != '\0')
     {
       g_set_error (error,
-                   G_NUMBER_PARSER_ERROR, G_NUMBER_PARSER_ERROR_INVALID,
+                   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                    _("“%s” is not an unsigned number"), str);
       return FALSE;
     }
@@ -5761,7 +5761,7 @@ flatpak_utils_ascii_string_to_unsigned (const gchar  *str,
       gchar *max_str = g_strdup_printf ("%" G_GUINT64_FORMAT, max);
 
       g_set_error (error,
-                   G_NUMBER_PARSER_ERROR, G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS,
+                   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                    _("Number “%s” is out of bounds [%s, %s]"),
                    str, min_str, max_str);
       g_free (min_str);

fosero added a commit that referenced this issue Aug 22, 2018

@fosero

This comment has been minimized.

Copy link
Owner

commented Aug 22, 2018

Thanks for the heads-up. Patch added to 1.0.0 ebuild in f4ae4a5.

@fosero fosero closed this Aug 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.