[MacPorts] #52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------+----------------------------------- Reporter: jeremyhu@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: glib2 glibmm inkscape ------------------------+----------------------------------- Updating to glib2-2.48.2 caused inkscape (or any project that uses parts of glibmm) to fail to build because gthread.h now obfuscates struct _GThread. {{{ In file included from ui/dialog/new-from-template.cpp:12: In file included from ui/dialog/new-from-template.h:14: In file included from /opt/local/include/gtkmm-2.4/gtkmm/dialog.h:31: In file included from /opt/local/include/gtkmm-2.4/gtkmm/box.h:59: In file included from /opt/local/include/gtkmm-2.4/gtkmm/container.h:30: In file included from /opt/local/include/gtkmm-2.4/gtkmm/widget.h:48: In file included from /opt/local/include/gtkmm-2.4/gtkmm/rc.h:31: In file included from /opt/local/include/gtkmm-2.4/gtkmm/style.h:46: In file included from /opt/local/include/gtkmm-2.4/gtkmm/iconset.h:35: In file included from /opt/local/include/gtkmm-2.4/gtkmm/stockid.h:26: In file included from /opt/local/include/glibmm-2.4/glibmm.h:89: /opt/local/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread') GThread gobject_; ^ /opt/local/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread' typedef struct _GThread GThread; ^ 1 error generated. }}} -- Ticket URL: <https://trac.macports.org/ticket/52248> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Changes (by jeremyhu@…): * cc: ryandesign@… (added) * owner: macports-tickets@… => devans@… -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:1> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Comment (by jeremyhu@…): It looks like gthread.h is getting included with G_DISABLE_DEPRECATED defined for some reason. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:2> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Comment (by jeremyhu@…): I suspect that is happening is boiling down to: {{{ #define G_DISABLE_DEPRECATED #include <glib.h> #undef G_DISABLE_DEPRECATED #include <glib.h> }}} glibmm's thread.h unsets `G_DISABLE_DEPRECATED` if it is set and then includes `<glib.h>`, but the `__G_LIB_H__` header guard prevents that from working if something before thread.h included it. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:3> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Changes (by devans@…): * status: new => assigned Comment: I believe inkscape sets G_DISABLE_DEPRECATED when the default +strict variant is set. Have you tried building with that disabled? -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:4> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Old description:
Updating to glib2-2.48.2 caused inkscape (or any project that uses parts of glibmm) to fail to build because gthread.h now obfuscates struct _GThread.
{{{ In file included from ui/dialog/new-from-template.cpp:12: In file included from ui/dialog/new-from-template.h:14: In file included from /opt/local/include/gtkmm-2.4/gtkmm/dialog.h:31: In file included from /opt/local/include/gtkmm-2.4/gtkmm/box.h:59: In file included from /opt/local/include/gtkmm-2.4/gtkmm/container.h:30: In file included from /opt/local/include/gtkmm-2.4/gtkmm/widget.h:48: In file included from /opt/local/include/gtkmm-2.4/gtkmm/rc.h:31: In file included from /opt/local/include/gtkmm-2.4/gtkmm/style.h:46: In file included from /opt/local/include/gtkmm-2.4/gtkmm/iconset.h:35: In file included from /opt/local/include/gtkmm-2.4/gtkmm/stockid.h:26: In file included from /opt/local/include/glibmm-2.4/glibmm.h:89: /opt/local/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread') GThread gobject_; ^ /opt/local/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread' typedef struct _GThread GThread; ^ 1 error generated. }}}
New description: Updating to glib2-2.48.2 caused inkscape (or any project that uses parts of glibmm) to fail to build because gthread.h now obfuscates struct _GThread. {{{ /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I.. -I../cxxtest -I./extension/dbus -I/opt/local/include -I/opt/local/include/freetype2 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6 -I/opt/local/include/libwpg-0.3 -I/opt/local/include/libwpd-0.10 -I/opt/local/include/librevenge-0.0 -I/opt/local/include/libvisio-0.1 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/librevenge-0.0 -I/opt/local/include/libcdr-0.1 -I/opt/local/include -I/opt/local/include/librevenge-0.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/poppler -D_REENTRANT -I/opt/local/include/poppler/glib -I/opt/local/include/poppler -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -DPOTRACE=\"potrace\" -D_REENTRANT -I/opt/local/include/gtkspell-2.0 -I/opt/local/include/gtkmm-2.4 -I/opt/local/lib/gtkmm-2.4/include -I/opt/local/include/atkmm-1.6 -I/opt/local/include/gtk-unix-print-2.0 -I/opt/local/include/gtk-2.0 -I/opt/local/include/gdkmm-2.4 -I/opt/local/lib/gdkmm-2.4/include -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/pangomm-1.4 -I/opt/local/lib/pangomm-1.4/include -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/lib/cairomm-1.0/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -D_REENTRANT -I/opt/local/include -I/opt/local/include/cairomm-1.0 -I/opt/local/lib/cairomm-1.0/include -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include -DG_DISABLE_DEPRECATED -DGLIBMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED -Werror=format- security -Wswitch -Werror=return-type -DGSEAL_ENABLE -DG_DISABLE_SINGLE_INCLUDES -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/opt/local/include -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_graphics_inkscape/inkscape/work/inkscape-0.91/src/extension/script -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -pipe -Os -std=c++11 -stdlib=libc++ -arch x86_64 -MT ui/dialog/spellcheck.o -MD -MP -MF $depbase.Tpo -c -o ui/dialog/spellcheck.o ui/dialog/spellcheck.cpp &&\ mv -f $depbase.Tpo $depbase.Po In file included from ui/dialog/new-from-template.cpp:12: In file included from ui/dialog/new-from-template.h:14: In file included from /opt/local/include/gtkmm-2.4/gtkmm/dialog.h:31: In file included from /opt/local/include/gtkmm-2.4/gtkmm/box.h:59: In file included from /opt/local/include/gtkmm-2.4/gtkmm/container.h:30: In file included from /opt/local/include/gtkmm-2.4/gtkmm/widget.h:48: In file included from /opt/local/include/gtkmm-2.4/gtkmm/rc.h:31: In file included from /opt/local/include/gtkmm-2.4/gtkmm/style.h:46: In file included from /opt/local/include/gtkmm-2.4/gtkmm/iconset.h:35: In file included from /opt/local/include/gtkmm-2.4/gtkmm/stockid.h:26: In file included from /opt/local/include/glibmm-2.4/glibmm.h:89: /opt/local/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread') GThread gobject_; ^ /opt/local/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread' typedef struct _GThread GThread; ^ 1 error generated. }}} -- Comment (by jeremyhu@…): Yes, I see `G_DISABLE_DEPRECATED` is set, but so is `GLIBMM_DISABLE_DEPRECATED`, so we shouldn't even be in there. It looks like something is undefining GLIBMM_DISABLE_DEPRECATED. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:5> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Comment (by devans@…): This code in glibmm/threads.h (also glibmm/thread.h) looks like a possible culprint: {{{ // We use the (now deprecated) GThread definition in the API, // and we cannot stop that without breaking ABI. // (see the comment below), // so we must temporarily undef G_DISABLE_DEPRECATED when // including glib.h. // Temporarily undef G_DISABLE_DEPRECATED, redefining it later if appropriate. #if defined(G_DISABLE_DEPRECATED) && !defined(GLIBMM_G_DISABLE_DEPRECATED_UNDEFED) //Stop the deprecation ifdef guards around the API declarations: #undef G_DISABLE_DEPRECATED //Stop the compiler warnings about using the deprecated API; #define GLIB_DISABLE_DEPRECATION_WARNINGS 1 #define GLIBMM_G_DISABLE_DEPRECATED_UNDEFED 1 #endif #include <glib.h> // Redefine G_DISABLE_DEPRECATED if it was defined before we temporarily undefed it: #if defined(GLIBMM_G_DISABLE_DEPRECATED_UNDEFED) #define G_DISABLE_DEPRECATED 1 #undef GLIB_DISABLE_DEPRECATION_WARNINGS #undef GLIBMM_G_DISABLE_DEPRECATED_UNDEFED #endif }}} -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:6> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Comment (by devans@…): I haven't completely wrapped my head around the precise mechanism of failure and why it recently changed. However, glibmm and inkscape are conceptually at odds in that glibmm is configured to build with deprecated API enabled for backwards compatibility but inkscape builds with it's "strict" build by default which means enabling the following in CPPFLAGS: {{{ -DG_DISABLE_DEPRECATED -DGLIBMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED }}} As far as inciting event goes, in addition to the recent update to glib2, gtkmm was recently updated so that may be an effect as well. In any case, disabling the +strict variant allows inkscape to build without error (for me at least). -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:7> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm inlining, regression caused by glib2 changes ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- Comment (by jeremyhu@…): If you look up higher in glibmm/threads.h, you'll notice that the entire file is wrapped in `#ifndef GLIBMM_DISABLE_DEPRECATED`, so given the -DGLIBMM_DISABLE_DEPRECATED on the command line, all that should be getting skipped. I need to trace all the includes to figure out why we're not just bypassing that deprecated code. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:8> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm / glib2 deprecation misconfiguration ------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape | ------------------------------------+---------------------- -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:9> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm / glib2 deprecation misconfiguration ---------------------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape inkscape-devel | ---------------------------------------------------+---------------------- Changes (by larryv@…): * cc: stott@…, fleason@… (added) * port: glib2 glibmm inkscape => glib2 glibmm inkscape inkscape-devel Comment: Has duplicates #52371 and #52375. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:11> MacPorts <https://www.macports.org/> Ports system for macOS
#52248: inkscape fails to build due to glibmm / glib2 deprecation misconfiguration ---------------------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape inkscape-devel | ---------------------------------------------------+---------------------- Comment (by wf@…): {{{ sudo port clean inkscape sudo port install inkscape-strict }}} works for me -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:14> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52248: inkscape fails to build due to glibmm / glib2 deprecation misconfiguration ---------------------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape inkscape-devel | ---------------------------------------------------+---------------------- Comment (by devans@…): Yes, the problem is with the +strict variant which builds with deprecations disabled. As of r152704, +strict is no longer the default build so this should work for you as well {{{ sudo port update inkscape sudo port install inkscape }}} You now have to explicitly use {{{ sudo port install inkscape +strict }}} to observe the failure reported here. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:15> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52248: inkscape +strict fails to build due to glibmm / glib2 deprecation misconfiguration ---------------------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape inkscape-devel | ---------------------------------------------------+---------------------- -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:16> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52248: inkscape, inkscape-devel +strict fails to build due to glibmm / glib2 deprecation misconfiguration ---------------------------------------------------+---------------------- Reporter: jeremyhu@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: glib2 glibmm inkscape inkscape-devel | ---------------------------------------------------+---------------------- Comment (by devans@…): This also occurs with inkscape-devel. Patched in r153847 to disable +strict as the default build as previously done in inkscape. This allows both inkscape and inkscape-devel default builds to succeed. The underlying issue remains however. To demonstrate problem build +strict variant. -- Ticket URL: <https://trac.macports.org/ticket/52248#comment:17> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
participants (1)
-
MacPorts