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

Question and answers on how to build Synfig. We encourage you to document your findings on the build instructions page of the website
bizdelnick
Posts: 5
Joined: Thu Apr 26, 2012 6:35 am

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

Postby bizdelnick » Thu Apr 26, 2012 6:55 am

Hi!
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:

Code: Select all

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?
Attachments
log.synfig.txt
(180.83 KiB) Downloaded 87 times

faraway
Posts: 52
Joined: Mon Apr 16, 2012 6:33 pm

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

Postby faraway » Sun May 13, 2012 11:06 pm

I am also getting this error. Any solutions?

faraway
Posts: 52
Joined: Mon Apr 16, 2012 6:33 pm

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

Postby faraway » Sun May 13, 2012 11:13 pm

Solved. Go to synfig-core/src/synfig/general.h.
Change

Code: Select all

#include <ETL/stringf>
to

Code: Select all

#include <ETL/etl_config.h>
#include <ETL/_stringf.h>
or

Code: Select all

#include <etl_config.h>
#include <_stringf.h>

faraway
Posts: 52
Joined: Mon Apr 16, 2012 6:33 pm

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

Postby faraway » Sun May 13, 2012 11:33 pm

Nevermind... it just keeps coming back.

User avatar
Genete
Site Admin
Posts: 4850
Joined: Sat Dec 01, 2007 6:26 am
Location: Spain

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

Postby Genete » Mon May 14, 2012 2:49 am

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.

-G
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D

bizdelnick
Posts: 5
Joined: Thu Apr 26, 2012 6:35 am

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

Postby bizdelnick » Mon May 14, 2012 12:01 pm

Genete wrote: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.

-G

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

Code: Select all

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:

Code: Select all

$ su - -c 'urpmi bm repsys mdvsys'
$ mdvsys checkout synfig
$ cd synfig
$ su - -c 'urpmi --buildrequires --no-suggests --auto SRPMS/synfig.spec'
$ bm
This 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.

bizdelnick
Posts: 5
Joined: Thu Apr 26, 2012 6:35 am

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

Postby bizdelnick » Fri May 18, 2012 6:53 am

bizdelnick wrote:I did not try building in Mandriva 2011 and unsure if this issue reproducible there.

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

bizdelnick
Posts: 5
Joined: Thu Apr 26, 2012 6:35 am

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

Postby bizdelnick » Mon May 21, 2012 5:51 am

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

User avatar
Genete
Site Admin
Posts: 4850
Joined: Sat Dec 01, 2007 6:26 am
Location: Spain

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

Postby Genete » Mon May 21, 2012 5:58 am

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.
-G
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D

bizdelnick
Posts: 5
Joined: Thu Apr 26, 2012 6:35 am

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

Postby bizdelnick » Fri Nov 16, 2012 7:18 am

Hi!
The problem was in ETL. There was AC_ARG_DEBUG set in configure.ac, as result flag -gdwarf-4 was transformed to dwarf-4 and ETL was built without strscanf support. Patch for ETL is here: https://abf.rosalinux.ru/import/etl/blo ... lags.patch.

User avatar
Genete
Site Admin
Posts: 4850
Joined: Sat Dec 01, 2007 6:26 am
Location: Spain

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

Postby Genete » Fri Nov 16, 2012 7:56 am

Thanks bizdelnick!
Please can you push that to sourceforge tracker?
http://sourceforge.net/tracker/?group_id=144022
We'll include it in the next release once it is tested in other distributions.
Cheers!
-G
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D


Return to “Building synfig”

Who is online

Users browsing this forum: No registered users and 1 guest