-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lcov incompatible with GCC 9.x coverage data #58
Comments
In case it may help, on my pet project I can use gcov to get the code coverage, but lcov fails. A really recent g++9 build is required, some stuff were fixed in gcov less than a week go and it uses C++20 feature only available on g++ at the moment. if you have meson + conan + lcov + genhtml installed, and an extremely fresh build of g++9, it should be as easy to test as
I didn't tested to install it from another computer than mine however. Feel free to ask me any additional data. |
I can confirm that the problem exists with LCOV and GCC 9.0 .gcno files. This will be addressed via the LCOV intermediate file format support that I'm working on. |
Great, may I ignore this as the intermediate support in LCOV will appear before GCC 9.1 is released (May 2019) ? |
LCOV support for the intermediate file format will (hopefully) be available before May. |
In my tests, I can confirm this issue affects the following versions:
Tested on official docker images, (See: https://hub.docker.com/_/gcc), for each version, respectfully. @oberpar are there any issues blocking this that require assistance? |
Bug: #157 Downgrade gcc image for GitLab CI/CD Lcov is not compatible with the latest gcov output; downgrading gcc version to use an older gcov until the issue is resolved. Bug: linux-test-project/lcov#58
Bug: #157 Downgrade gcc image for GitLab CI/CD Lcov is not compatible with the latest gcov output; downgrading gcc version to use an older gcov until the issue is resolved. Bug: linux-test-project/lcov#58
Bug: #157 Downgrade gcc image for GitLab CI/CD Lcov is not compatible with the latest gcov output; downgrading gcc version to use an older gcov until the issue is resolved. Bug: linux-test-project/lcov#58
This should be fixed with commit 75fbae1. |
(Backport: Fix minor cherry-pick conflicts.) linux-test-project/lcov#58 Fixes: #1795
I can confirm, this is working fine with |
GCC 9.x coverage data is incompatible with lcov < 1.14. See for more info linux-test-project/lcov#58 Fedora has updated lcov to 1.14, and Ubuntu hasn't yet, so run the coverage-automatic job on Fedora instead. This was otherwise blocking all pipelines of the master branch. Unreviewed, pushing to fix build.
Do you already plan a new release ? Debian (unstable) just switched to gcc 9.2.1 ... :-) |
Currently no new release is planned. LCOV GCC 9 support for Debian should be covered by a package upgrade to 1.14-2. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924573 |
That bug has been opened in March. I left a comment about gcc 9 on Friday - Saturday they had it fixed :-) |
This adds upstream patches needed for gcc-9 support to 1.14 since upstream does not plan on making new releases soon[1] and other distros seem to have included relevant changes in their 1.14 packages[2][3]. [1] linux-test-project/lcov#58 [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924573#15 [3] https://fedora.pkgs.org/rawhide/fedora-x86_64/lcov-1.14-2.fc31.noarch.rpm.html Signed-off-by: Nick Herman <[email protected]>
openSUSE Tumbleweed also offers the package that includes the patch:
|
Hello, is there any plans for the next release with gcc-9 support? |
linux-test-project/lcov#58 Homebrew/homebrew-core#50070 (cherry picked from commit 74c8205)
Coverage is apparently an issue with latest version of GCC - linux-test-project/lcov#58 So not going to worry about that at the moment, although it would be nice to add back in when possible.
I too would like to see a new release; at least a tag in here. The only thing missing seems to list the additional new dependencies in the installation section of the README. |
* Refactor TravisCI configuration to use functions * Disable coverage on gcc-8 and gcc-9 * Hopefully reduce rebuilds in HerculesCI * Dump test-suite.log in after_failure for TravisCI See: linux-test-project/lcov#58
Can this be closed and replaced with a separate request to publish a release? |
@oberpar given how stable this project is (few changes in the last year) and the amount of exposure this issue has received in various distros (I use Arch), isn't it time to tag a new release? |
I'm currently reviewing the remaining open issues and pull requests for anything that should be included in the next release. Once I'm done with that I plan to release LCOV 1.15 (should be sometime next week). |
Closing this issue since the original problem has been addressed. |
I had the bright idea to see how well my unit tests were covering the full capabilities of the new expression library. I figured this would help as I periodically stumble accross an untested feature by accident, and there are surely more that I haven't found yet. gcov only works with gcc, and I had until now mostly used clang. So, I had to go back to using gcc, and discovered that my install of gcc was no longer consistent with my install of Xcode. So, I had to do a lot of updates. I also had to build google tests by hand, because clang-built google tests will not cross compile with gcc compiled code. Whatever compiler is used for the main program has to have been used to build google test. So, I did that. I also did numerous builds of trilinos using gcc9. And finally I created the new makefile: Makefile.gcc9. I chose to use the most recent gcc I could easily install. With this makefile, and also my other gcc9 related changes, the unit tests astUnitTest and parserUnit test (the main ones I care about) build just fine on my laptop. However, a number of them fail with gcc9 that did not fail with clang. I think this is probably because of small comparison failures that will be easily fixed. I have also created Makefile.gcov_gcc9, which is intended to build the unit tests with the proper gcov options turned on. This builds just fine, and when the code is run it successfully runs astUnitTest and parserUnitTest, and produces all the additional files one would expect from gcov. So, this appears to work. And, if I run "gcov" directly on the program(s) I get the expected (in some cases very large) *gcov files. However, at this stage I have been unable to get lcov working correctly. I get a lot of warnings and errors when I run it, and the resulting *info file (which shoudl be subsequently converted to HTML) is basically emtpy. The warnings are often saying something like "really big record in file xxx" When I run genhtml on the *info file, I get an error message saying (paraphrase), "no useful records in *.info file". I made two very tiny test programs, including the proverbial "hello world" program, and attempted the same lcov procedure on them. I got exactly the same results. So, the problem is not that my test programs are somehow too big, which was suggested by some of the warnings. Even "hello world" produces a nearly empty *info file. I did a quick google and found this issue entitled: "lcov incompatible with GCC 9.x coverage data " linux-test-project/lcov#58 This webpage describes the behavior I have been experiencing. This implies (perhaps) that I should have used gcc8 instead. So I will try that next, but I may choose to do some other things first. Either way, I think these new makefiles will still be useful, if only as a model for producing gcc8 makefiles. I should note that I have NOT yet attempted to put the equivalent makefiles together for the "complex" version of these tests. I'll do that later. -------------------------------------------------------------------------------- Update: After much experimentation and browsing of the internet, I discovered that version 1.13 of lcov, which is the version I was using (from macports) has a bug in it. That bug prevented it from working with gcc9. So, I switched to gcc8, thinking that would fix it. No dice. Then I downloaded lcov 1.14-1, the most recent version, and manually installed it. That worked just fine with gcc8. It might also work with gcc9, but I haven't tried yet. I also created a little script that performs all the steps of a gcov/lcov analysis on the program parserUnitTest. That program is probably the highest priority unit test program.
…46847) Summary: According to [this issue](linux-test-project/lcov#58), LCOV 1.14 and below are not compatible with GCC9 when gathering coverage. Instead of installing `lcov` with `apt-get`, which installs version 1.13, this PR would install v1.15 from source onto the ubuntu Docker images. Pull Request resolved: #46847 Reviewed By: seemethere Differential Revision: D24540444 Pulled By: janeyx99 fbshipit-source-id: 0ac2a37241d94cdd8fea2fded7984c495a64cedc
Required two fixes: - use `mpirun --oversubscribe` (needed by latest openmpi) - lcov 1.15 (see linux-test-project/lcov#58)
- Works around linux-test-project/lcov#58. Signed-off-by: Brad Geltz <[email protected]>
Fedora 30 rawhide has pulled in the last GCC 9.0.0 version and this appears incompatible with lcov
Previously with GCC 8 compiled binaries this would work:
With GCC 9 compiled binaries it fails
There are some GCC changes that affected coverage data format:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=261189
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=264462
The info above is all taken from a Fedora bug report https://bugzilla.redhat.com/show_bug.cgi?id=1668843
The text was updated successfully, but these errors were encountered: