0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

lcovで「mismatched end line」エラーが出る(Ubuntu 24.04 + GCC 13 + GoogleTest)

Posted at

【解決】

🔍 問題概要

Ubuntu 24.04 で GoogleTest + lcov を使って C/C++ のカバレッジを取得しようとしたところ、以下のエラーが発生:

geninfo: ERROR: mismatched end line for ...
(use "geninfo --ignore-errors mismatch ..." to bypass this error)

これは lcovgcov の間でソースコードの行情報が一致しない場合に出るエラーです。


✅ 環境

  • OS: Ubuntu 24.04
  • GCC / gcov: 13.3.0
  • LCOV: 2.0-1
  • GoogleTest: v1.17.0

✅ 解決策

1. LCOV をアンインストール

sudo apt remove lcov

2. LCOV 1.14 をインストール

wget http://archive.ubuntu.com/ubuntu/pool/universe/l/lcov/lcov_1.14-2_all.deb
sudo dpkg -i lcov_1.14-2_all.deb

3. バージョン確認

lcov --version
# -> LCOV version 1.14

🔗 参考


以上、同じエラーで詰まっている方の助けになれば幸いです!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?