'make' failed using cpan to install the GD module in perl 5.14.2, installed on a QNAP NAS device. It just said it 'had problems' and 'won't make', 'won't test' etc
So I tried a direct perl compile of the module but got the warning listed in the title of this post during configuration using 'perl Makefile.PL' and 'make' did absolutely nothing! See below for the full output


Googling 'found gd.h header file in /usr/includegd.h' yields many posts but no obvious solution!
gd-2.0.28 has been installed

Prior to pasting what happened, please note this:

find /* -name 'gd.h'
shows:
/share/MD0_DATA/misc/gd-2.0.28/<b>gd.h</b> /share/MD0_DATA/.qpkg/Optware/include/gd.h

in case it appears below, /opt is a shortcut to /share/MD0_DATA/.qpkg/Optware

So here we go:

cd /share/MD0_DATA/.cpan/build_dir/GD-2.46-hg6AiN [/share/MD0_DATA/.cpan/build_dir/GD-2.46-hg6AiN] # perl Makefile.PL Notice: Type perl Makefile.PL -h for command-line option summary. Configuring for libgd version 2.0.28. Checking for stray libgd header files... ** WARNING: found gd.h header file in /usr/includegd.h, but it is expe +cted at /opt/include/gd.h. This may cause compile errors! ** ** WARNING: found gd.h header file in /usr/includegd.h, but it is expe +cted at /opt/include/gd.h. This may cause compile errors! ** ** Possible problems found ** Included Features: GD_JPEG GD_FREETYPE GD_PNG GD_GIF GD library used from: /opt Checking if your kit is complete... Looks good Writing Makefile for GD Writing MYMETA.yml [/share/MD0_DATA/.cpan/build_dir/GD-2.46-hg6AiN] # make /share/MD0_DATA/.qpkg/Optware/bin/perl GD/Image.pm.PLS GD/Image.pm Extracting Image.pm (with variable substitutions) cp GD/Polyline.pm blib/lib/GD/Polyline.pm cp qd.pl blib/lib/qd.pl cp GD/Image.pm blib/lib/GD/Image.pm cp GD.pm blib/lib/GD.pm AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD) cp GD/Simple.pm blib/lib/GD/Simple.pm cp GD/Polygon.pm blib/lib/GD/Polygon.pm cp GD/Group.pm blib/lib/GD/Group.pm /share/MD0_DATA/.qpkg/Optware/bin/perl /opt/lib/perl5/5.14.2/ExtUtils/ +xsubpp -typemap /opt/lib/perl5/5.14.2/ExtUtils/typemap -typemap type +map GD.xs > GD.xsc && mv GD.xsc GD.c gcc -c -I/opt/include -Wformat=0 -g -DVERSION=\"2.46\" -DXS_VERSION +=\"2.46\" -fPIC "-I/opt/lib/perl5/5.14.2/armv5tel-linux-thread-multi/ +CORE" -DHAVE_JPEG -DHAVE_FT -DHAVE_GIF -DHAVE_PNG GD.c Running Mkbootstrap for GD () chmod 644 GD.bs rm -f blib/arch/auto/GD/GD.so LD_RUN_PATH="/opt/lib" gcc -shared -g -L/usr/local/lib -fstack-protec +tor GD.o -o blib/arch/auto/GD/GD.so \ -L/opt/lib -L/opt/lib -L/opt/lib -ljpeg -lfreetype -lpng -lz -lm -l +gd \ chmod 755 blib/arch/auto/GD/GD.so cp GD.bs blib/arch/auto/GD/GD.bs chmod 644 blib/arch/auto/GD/GD.bs /share/MD0_DATA/.qpkg/Optware/bin/perl "-Iblib/arch" "-Iblib/lib" bdf_ +scripts/bdf2gdfont.PLS bdf_scripts/bdf2gdfont.pl Extracting bdf2gdfont.pl (with variable substitutions) cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl /share/MD0_DATA/.qpkg/Optware/bin/perl -MExtUtils::MY -e 'MY->fixin(sh +ift)' -- blib/script/bdf2gdfont.pl <e/config --with-freetype=/opt/include/freetype2/freetype --with-png=/ +opt/include/libpng15 --prefix=/opt

Also, here is 'make test':

make test PERL_DL_NONLAZY=1 /share/MD0_DATA/.qpkg/Optware/bin/perl "-MExtUtils:: +Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/GD.t ........ Can't load './blib/arch/auto/GD/GD.so' for module GD: +/opt/lib/libgd.so.2: undefined symbol: jpeg_resync_to_restart at /opt +/lib/perl5/5.14.2/armv5tel-linux-thread-multi/DynaLoader.pm line 190. at t/GD.t line 14 Compilation failed in require at t/GD.t line 14. BEGIN failed--compilation aborted at t/GD.t line 14. t/GD.t ........ Dubious, test returned 2 (wstat 512, 0x200) Failed 12/12 subtests t/Polyline.t .. Can't load '/share/MD0_DATA/.cpan/build_dir/GD-2.46-hg +6AiN/blib/arch/auto/GD/GD.so' for module GD: /opt/lib/libgd.so.2: und +efined symbol: jpeg_resync_to_restart at /opt/lib/perl5/5.14.2/armv5t +el-linux-thread-multi/DynaLoader.pm line 190. at /share/MD0_DATA/.cpan/build_dir/GD-2.46-hg6AiN/blib/lib/GD/Polylin +e.pm line 45 Compilation failed in require at /share/MD0_DATA/.cpan/build_dir/GD-2. +46-hg6AiN/blib/lib/GD/Polyline.pm line 45. BEGIN failed--compilation aborted at /share/MD0_DATA/.cpan/build_dir/G +D-2.46-hg6AiN/blib/lib/GD/Polyline.pm line 45. Compilation failed in require at t/Polyline.t line 10. BEGIN failed--compilation aborted at t/Polyline.t line 10. t/Polyline.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 1/1 subtests Test Summary Report ------------------- t/GD.t (Wstat: 512 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 2 Parse errors: Bad plan. You planned 12 tests but ran 1. t/Polyline.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 1 tests but ran 0. Files=2, Tests=1, 1 wallclock secs ( 0.22 usr 0.03 sys + 0.59 cusr + 0.05 csys = 0.89 CPU) Result: FAIL Failed 2/2 test programs. 1/1 subtests failed. make: *** [test_dynamic] Error 2

What is the problem here?


In reply to found gd.h header file in /usr/includegd.h by compused

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.