Closed Bug 2070023 Opened 4 days ago Closed 3 hours ago

Many “Error when running gcov” errors on ccov builds

Categories

(Testing :: Code Coverage, defect)

defect

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: nicolas.guichard, Assigned: nicolas.guichard)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The build-android-x86_64-ccov/opt, build-linux64-ccov/opt and build-win64-ccov/opt logs are full of “Error when running gcov” errors when running parse_build_tests_ccov.py.

As far as I can tell, like in bug 2008110 grcov shouldn't be calling out to gcc's gcov but should be parsing gcno files itself. Adding the --lvm flag could be enough, I have a Try run in progress to test this.

By setting --llvm, I now get many “"./../../../some/path/to.cpp" cannot be normalized because of "..", so skip it.” warnings. This only happens with unified builds and I think it is related to bug 2033336.

With GCC, this would be fixed by passing -fprofile-abs-path: “Automatically convert relative source file names to absolute path names in the .gcno files. This allows gcov to find the correct sources in projects where compilations occur with different working directories.”. But Clang doesn't have that flag. We could eventually add that flag upstream, but grcov could already treat relative paths in gcno files as relative to the gcno file itself.

See Also: → 2033336

For bug 2008110 I added the --llvm flag in codecoverage.py but missed
it here.

This aims to fix lots of errors like:

[ERROR] Error when running gcov: gcov execution failed on uniffi-40f9f7591a3b9d67_1.gcno
gcov stdout:
gcov stderr: uniffi-40f9f7591a3b9d67_1.gcno:version 'B11*', prefer 'B22*'

on Android CCov builds

and

[ERROR] Error when running gcov: Failed to execute gcov process

on Linux/Windows CCov builds.

grcov should never call gcov because our CCov builds are always built
with Clang.

Assignee: nobody → nicolas.guichard
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: