Closed rojer closed 1 year ago
Hey @rojer , thanks for the report. Yes, Bear was not intended to protect the output file from multiple writes.
This project had a report similar to this: https://github.com/rizsotto/Bear/issues/509 Maybe take a read of that issue and that might help to find a workaround.
But I am also curious about your use case. Could you tell me more, how do you run Bear in parallel?
Describe the bug
The most straightforward way to collect output from multiple build commands is of course to use
--append
with the same--output
file. However, that doesn't appear to play nicely with parallel builds (make -jN
). This is evidenced by presence of error messages like the following:This suggests that the file semantic was reading was incomplete, most likely being written by another compile process.
To Reproduce Build a large project in parallel, with the same
--output
and--append
in parallel.Expected behavior Produced output is complete and consistent. My suggestion is to use advisory file locking (
flock(2)
) to serialize access to the output file.Environment:
Linux
Ubuntu 22.04
x86_64
3.0.18
3.0.18-1
Additional context
No, unfortunately
make, no autotools
x86_64, no x-compilation
I'd rather not
Before you send...
README.md
file orman bear
? :heavy_check_mark: