Comment 0 for bug 1524838

Revision history for this message
Martin Liska (mliska) wrote : Can't build Inkscape with GCC 6: error: call of overloaded ‘ptr_fun(<unresolved overloaded function type>)’ is ambiguous

Using GCC 6 (pre-release candidate), I get:

g++ -DHAVE_CONFIG_H -I. -I.. -I../cxxtest -I./extension/dbus -I/usr/include/freetype2 -DPOTRACE=\"potrace\" -pthread -I/usr/include/gtkmm-2.4 -I/usr/lib64/gtkmm-2.4/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-unix-print-2.0 -I/usr/include/gtk-2.0 -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/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -pthread -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/libpng16 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -DG_DISABLE_DEPRECATED -DGLIBMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED -DWITH_LPETOOL -DLPE_ENABLE_TEST_EFFECTS -DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_SVG2 -Werror=format-security -Wswitch -Werror=return-type -DGSEAL_ENABLE -DG_DISABLE_SINGLE_INCLUDES -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -flto=9 -O2 -fopenmp -MT ui/dialog/new-from-template.o -MD -MP -MF $depbase.Tpo -c -o ui/dialog/new-from-template.o ui/dialog/new-from-template.cpp &&\
mv -f $depbase.Tpo $depbase.Po
ui/dialog/layer-properties.cpp: In member function ‘void Inkscape::UI::Dialogs::LayerPropertiesDialog::_close()’:
ui/dialog/layer-properties.cpp:149:0: error: call of overloaded ‘ptr_fun(<unresolved overloaded function type>)’ is ambiguous
             sigc::bind(sigc::ptr_fun(&::operator delete), this),

In file included from /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:8:0,
                 from /usr/include/sigc++-2.0/sigc++/functors/slot.h:7,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:27,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /usr/include/sigc++-2.0/sigc++/sigc++.h:86,
                 from /usr/include/glibmm-2.4/glibmm/threads.h:57,
                 from /usr/include/glibmm-2.4/glibmm.h:89,
                 from /usr/include/gtkmm-2.4/gtkmm/dialog.h:7,
                 from ui/dialog/layer-properties.h:19,
                 from ui/dialog/layer-properties.cpp:16:
/usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:471:1: note: candidate: sigc::pointer_functor1<T_arg1, T_return> sigc::ptr_fun(T_return (*)(T_arg1)) [with T_arg1 = void*; T_return = void]
 ptr_fun(T_return (*_A_func)(T_arg1))
 ^~~~~~~

/usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:493:1: note: candidate: sigc::pointer_functor3<T_arg1, T_arg2, T_arg3, T_return> sigc::ptr_fun(T_return (*)(T_arg1, T_arg2, T_arg3)) [with T_arg1 = void*; T_arg2 = long unsigned int; T_arg3 = const std::nothrow_t&; T_return = void]
 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2, T_arg3))
 ^~~~~~~

depbase=`echo ui/dialog/ocaldialogs.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

Where delete operator looks as follows:
inline void operator delete(void *mem, Inkscape::GC::Delete) {
    Inkscape::GC::Core::free(mem);
}

Thanks,
Martin