Bug 97432

Summary: Required glib version is too low
Product: poppler Reporter: Albert Astals Cid <aacid>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Albert Astals Cid 2016-08-21 13:58:38 UTC
configure and cmake pass fine but then when compiling i get this error 

[ 38%] Building CXX object glib/CMakeFiles/poppler-glib.dir/poppler-document.cc.o
/home/tsdgeos/poppler/glib/poppler-document.cc: In function ‘void poppler_document_class_init(PopplerDocumentClass*)’:
/home/tsdgeos/poppler/glib/poppler-document.cc:1521:25: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
        G_PARAM_READWRITE));
                         ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1085:13: error:   initializing argument 5 of ‘GParamSpec* g_param_spec_string(const gchar*, const gchar*, const gchar*, const gchar*, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_string  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1573:25: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
        G_PARAM_READWRITE));
                         ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1085:13: error:   initializing argument 5 of ‘GParamSpec* g_param_spec_string(const gchar*, const gchar*, const gchar*, const gchar*, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_string  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1586:25: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
        G_PARAM_READWRITE));
                         ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1085:13: error:   initializing argument 5 of ‘GParamSpec* g_param_spec_string(const gchar*, const gchar*, const gchar*, const gchar*, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_string  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1599:25: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
        G_PARAM_READWRITE));
                         ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1085:13: error:   initializing argument 5 of ‘GParamSpec* g_param_spec_string(const gchar*, const gchar*, const gchar*, const gchar*, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_string  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1612:25: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
        G_PARAM_READWRITE));
                         ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1085:13: error:   initializing argument 5 of ‘GParamSpec* g_param_spec_string(const gchar*, const gchar*, const gchar*, const gchar*, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_string  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1625:25: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
        G_PARAM_READWRITE));
                         ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1085:13: error:   initializing argument 5 of ‘GParamSpec* g_param_spec_string(const gchar*, const gchar*, const gchar*, const gchar*, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_string  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1638:29: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
            G_PARAM_READWRITE));
                             ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1001:13: error:   initializing argument 7 of ‘GParamSpec* g_param_spec_int(const gchar*, const gchar*, const gchar*, gint, gint, gint, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_int  (const gchar  *name,
             ^
/home/tsdgeos/poppler/glib/poppler-document.cc:1651:29: error: invalid conversion from ‘int’ to ‘GParamFlags’ [-fpermissive]
            G_PARAM_READWRITE));
                             ^
In file included from /usr/include/glib-2.0/glib-object.h:28:0,
                 from /home/tsdgeos/poppler/glib/poppler.h:22,
                 from /home/tsdgeos/poppler/glib/poppler-document.cc:41:
/usr/include/glib-2.0/gobject/gparamspecs.h:1001:13: error:   initializing argument 7 of ‘GParamSpec* g_param_spec_int(const gchar*, const gchar*, const gchar*, gint, gint, gint, GParamFlags)’ [-fpermissive]
 GParamSpec* g_param_spec_int  (const gchar  *name,
             ^




So i guess we should increase the required glib version? Or make it compile with this "old" version if possible.

This is with glib 2.40.2
Comment 1 Jason Crain 2016-08-21 22:07:53 UTC
A typecast would fix it.  Changing "G_PARAM_READWRITE" to "(GParamFlags) G_PARAM_READWRITE".

Before glib 2.42, instead of being a member of typedef enum GParamFlags, G_PARAM_READWRITE was #define'd as "(G_PARAM_READABLE | G_PARAM_WRITABLE)".  C is fine with this, but C++ complains with its stricter rules.
Comment 2 GitLab Migration User 2018-08-21 10:37:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/297.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.