develooper Front page | perl.perl5.porters | Postings from September 2006

Re: perl.gcov

Thread Previous | Thread Next
From:
Steve Peters
Date:
September 25, 2006 18:00
Subject:
Re: perl.gcov
Message ID:
20060926010020.GA26887@kirk.peters.homeunix.org
On Mon, Sep 25, 2006 at 05:55:08PM -0600, Jim Cromie wrote:
> S├ębastien Aperghis-Tramoni wrote:
> >Jim Cromie wrote:
> >
> >  
> >>I just tried my 1st perl.gcov build, and am having problems
> >>I tried both of these
> >>
> >> bleadperl]$ sh Configure -Dusethreads -Doptimize=-pg -Dusedevel
> >>-Accflags="-fprofile-arcs -ftest-coverage"
> >> bleadperl]$ sh Configure -Dusethreads -Dusedevel
> >>-Accflags="-fprofile-arcs -ftest-coverage"
> >>    
> >
> >It seems that -Aldflags="-fprofile-arcs -ftest-coverage" is also
> >needed to build a gcov perl. At least, that's what we (Paul Johnson,
> >Abe Timmerman and myself) use for building the Perl coverage.
> >
> >--
> >S├ębastien Aperghis-Tramoni
> >
> >Close the world, txEn eht nepO.
> >
> >  
> 
> thanks, that gets me further, resulting build works a little:
> 
> $ perl.gcov -Ilib -e 'print 1..10'
> 12345678910
> 
> $ perl.gcov -Ilib -V:ld.*
> ld='cc';
> lddlflags='-shared -L/usr/local/lib';
> ldflags=' -fprofile-arcs -ftest-coverage -L/usr/local/lib';
> ldflags_uselargefiles='';
> ldlibpthname='LD_LIBRARY_PATH';
> ldflags_nolargefiles=' -fprofile-arcs -ftest-coverage -L/usr/local/lib';
> [jimc@harpo bleadperl]$
> 
> [jimc@harpo bleadperl]$ perl.gcov -Ilib -e 'print 1..10'
> [jimc@harpo bleadperl]$ gcov pad.c
> pad.gcno:cannot open graph file
> 
> Worse,  it dies trying to use B.pm
> 
> [jimc@harpo bleadperl]$ ./perl.gcov -Ilib -MO=Concise -e 'print 1..10,"\n"'
> Can't load 'lib/auto/B/B.so' for module B: lib/auto/B/B.so: undefined 
> symbol: __gcov_merge_add at lib/XSLoader.pm line 70.
> at lib/B.pm line 303
> Compilation failed in require at lib/O.pm line 5.
> BEGIN failed--compilation aborted at lib/O.pm line 5.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
> 

Sometimes, libgcov.a isn't exactly where its expected, so, sometimes
adding -lgcov and -L/path/to/libgcov.a is needed for everything to compile
and work correctly.

Steve Peters
steve@fisharerojo.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About