Synfig Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
OPEN  Bug report #438  -  Synfig build error [libmod_png_la-trgt_png.lo] Erreur 1
Posted May 12, 2013 - updated May 20, 2013
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
Carlos López (genete) has been working on this issue since May 15, 2013 (06:09)
Issue details
  • Type of issue
    Bug report
  • Status
     
    Near completion
  • Assigned to
     Carlos López
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Animtim
  • Owned by
    Not owned by anyone
  • Category
    Not determined
  • Resolution
    Not determined
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • Tags
    icon_customdatatype.png strlen
  • Difficulty
    icon_customdatatype.png Not determined
Issue description
With latest master I have this build error:

 
mv -f .deps/libmod_png_la-main.Tpo .deps/libmod_png_la-main.Plo /bin/sh ../../../libtool --tag=CXX --mode=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/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/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\"/usr/share/locale\" -march=native -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG -O2 -W -Wall -MT libmod_png_la-trgt_png.lo -MD -MP -MF .deps/libmod_png_la-trgt_png.Tpo -c -o libmod_png_la-trgt_png.lo `test -f 'trgt_png.cpp' || echo './'`trgt_png.cpp 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/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/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\"/usr/share/locale\" -march=native -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG -O2 -W -Wall -MT libmod_png_la-trgt_png.lo -MD -MP -MF .deps/libmod_png_la-trgt_png.Tpo -c trgt_png.cpp -fPIC -DPIC -o .libs/libmod_png_la-trgt_png.o In file included from ../../../src/synfig/renddesc.h:33:0,
                 from ../../../src/synfig/target.h:37,
                 from ../../../src/synfig/target_scanline.h:31,
                 from trgt_png.h:33,
                 from trgt_png.cpp:35:
../../../src/synfig/color.h:739:30: warning: type qualifiers ignored on function return type -Wignored-qualifiers
  const value_type get_pixel()const {return pixel; }
                              ^
../../../src/synfig/color.h:740:29: warning: type qualifiers ignored on function return type -Wignored-qualifiers
  const unsigned char get_a()const { return pixel>>24; }
                             ^
../../../src/synfig/color.h:741:29: warning: type qualifiers ignored on function return type -Wignored-qualifiers
  const unsigned char get_r()const { return pixel>>16; }
                             ^
../../../src/synfig/color.h:742:29: warning: type qualifiers ignored on function return type -Wignored-qualifiers
  const unsigned char get_g()const { return pixel>>8; }
                             ^
../../../src/synfig/color.h:743:29: warning: type qualifiers ignored on function return type -Wignored-qualifiers
  const unsigned char get_b()const { return pixel; }
                             ^
../../../src/synfig/color.h:744:33: warning: type qualifiers ignored on function return type -Wignored-qualifiers
  const unsigned char get_alpha()const { return get_a(); }
                                 ^
trgt_png.cpp: In member function 'virtual bool png_trgt::start_frame(synfig::ProgressCallback*)': trgt_png.cpp:213:44: error: 'strlen' was not declared in this scope
     strlen(get_canvas()->get_name().c_str()) },
                                            ^
make4: *** libmod_png_la-trgt_png.lo Erreur 1 make4 : on quitte le répertoire « /home/user/builds/src/synfig/synfig-core/src/modules/mod_png » make3: *** all-recursive Erreur 1 make3 : on quitte le répertoire « /home/user/builds/src/synfig/synfig-core/src/modules » make2: *** all-recursive Erreur 1 make2 : on quitte le répertoire « /home/user/builds/src/synfig/synfig-core/src » make1: *** all-recursive Erreur 1 make1 : on quitte le répertoire « /home/user/builds/src/synfig/synfig-core » make: *** all Erreur 2 ==> ERREUR : Une erreur s'est produite dans build().
    Abandon…
Steps to reproduce this issue
system: Manjaro (arch linux based) x86_64 libpng 1.6.2-3

#2
Comment posted by
 Carlos López
May 12, 18:50
The problem is not related to libpng but to strlen. It is weird because strlen is ANSI C. Possibly a mismatch in recursive includes in your distribution. Please try to add:

  1. include <cstring>


At the includes zone.
#3
Comment posted by
 Animtim
May 12, 19:57
Thanks, adding #include <cstring> in trgt_png.cpp fixed the build smileys/2.png
#4
Comment posted by
 Carlos López
icon_reply.pngMay 15, 06:08, in reply to comment #3
Could you please send us a patch? If possible in git diff format so we can add it with your author and reasons for commit.

Commit message should have a format of:

Fix Bug #438 - Synfig build error [libmod_png_la-trgt_png.lo] Error 1


Plus additional information about the real reason of failure and the architecture and OS affected. Thanks!

Animtim wrote:
Thanks, adding #include <cstring> in trgt_png.cpp fixed the build


#8
Comment posted by
 Konstantin Dmitriev
May 20, 06:13
Do we really need patch for such a tiny fix? Creating patch with git, sending it to you, applying - all this looks like too much hassle around a single line. Maybe just add line and commit instead of waiting? ^__^