lcov icon indicating copy to clipboard operation
lcov copied to clipboard

Win11/MSYS2: geninfo: ERROR: ERROR: Could not copy file D:\Users\...

Open kschoos opened this issue 2 years ago • 4 comments

I installed lcov on Windows 11, msys2, mingw64. (mingw-w64-x86_64-lcov)

When running from a directory that contained sane .gcno file, I was greeted with:

$ lcov -i -c -d .. --config-file lcov.settings -o info.info lcov: WARNING: cannot read configuration file lcov.settings Capturing coverage data from .. geninfo: WARNING: cannot read configuration file lcov.settings Found gcov version: 13.2.0 Using intermediate gcov format Using JSON module JSON::PP Scanning .. for .gcno files ... Found 1 graph files in .. Processing test_main.gcno geninfo: ERROR: ERROR: Could not copy file D:\Users... (path redacted)

I tracked it down to geninfo->split_filename not splitting Windows paths correctly. Replacing my @path_components = split('/', $_[0]); by my @path_components = split('\\\\', $_[0]);

makes it run smoothly.

As I don't think I'm the first person to run lcov on windows, there must be a different problem so I didn't want to hack away on a fix yet. Any ideas?

kschoos avatar Nov 19 '23 12:11 kschoos

Could you clarify which version of lcov you are using - and possibly where you found it? I don't find that line anywhere in the current code (but perhaps I am not looking where I should be looking, or have some typo that I cannot see). The current release is 2.0 - but there are substantial changes since then, available by by downloading code from this repo.

Thanks

henry2cox avatar Nov 20 '23 11:11 henry2cox

Hey, thank you very much, I checked and the default version that comes with my Msys2 / mingw64 install. --version says "rcinfo-cache-5767-g08b7c8fcc".

I tried for two hours to install the necessary perl packages and gave up because it took forever and for example DateTime didn't install correctly. Because of this I wasn't able to test 2.0 unfortunately.

kschoos avatar Nov 20 '23 20:11 kschoos

I did a quick search and didn't find anything called 'rcinfo-cache'. No idea what that is or where it came from. Perhaps whoever created it could update to a more recent version.

henry2cox avatar Nov 21 '23 12:11 henry2cox

Ok, I checked the Mingw repository and apparently it uses 1.16 and applies several patches to it. Maybe I should talk to them instead and see if I can get 2.0 to run on windows given the installation of perl modules created so many problems for me

kschoos avatar Nov 21 '23 18:11 kschoos

In an effort to clean up the issue list, I am closing this one now. I think that the problem described here is not related to lcov/there is no lcov repair or enhancement required.

If there is an lcov problem that needs to be addressed: please feel free to reopen this issue or file a new one.

henry2cox avatar Jun 06 '24 11:06 henry2cox