build error on ubuntu 11.04: sigc::connection::connection

I suspect I’m having some sort of version problem with gcc, libraries and synfig. Building synfig on Ubuntu 11.04, ran into this error:

canvas.cpp: In member function ‘void synfig::Canvas::insert(std::deque<etl::handle<synfig::Layer> >::iterator, etl::handle<synfig::Layer>)’:
canvas.cpp:723:24: error: cannot call constructor ‘sigc::connection::connection’ directly
canvas.cpp:723:24: error:   for a function-style cast, remove the redundant ‘::connection’

ETL built fine. Using ver 0.62.02 tarballs. Not using any weird options, just bare naked configure; make ; make install. gcc is version 4.5.2-8ubuntu4. (I’ve never quite trusted the tweaks U. makes.)

I think it was the same version, or the one just prior to it, that built and ran fine on Arch Linux only about one month ago.

Well, I did like the compiler error suggested, “remove the redundant ‘::connection’”. The original source was (line 716):


changed to:


(repeat a few lines later) and it compiled fine. Synfig Studio had a similar compiler error in dialog_color.cpp line 96 with Gtk::IconSize::IconSize. Fixing that, it too compiled. Synfig Studio ran okay - I clicked various buttons and messed around at random for half a minute, without any crashes.

Interesting, but I had the same problem a few months ago when compiling CASA, a huge gob of software used by radio astronomers, on my home machine. Same fix, removing a redundant “::something” We never did figure out why the source compiled okay on our work machines but needed this fix for the home machines. Strangely, the “fixed” code became unacceptable to the work machine’s compiler.

This error seems to be popping up in a bunch of recent distributions, but it’s not something that I’ve experienced myself. I think it has to do with some changes made in the latest version of gcc. I heard that the compiler became more strict about certain aspects of C++.

The redundant “::connection” and “::IconSize” are gone in the development version of the code, so they won’t be there in the 0.63 release. If this causes the code not to compile on older machines though, that might be a problem.