Package: lcov Version: 1.8-1 Severity: normal Hello,
thanks for maintaining lcov. Sometimes lcov can find a source file but genhtml cannot. It happens for me with two sources that are generated by byson and flex, and contain #line statements. It is a common issue, see for example here: http://wiki.wireshark.org/Development/CodeCoverage If there is a missing source file genhtml will die. The workaround is the following patch: --- /usr/bin/genhtml 2007-09-09 17:14:20.000000000 +0200 +++ genhtml.modified 2008-01-05 13:47:00.000000000 +0100 @@ -3165,6 +3165,15 @@ %count_data = %{$_[2]}; } + if (!-f $source_filename) { + write_source_prolog(*HTML_HANDLE); + push (@result, + write_source_line(HTML_HANDLE, 0, + "(missing file)", 0, 0)); + write_source_epilog(*HTML_HANDLE); + return (@result); + } + open(SOURCE_HANDLE, "<".$source_filename) or die("ERROR: cannot open $source_filename for reading!\n"); The patch does not apply cleanly, but looking for "open(SOURCE_HANDLE," will find the right bit of code. To make it work, two extra "0" arguments need to be added to write_source_line. Ciao, Enrico -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org