Win11/MSYS2: geninfo: ERROR: ERROR: Could not copy file D:\Users\...
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?
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
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.
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.
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
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.