[SRU] "Can't locate lcovutil.pm" after updating to 2.0-1

Bug #2029924 reported by Danilo Egea Gondolfo
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
lcov (Debian)
Fix Released
Unknown
lcov (Ubuntu)
Fix Released
Undecided
Unassigned
Mantic
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

lcov is completely unusable as it will always give the following error when lcov is executed.

$ lcov --help
Can't locate lcovutil.pm in @INC (you may need to install the lcovutil module) (@INC contains: /usr/local/lib/lcov /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/bin/lcov line 102.
BEGIN failed--compilation aborted at /usr/bin/lcov line 102.

Update:
The error with lcov --help has been fixed in -proposed but it was noticed in the verification that lcov is still unusable and can not generate report. And the errors seen are same as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043009#10.

[ Test Plan ]

 * install lcov
 * execute "lcov --help"

A more detailed test plan to test the functionality:

1. Use the attached test.c file
2. cc test.c -fprofile-arcs -ftest-coverage -lgcov
3. ./a.out
4. lcov --base-directory . --directory . --capture --output-file i3.info
5. genhtml -o /tmp/i3-coverage/ i3.info

[ Where problems could occur ]

 * There is no change in the code, it only installs a file which lcov expects at runtime. So, user should not see any change in the known behaviour.

 * For the incremental diff, its removing two patches for old gcc which Debian has already removed. These patches were modifying geninfo to add support for old gcc. But since gcc-13 will be installed by default in Mantic so these patches were creating new problems.

Since it is possible to install gcc-9 in Mantic, so lcov will be not work in that case. But I have verified that none of the "lcov" package in mantic or mantic-proposed works with gcc-9 currently. So removing these old patches will not introduce any new regression.

[ Other Info ]

 * There are few more changes apart from installing "lcovutil.pm".
 * Multi threading had to be disabled in the build, otherwise the tests during the build are failing. Debian has disabled the tests for this but it is better to keep the tests enabled. I have also sent the chane to Debian - https://salsa.debian.org/mckinstry/lcov/-/merge_requests/2
 * lcov also needs libcapture-tiny-perl and libdatetime-perl at run time. This has been done in Debian - https://salsa.debian.org/mckinstry/lcov/-/commit/1427b494b40c4e8e23055bd33b0625d341898456

Update:
* Debian has removed the old gcc compatibility patches at https://salsa.debian.org/mckinstry/lcov/-/commit/3c952e83b08652ec4233de0b07a1c8b55109831e.

[ Original Bug Description ]

The new lcov version is broken.

$ lcov
Can't locate lcovutil.pm in @INC (you may need to install the lcovutil module) (@INC contains: /usr/local/lib/lcov /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/bin/lcov line 102.
BEGIN failed--compilation aborted at /usr/bin/lcov line 102.

Reported upstream https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043009

tags: added: mantic
Changed in lcov (Debian):
status: Unknown → New
Changed in lcov (Debian):
status: New → Fix Released
Changed in lcov (Debian):
status: Fix Released → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lcov (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicolas Noble (grumpycoder) wrote :

Now that 23.10 is fully released, CIs are slowly migrating to it, and this breaks CI's abilities to process code coverage reports. The impact of this bug will quickly ramp up now.

Revision history for this message
Bas Prins (bas-prins3) wrote :

Hi, is there any workaround for this? Or any fix I can already try?

Revision history for this message
Karen Dombroski (kdombroski) wrote :

As a workaround, you can install the package from Debian:
https://packages.debian.org/trixie/lcov

Revision history for this message
Simon Kissane (skissane) wrote :

This has been fixed in upstream, I installed Debian's 2.0-4 on Ubuntu 23.10 and it works without this error, the missing file (/usr/lib/lcov/lcovutil.pm) is installed. Despite being fixed, it appears the upstream bug has not had its status updated.

Can the upstream fix be applied to the Ubuntu package?

Revision history for this message
Nic30 (nic30) wrote :

skissane's question +1

Is there any approximate date when the new package will be in upstream?

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Mantic attached.

Changed in lcov (Ubuntu Mantic):
status: New → In Progress
assignee: nobody → Sudip Mukherjee (sudipmuk)
Changed in lcov (Ubuntu):
status: Confirmed → Fix Released
summary: - "Can't locate lcovutil.pm" after updating to 2.0-1
+ [SRU] "Can't locate lcovutil.pm" after updating to 2.0-1
description: updated
description: updated
Changed in lcov (Ubuntu Mantic):
status: In Progress → Confirmed
assignee: Sudip Mukherjee (sudipmuk) → nobody
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi Sudip,

Thanks for fixing this!

I see 3 different changes in the changelog:

* Ship lcovutil.pm in /usr/share/perl5. (LP: #2029924)
* Disable multiple threads while building. Tests are failing
   with multiple threads.
* Add runtime dependency on libcapture-tiny-perl and libdatetime-perl.

It seems they refer to different issues with this package, is this right (unless the new runtime dependencies are only required by lcovutil.pm)?

If so, I suppose each of the changes should be tracked in a dedicated SRU bug in case they are unrelated. For instance, while the first fix (for this bug) is addressing a runtime issue, the second addresses a FTBFS one.

Note that I do not speak for the SRU team, but IMHO, it would be better to get the paperwork here as clear as possible for the SRU reviews to avoid re-work on our (and on their) end.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote (last edit ):

Hi Athos,

1st and 3rd one are related, and 3rd issue is seen as soon as the first gets fixed.

2nd one is FTBFS and I have now opened #2051166 for it and have modified the debdiff to add that bug.

Attaching modified debdiff.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Sponsored

Changed in lcov (Ubuntu Mantic):
status: Confirmed → In Progress
Changed in lcov (Debian):
status: New → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

Accepting, but please could you add to the Test Plan a usual use case for lcov and do that when performing SRU verification? I'd prefer to fix the package at once, rather than discovering that we didn't fix it fully and requiring a further SRU and extra downloads for users. So I think it's worth ensuring the package works normally in the usual case as well as just "lcov --help".

Changed in lcov (Ubuntu Mantic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-mantic
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Danilo, or anyone else affected,

Accepted lcov into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lcov/2.0-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote (last edit ):

The problem reported in this has been fixed but as Robie suggested I did an usual use case of lcov and I faced the problem mentioned at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043009#10

Just for records this the steps of the test.
1. Use the attached test.c file
2. cc test.c -fprofile-arcs -ftest-coverage -lgcov
3. ./a.out
4. lcov --base-directory . --directory . --capture --output-file i3.info
5. genhtml -o /tmp/i3-coverage/ i3.info

I will have to mark this as verification-failed. And will add the fix for this problem after SRU team has rejected the -proposed upload.

tags: added: verification-failed verification-failed-mantic
removed: verification-needed verification-needed-mantic
Revision history for this message
Bas Prins (bas-prins3) wrote :

Hi @racb
I just tried to get the update from -proposed but nothing seems to be available for me in -proposed on 23.10. Could it be that there is nothing pushed to -proposed just yet?

Revision history for this message
Bas Prins (bas-prins3) wrote :

Hmm, installed rmadison, and I can see that the package is available. I just am unable to install it through apt for some reason (I did add the proposed pocket, no clue why it's not working).

Manually installing the deb package gives me the following error:

bp@bas-hp:Downloads % lcov --version
sh: 1: /usr/bin/get_version.sh: not found
lcov: LCOV version

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Hi Bas,
Please try "sudo apt-get install lcov -t mantic-proposed". but as I mentioned in my comment lcov will fail and will need another fix.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I have now attached an incremental debdiff for Mantic which will fix the problem.

This just removed two patches which Debian has already removed at https://salsa.debian.org/mckinstry/lcov/-/commit/3c952e83b08652ec4233de0b07a1c8b55109831e. These patches were modifying geninfo to add support for old gcc. But since gcc-13 will be installed by default in Mantic so these patches were creating new problems.

Since it is possible to install gcc-9 in Mantic, I have verified that none of the package in mantic or mantic-proposed works with gcc-9 currently. So removing these old patches will not introduce any regression.

Changed in lcov (Ubuntu Mantic):
status: Fix Committed → Confirmed
Revision history for this message
Bas Prins (bas-prins3) wrote :

Hi Supid, I am really sorry but I don't know how to install the fix. Not that familiar with linux as I should be I guess.
- I again added the proposed repos
- sudo apt remove lcov
- sudo apt-get install lcov -t mantic-proposed (I am pretty sure this installed the wrong version again, the 2.0.1)

See output below

bp@bas-hp:~ % sudo apt-get install lcov -t mantic-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  lcov
0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded.
Need to get 0 B/177 kB of archives.
After this operation, 744 kB of additional disk space will be used.
Selecting previously unselected package lcov.
(Reading database ... 331408 files and directories currently installed.)
Preparing to unpack .../archives/lcov_2.0-1_all.deb ...
Unpacking lcov (2.0-1) ...
Setting up lcov (2.0-1) ...
Processing triggers for man-db (2.11.2-3) ...

Or... should I do something manual based on the salsa debian link you shared?

Again, apologies for the stupid questions.. I just want lcov working again on 23.10

Revision history for this message
Bas Prins (bas-prins3) wrote :

Arghh... I wrote you name wrong and I can't edit my comment :(.
Apologies again...

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Hi Bas,

1. Have you enabled proposed for universe or only main ?
2. What is the output from the follwing command:

apt-cache policy lcov

Revision history for this message
Dan Bungert (dbungert) wrote :

This was in the sponsors queue, so I took a look as part of today's shift.

I can confirm the behavior observed in this comment: https://bugs.launchpad.net/ubuntu/+source/lcov/+bug/2029924/comments/15

There is a reference to a get_version.sh that is not present in this (or any) binary package.

The noble build of this package does not have this problem, some magic in the perl package build system appears to be updating this to provide an answer:
$ lcov --version
lcov: LCOV version 2.0-1
This was in the sponsors queue, so I took a look as part of today's shift.

I can confirm the behavior observed in this comment: https://bugs.launchpad.net/ubuntu/+source/lcov/+bug/2029924/comments/15

There is a reference to a get_version.sh that is not present in this (or any) binary package.
The noble build of this package does not have this problem, some magic in the perl package build system appears to be updating this to provide an answer:

$ lcov --version
lcov: LCOV version 2.0-1

I think a little more work is needed on this. Note that there are additional fixes in Ubuntu Noble for this package, some of that appears necessary.

Removing sponsors for the moment, please re-subscribe sponsors when you'd like someone to look.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

iiuc, "get_version.sh" is not needed for proper functioning of the package, its only a cosmetic change which will print the proper version information in the "LCOV version" part of the report. And, I believe fixing only a warning about "get_version.sh" should not be SRU. But, please correct me if I am wrong.

And, I am also updating the SRU testcase in the bug description and re-adding ubuntu-sponsors.

description: updated
Revision history for this message
Bas Prins (bas-prins3) wrote :

Hi Sudip,

Still trying to get lcov working on and off :).

You asked for the output of apt cache:

bp@bas-hp:~ % apt-cache policy lcov
lcov:
  Installed: (none)
  Candidate: 2.0-1
  Version table:
     2.0-1ubuntu0.1 400
        100 http://nl.archive.ubuntu.com/ubuntu mantic-proposed/universe amd64 Packages
        100 http://nl.archive.ubuntu.com/ubuntu mantic-proposed/universe i386 Packages
     2.0-1 500
        500 http://nl.archive.ubuntu.com/ubuntu mantic/universe amd64 Packages
        500 http://nl.archive.ubuntu.com/ubuntu mantic/universe i386 Packages
        100 /var/lib/dpkg/status

So this means I should be able to install 2.0-1 "400" from proposed, and 2.0-1 "500" from universe? Or what exactly is this telling me?

I just tried to :
sudo apt-get install lcov -t mantic-proposed

Which results in:

bp@bas-hp:~ % sudo apt-get install lcov -t mantic-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgstreamer-plugins-bad1.0-0 libgupnp-igd-1.6-0 libnice10
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  lcov
0 upgraded, 1 newly installed, 0 to remove and 76 not upgraded.
Need to get 0 B/177 kB of archives.
After this operation, 744 kB of additional disk space will be used.
Selecting previously unselected package lcov.
(Reading database ... 332568 files and directories currently installed.)
Preparing to unpack .../archives/lcov_2.0-1_all.deb ...
Unpacking lcov (2.0-1) ...
Setting up lcov (2.0-1) ...
Processing triggers for man-db (2.11.2-3) ...

And then when running lcov --version

bp@bas-hp:~ % lcov --version
Can't locate lcovutil.pm in @INC (you may need to install the lcovutil module) (@INC contains: /usr/local/lib/lcov /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/bin/lcov line 102.
BEGIN failed--compilation aborted at /usr/bin/lcov line 102.

still gives me the same error.

What am I still doing wrong?

Revision history for this message
Julian Andres Klode (juliank) wrote (last edit ):

You have manually overriden the pin for lcov in proposed to 400 using a package-specific pin in /etc/apt/preferences so that takes precedence over the -t option (which is pinning the Packages line to 990).

Not sure why you do this but in any case you can install by specifying lcov/mantic-proposed instead of using -t or dropping the package specific pin.

Not sure why you bother with any of that though, as has been verified in multiple comments, the fix in the proposed version is incomplete and more work is needed.

Revision history for this message
Dave Jones (waveform) wrote :

I'd generally agree with Sudip that fixing the version issue shouldn't be a blocker for an SRU fix that moves the package from "completely broken" to "at least mostly working" (querying the version is certainly useful functionality, but it's not the core function of the package or vital to it's core function). Unfortunately, the fix as it currently stands is doesn't quite get us to "mostly working".

I tried out the incremental patch from comment 17 and it does indeed get us to the point that the .info file is produced successfully, but the report generation still fails:

  $ lcov --base-directory . --directory . --capture --output-file i3.info
  Capturing coverage data from .
  geninfo cmd: '/usr/bin/geninfo . --output-filename i3.info --base-directory . --memory 0'
  Found gcov version: 13.2.0
  Using intermediate gcov format
  Writing temporary data to /tmp/geninfo_datBy9K
  Scanning . for .gcda files ...
  Found 1 data files in .
  Processing ./a-test.gcda
  Finished .info-file creation
  $ genhtml -o /tmp/i3-coverage/ i3.info
  Can't locate Date/Parse.pm in @INC (you may need to install the Date::Parse module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/bin/genhtml line 89.
  BEGIN failed--compilation aborted at /usr/bin/genhtml line 89.

I also had a quick look at whether the current noble version gets any further, but unfortunately it's got exactly the same issue.

Revision history for this message
Dave Jones (waveform) wrote :

Aha! After a little more investigation it appears we're just missing libtimedate-perl as a runtime dependency (it already has libdatetime-perl, but libtimedate-perl is required for Date/Parse.pm ... and those two names aren't *horribly* confusing!). Anyway, that's a trivial change so I'll patch it into d/control and sponsor this

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Danilo, or anyone else affected,

Accepted lcov into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lcov/2.0-1ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in lcov (Ubuntu Mantic):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-mantic
removed: verification-failed verification-failed-mantic
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can confirm that the lcov package in mantic-proposed has fixed the bug for me.

Test done:

1. Install lcov on a Mantic image
2. Execute "lcov -h" and confirmed the issue is still seen
3. Add mantic-proposed to apt sources.list
4. Install lcov from mantic-proposed
5. Execute "lcov -h" again to confirm the help is displayed.
6. get test.c from the testplan
7. build it with "cc test.c -fprofile-arcs -ftest-coverage -lgcov"
8. Execute ./a.out
9. Execute "lcov --base-directory . --directory . --capture --output-file i3.info"
10. Execute "genhtml -o html/ i3.info" to generate the html files
11. Open index.html in the browser to see the record.

Test result: the errors with lcov has been fixed.

Package tested:

$ apt-cache policy lcov
lcov:
  Installed: 2.0-1ubuntu0.2
  Candidate: 2.0-1ubuntu0.2
  Version table:
 *** 2.0-1ubuntu0.2 100
        100 http://us.archive.ubuntu.com/ubuntu mantic-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.0-1 500
        500 http://us.archive.ubuntu.com/ubuntu mantic/universe amd64 Packages

tags: added: verification-done verification-done-mantic
removed: verification-needed verification-needed-mantic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lcov - 2.0-1ubuntu0.2

---------------
lcov (2.0-1ubuntu0.2) mantic; urgency=medium

  [ Sudip Mukherjee ]
  * Remove patches supporting old gcc. (LP: #2029924)
    - These patches modified geninfo which are now affecting gcc-13 in Mantic.

  [ Dave Jones ]
  * Add missing libtimedate-perl runtime dependency

 -- Dave Jones <email address hidden> Mon, 25 Mar 2024 16:41:06 +0000

Changed in lcov (Ubuntu Mantic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for lcov has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.