Build error: 'strscanf' was not declared in this scope

I’m trying to update synfig package in Mandriva cooker, but build fails (on both i586 and x86_64). Synfig version is 0.63.05 and ETL version is 0.04.15. The error is very similar to the one discussed here: viewtopic.php?f=13&t=1090.
Here is the error message:

libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../../src -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/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 -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DSYSCONFDIR=\"/etc\" -I /usr/include/ImageMagick -DNDEBUG -O2 -W -Wall -MT libsynfig_la-distance.lo -MD -MP -MF .deps/libsynfig_la-distance.Tpo -c distance.cpp -fPIC -DPIC -o .libs/libsynfig_la-distance.o In file included from /usr/include/ETL/stringf:32:0, from general.h:31, from distance.cpp:35: /usr/include/ETL/_stringf.h:128:2: warning: #warning Potential for Buffer-overflow bug using vsprintf [-Wcpp] distance.cpp: In member function 'synfig::Distance& synfig::Distance::operator=(const String&)': distance.cpp:88:37: error: 'strscanf' was not declared in this scope make[3]: *** [libsynfig_la-distance.lo] Error 1 make[3]: Leaving directory `/home/m/packages/synfig/BUILD/synfig-0.63.05/src/synfig' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/m/packages/synfig/BUILD/synfig-0.63.05/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/m/packages/synfig/BUILD/synfig-0.63.05' make: *** [all] Error 2
Full rpmbuild log is attached. The same error occurs when building with ./configure && make
Do you have any ideas how to fix this?
log.synfig.txt (181 KB)

I am also getting this error. Any solutions?

Solved. Go to synfig-core/src/synfig/general.h.
Change #include <ETL/stringf> to #include <ETL/etl_config.h> #include <ETL/_stringf.h> or #include <etl_config.h> #include <_stringf.h>

Nevermind… it just keeps coming back.

I’m not used to set up a build environment under a rpm distribution because I always work on a debian linux flavor. Can you please write down a recipe (similar to this one) to allow me to try to build on Mandriva? I can setup a virtual machine that uses Mandriva Linux and give a try to that problem.


As I have already mentioned, the same error occurs even when I’m trying to build synfig with ./configure && make.
I’m using Mandriva cooker, and getting it working can be the most difficult thing for you. I did not try building in Mandriva 2011 and unsure if this issue reproducible there.
There are some troubles with both updating from Mandriva 2011 and clean installation. But updating from 2011 should be easier. Replace 2011 repos with cooker and run urpmi --auto-update --auto as root. Update can fail if some packages were replaced in repo until it finished (cooker packages are updated very often), so try running this command again. If there will be some package conflicts, try adding --allow-force and --force flags.
If you want to use rpm build environment and Mandriva package sources, do the following:$ su - -c 'urpmi bm repsys mdvsys' $ mdvsys checkout synfig $ cd synfig $ su - -c 'urpmi --buildrequires --no-suggests --auto SRPMS/synfig.spec' $ bmThis will install development tools, checkout package sources from SVN repo, install build dependencies and start building the package. Build log will be stored in SPECS/log.synfig.

Well, I tried and build finished successfully. So it can be gcc 4.6.3 related issue.

Could someone check if he able to build Synfig in another distro with gcc-4.6.3 (e.g. Ubuntu 12.04)?

I can build Synfig in Ubuntu 12.04 just following the standard instruction and installing the proper libraries.
Did it on a 64 bit machine under VirtualBox.

The problem was in ETL. There was AC_ARG_DEBUG set in, as result flag -gdwarf-4 was transformed to dwarf-4 and ETL was built without strscanf support. Patch for ETL is here: … lags.patch.

Thanks bizdelnick!
Please can you push that to sourceforge tracker?
We’ll include it in the next release once it is tested in other distributions.