Inkscape: A Vector Drawing Tool

Inkscape 0.47 fails to build with GCC 4.5

Reported by Daniel_J on 2010-02-15
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Daniel_J
inkscape (Debian)
Fix Released
Unknown
inkscape (openSUSE)
Fix Released
Medium

Bug Description

When building latest stable with GCC 4.5 on Gentoo Linux, 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.

Related branches

~suv (suv-lp) on 2010-02-15
tags: added: build
Daniel_J (sleeperseven) wrote :

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 attached patch corrects this for GCC 4.5. As best I can understand things, this should not adversely affect other compilers.

build of inkscape 0.47 with GCC 4.5 fails with:

g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2 -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/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 -pthread -I/usr/include/poppler/glib -I/usr/include/poppler -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -DPOTRACE=\"potrace\" -pthread -I/usr/include/gdkmm-2.4 -I/usr/lib64/gdkmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/gtk-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gtkmm-2.4 -I/usr/lib64/gtkmm-2.4/include -I/usr/include/gtk-unix-print-2.0 -I/usr/include/atkmm-1.6 -I/usr/include/libxml2 -I../cxxtest -I./bind/javainc -I./bind/javainc/linux -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fno-strict-aliasing -fopenmp -MT event-log.o -MD -MP -MF $depbase.Tpo -c -o event-log.o event-log.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
make[2]: *** [eraser-context.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/src/packages/BUILD/inkscape-0.47/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/inkscape-0.47'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.eAxVKR (%build)

Changed in inkscape (openSUSE):
importance: Undecided → Unknown
status: New → Unknown

Added patch from LP to home:dimstar:branches:GNOME:Apps / inkscape.

The here mentioned error has disappeared (to give a follow up error).

Added an additional patch to solve the no-return-in-nonvoid function. Patch taken from git.gnome.org:gdl, which is source included into inkscape

Fixed builds forwarded as SR33794 to openSUSE:Factory (already fixed in GNOME:Apss)

Changed in inkscape (Debian):
status: Unknown → Confirmed
ScislaC (scislac) wrote :

Daniel_J,

Thank you very much for the patch! Committed in r9267.

Changed in inkscape:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Daniel_J (sleeperseven)
milestone: none → 0.48
ScislaC (scislac) wrote :

assigned to Daniel since it's his Karma :)

Changed in inkscape (openSUSE):
status: Unknown → Fix Released
jazzynico (jazzynico) on 2010-08-24
Changed in inkscape:
status: Fix Committed → Fix Released
Changed in inkscape (Debian):
status: Confirmed → Fix Released
Changed in inkscape (openSUSE):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.