Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305749 - media-gfx/inkscape-0.47 fails to build with GCC 4.5
Summary: media-gfx/inkscape-0.47 fails to build with GCC 4.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Graphics Project
URL: https://bugs.launchpad.net/inkscape/+...
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks: gcc-4.5
  Show dependency tree
 
Reported: 2010-02-18 15:19 UTC by Daniel J.
Modified: 2010-04-16 10:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to enable build with GCC 4.5 (inkscape-0.47-gcc45.patch,4.64 KB, patch)
2010-02-18 15:20 UTC, Daniel J.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel J. 2010-02-18 15:19:14 UTC
When building media-gfx/inkscape-0.47 with GCC 4.5, the following error occurs:

depbase=`echo eraser-context.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
 x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2 -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fopenmp -I/usr/include/ImageMagick -I/usr/include/libwpg-0.1 -I/usr/include/libwpd-0.8 -I/usr/include/poppler -D_REENTRANT -I/usr/include/poppler/glib -I/usr/include/poppler -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -DPOTRACE=\"potrace\" -D_REENTRANT -pthread -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/pangomm-1.4/include -I/usr/include/gtk-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/gtk-unix-print-2.0 -I/usr/include/atkmm-1.6 -I/usr/include/libxml2 -I/usr/include/gtkspell-2.0 -I../cxxtest -I./bind/javainc -I./bind/javainc/linux -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -Wall -g -O2 -MT eraser-context.o -MD -MP -MF $depbase.Tpo -c -o eraser-context.o eraser-context.cpp &&\
 mv -f $depbase.Tpo $depbase.Po
eraser-context.cpp: In function 'void set_to_accumulated(SPEraserContext*)':
eraser-context.cpp:752:55: error: 'r' was not declared in this scope

This error does not occur with GCC 4.4 or earlier.

In GCC 4.4 and earlier, and in the original C++ standard,
 struct A { struct B {}; };
 A::A::A::B::B::B::B::B myVariable;
is a perfectly valid declaration of a variable of type A::B.

In GCC 4.5, and in the current C++ standard, A::A is A's constructor, not the type A.

(The above explanation was found here: http://code.google.com/p/seccompsandbox/issues/detail?id=1 )
Comment 1 Daniel J. 2010-02-18 15:20:09 UTC
Created attachment 220163 [details, diff]
Patch to enable build with GCC 4.5

This patch was also submitted upstream.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2010-02-20 06:31:22 UTC
thanks, added to gcc-porting overlay.
Comment 3 Daniel J. 2010-04-01 16:36:53 UTC
This patch was accepted upstream and will be incorporated into Inkscape 0.48.
https://launchpad.net/inkscape/+milestone/0.48
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-04-16 10:44:24 UTC
+  16 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> inkscape-0.47.ebuild,
+  +files/inkscape-0.47-gcc45.patch, metadata.xml:
+  Fix building with GCC 4.5 wrt #305749 by Daniel J.. Fix PostScript
+  dependencies wrt #309213 by Willie Wong and Christopher Harvey. Disable
+  strict aliasing wrt #310393 by Doktor Notor.