GNU bug report logs - #63517
Fixing lcov usage?

Previous Next

Package: guix-patches;

Reported by: Luca Cirrottola <luca.cirrottola <at> inria.fr>

Date: Mon, 15 May 2023 12:11:01 UTC

Severity: normal

Done: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63517 in the body.
You can then email your comments to 63517 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63517; Package guix-patches. (Mon, 15 May 2023 12:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Cirrottola <luca.cirrottola <at> inria.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 15 May 2023 12:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Luca Cirrottola <luca.cirrottola <at> inria.fr>
To: guix-patches <at> gnu.org
Subject: Fixing lcov usage?
Date: Mon, 15 May 2023 14:10:41 +0200 (CEST)
[Message part 1 (text/plain, inline)]
Hello, 
I want use lcov to generate a coverage report for a C program, but I find out I always need to add "findutils" package to my shell in order for "lcov" to work. Shouldn't "findutils" be added to the propagated-inputs of "lcov", to have it available at runtime? 

Here is a short description of the problem which can be tested on the attached (empty) C program "main.c". 

1. The shell I want to use: 

guix shell -C gcc-toolchain lcov 

2. The commands I run in the shell: 

gcc -fprofile-arcs -ftest-coverage -g -O0 -c main.c 
gcc -fprofile-arcs -ftest-coverage -g -O0 -lgcov main.o -o my_program 
./my_program 
lcov --directory . --capture --output-file coverage.info 

3. The problem I get: lcov is unable to find the .gcda files for its coverage report (message ".geninfo-real: WARNING: no .gcda files found in . - skipping!"). 

Everything works fine with "guix shell -C gcc-toolchain lcov findutils", or if I add "findutils" to the propagated-inputs of "lcov" as in the proposed patch (for the commit 13e252af79ffb85bc68d8104fdf700269b903875 on master), which I have tested by defining and building the modified package in a local copy of the gnu/packages/code.scm module. 

Of coarse I am open to recognize my errors if I have missed something in the package usage :-) or if I have misunderstood the usage of propagated-inputs (but it didn't work with findutils as "normal" input)... or if there are better solutions. 

Thank you in advance, 
Luca 

-- 
Luca CIRROTTOLA 
Research software engineer @ INRIA - research center of the university of Bordeaux and Pau 
Personal webpage: [ https://lcirrottola.github.io/ | https://lcirrottola.github.io/ ] 
Tel: +33 5 2 4 57 41 21 
200 Avenue de la Vieille Tour 
33405 Talence cedex 
France 
[Message part 2 (text/html, inline)]
[main.c (text/x-c++src, attachment)]
[log_patch_13e252af79_lcov (text/x-patch, attachment)]

Reply sent to Ludovic Courtès <ludovic.courtes <at> inria.fr>:
You have taken responsibility. (Mon, 22 May 2023 15:30:02 GMT) Full text and rfc822 format available.

Notification sent to Luca Cirrottola <luca.cirrottola <at> inria.fr>:
bug acknowledged by developer. (Mon, 22 May 2023 15:30:02 GMT) Full text and rfc822 format available.

Message #10 received at 63517-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Luca Cirrottola <luca.cirrottola <at> inria.fr>
Cc: 63517-done <at> debbugs.gnu.org
Subject: Re: bug#63517: Fixing lcov usage?
Date: Mon, 22 May 2023 17:29:19 +0200
Hi Luca,

Luca Cirrottola <luca.cirrottola <at> inria.fr> skribis:

> I want use lcov to generate a coverage report for a C program, but I find out I always need to add "findutils" package to my shell in order for "lcov" to work. Shouldn't "findutils" be added to the propagated-inputs of "lcov", to have it available at runtime? 

I took a slightly less intrusive approach:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=88a2871d8f82a7280486c2a30cc9b510ee8b2b5c

Thanks for the bug report & proposal!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#63517; Package guix-patches. (Wed, 24 May 2023 12:37:01 GMT) Full text and rfc822 format available.

Message #13 received at 63517-done <at> debbugs.gnu.org (full text, mbox):

From: Luca Cirrottola <luca.cirrottola <at> inria.fr>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 63517-done <at> debbugs.gnu.org
Subject: Re: bug#63517: Fixing lcov usage?
Date: Wed, 24 May 2023 14:36:09 +0200 (CEST)
Hello Ludo',
I could have bet there was a more elegant solution :-)
It works like a charm, thanks!

Luca

----- Mail original -----
> De: "Ludovic Courtès" <ludovic.courtes <at> inria.fr>
> À: "Luca Cirrottola" <luca.cirrottola <at> inria.fr>
> Cc: 63517-done <at> debbugs.gnu.org
> Envoyé: Lundi 22 Mai 2023 17:29:19
> Objet: Re: bug#63517: Fixing lcov usage?

> Hi Luca,
> 
> Luca Cirrottola <luca.cirrottola <at> inria.fr> skribis:
> 
>> I want use lcov to generate a coverage report for a C program, but I find out I
>> always need to add "findutils" package to my shell in order for "lcov" to work.
>> Shouldn't "findutils" be added to the propagated-inputs of "lcov", to have it
>> available at runtime?
> 
> I took a slightly less intrusive approach:
> 
>  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=88a2871d8f82a7280486c2a30cc9b510ee8b2b5c
> 
> Thanks for the bug report & proposal!
> 
> Ludo’.

-- 
Luca CIRROTTOLA 
Research software engineer @ INRIA - research center of the university of Bordeaux and Pau 
Personal webpage: [ https://lcirrottola.github.io/ | https://lcirrottola.github.io/ ] 
Tel: +33 5 2 4 57 41 21 
200 Avenue de la Vieille Tour 
33405 Talence cedex 
France




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Jun 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.