Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 34357
Status: resolved
Priority: 0/
Queue: Devel-Cover

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.63
Fixed in: (no value)



Subject: No gcov information from Text::Metaphone
I was using Text::Metaphone, a simple XS module, to test Devel::Cover's gcov stuff. I'm not getting any coverage information for the C or XS files, yet they're compiling with the correct flags and the C code is definitely running. I've tried doing a "make realclean" and regenerating the Makefile to ensure everything recompiles. Do you have any insights? If you have a look at Text::Metaphone you'll see it does nothing fancy. I've attached the build output and perl -V. $ gcov --version gcov (GCC) 4.0.1 (Apple Computer, Inc. build 5370) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Subject: perl_V.out
Download perl_V.out
application/octet-stream 2.8k

Message body not shown because it is not plain text.

Subject: cover.out
Download cover.out
application/octet-stream 4.6k

Message body not shown because it is not plain text.

PS I have confirmed that gcov works with a simple test function. $ cat tmp.c #include <stdio.h> int main(void) { printf("Hello, world!\n"); return(0); } $ gcc -fprofile-arcs -ftest-coverage tmp.c $ ./a.out Hello, world! $ gcov tmp.c File 'tmp.c' Lines executed:100.00% of 3 tmp.c:creating 'tmp.c.gcov' $ cat tmp.c.gcov -: 0:Source:tmp.c -: 0:Graph:tmp.gcno -: 0:Data:tmp.gcda -: 0:Runs:1 -: 0:Programs:1 -: 1:#include <stdio.h> -: 2: 1: 3:int main(void) { 1: 4: printf("Hello, world!\n"); 1: 5: return(0); -: 6:}
Sorry, that coverage run obviously didn't build with the proper -f flags. The attached output shows that even when they do build with the right flags there's no coverage. I suspect the -O3.
Download cover.out
application/octet-stream 3.3k

Message body not shown because it is not plain text.

On Sat Mar 22 17:49:57 2008, MSCHWERN wrote: Show quoted text
> Sorry, that coverage run obviously didn't build with the proper -f > flags. The attached output shows that even when they do build with the > right flags there's no coverage. I suspect the -O3.
I switched cover to use OPTIMIZE instead of CCFLAGS so that it will override the -O3. Still no luck. It probably should be using OPTIMIZE in general so it overrides any existing optimize flags and doesn't blow over the existing CCFLAGS which may be necessary for compilation.
This all seems to be working fine now, so I'll close this ticket. I'm not sure whether upgrades in Devel::Cover or in gcov itself have solved the problem, but I'm getting coverage now from a simple cover -test. The next release will also be incorporating basic branch coverage for gcov. Thanks,