[Omake] race condition in omake?

Nicholas Kidd kidd at cs.wisc.edu
Thu Dec 21 11:14:39 PST 2006


Hi Aleksey,

Thank you for the explanation. omake main has always worked. It is just 
a habit of mine to do "omake clean all" (leftover from using gnu make 
and C++ code).

It would seem to me that the dependency analysis between the "clean" and 
"main" targets is not correct if it sometimes fails. Doesn't the fact 
that the failure occurs only part of the time imply that the (arbitrary) 
ordering is missing some dependency?

Thanks,
-Nick

Aleksey Nogin wrote:
> On 21.12.2006 08:32, Nicholas Kidd wrote:
> 
>> Using omake, the following command sometimes fails and sometimes 
>> succeeds:
>>
>> omake clean main
>>
>> Basically, sometimes the file "main.cmi" is not built and compilation 
>> fails.
>>
>> Let me first state that I am relatively new to both ocaml and omake. 
>> So, this may not be a bug, but my misunderstanding of how omake works 
>> when multiple targets are supplied on the command line. Does omake 
>> attempt to run them in parallel? 
> 
> Yes. OMake does global analysis of the build task and then would run all 
> the rules that need to be ran in a fairly arbitrary order (within the 
> constraints given by the dependencies, of course). The order in which 
> things get specified on the command line (or in the dependencies list) 
> does not have any significance in OMake.
> 
> If you really want to rebuild from scratch, you can use "omake clean; 
> omake main". Or even "omake clean; omake -U --configure main".
> 
> Note, however, that none of this should be necessary. The OMake is 
> designed to truly know when something needs to be rebuilt (with very few 
> exceptions). If simply "omake main" is not doing what it is supposed to, 
> then most likely there is a bug either in your OMakefiles (and that bug 
> is likely to surface in other weird ways too) or in OMake (and than we'd 
> appreciate knowing about it and will try to fix it). So, try "omake 
> main" without any cleaning and please feel free to ask for help on the 
> list if it is not working.
> 
> BTW, because OMake is only relying on the dependencies to make sure the 
> build order is correct, OMake projects are fairly certain to still build 
> correctly with a "-j nn" flag. I highly recommend adding a -j option to 
> the OMAKEFLAGS environment variable, especially on multi-CPU machines.
> 
> Aleksey
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake



More information about the Omake mailing list