westes / flex

The Fast Lexical Analyzer - scanner generator for lexing in C and C++
Other
3.55k stars 529 forks source link

Failure to build packages with win_flex due to reuse of temporary file in parallel processing #580

Open albert-github opened 1 year ago

albert-github commented 1 year ago

When we build doxygen with win_flex 2.6.4, build system Ninja and build in parallel we get warnings like:

win_flex.exe: error deleting file C:\Users\VSSADM~1\AppData\Local\Temp\~flex_out_main_2

(doxygen uses a number of lex files that are build).

When looking in the executable I cannot find the flex_out_main_2 string but I do find flex_out_main_XXXXXX though I haven't been able to find this in the repository (also not in the sources of the 2.6.4 version).

For the time being the build process is ran in serial mode but this is of course far slower.

Relevant issues:

westes commented 1 year ago

As an initial sanity check, where is "win_flex" coming from -- that's not a name that the flex project itself uses. I'm wondering if there is an intermediate package/distribution happening that has introduced the problem (but I'm happy to help fix the issue wherever it is).

albert-github commented 1 year ago

@westes thanks for the quick response.

Difficult question had to do quite a bit of digging, as far as I can tell it comes from https://sourceforge.net/projects/winflexbison/files/ and has there the name: win_flex_bison-latest.zip (checked the execuable in that package and mine and they had the same md5sum).

I don't know where @tdegeus got his executable from (he found the problem and reported it. I tried with Ninja as well and seemingly had no problems).

tdegeus commented 1 year ago

It comes from conda-forge:

https://github.com/conda-forge/doxygen-feedstock/blob/a5f0654670f7c6ba3de2b91b77a8591a90955c1e/recipe/meta.yaml#L40

https://github.com/conda-forge/doxygen-feedstock/blob/a5f0654670f7c6ba3de2b91b77a8591a90955c1e/recipe/bld.bat#L6-L7

(i.e. it is build : https://github.com/conda-forge/winflexbison-feedstock/blob/main/recipe/bld.bat )