arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 127 forks source link

Autoconf unintentionally runs #111

Closed agelwarg closed 11 years ago

agelwarg commented 11 years ago

Similar to issues #15, #20 and #52, I began seeing intermittent compile failures on RHEL 6.3 due to the undefined AC_LIB_HAVE_LINKFLAGS macro. It looks like the culprit is this line in ext/extconf.rb:

51 run("find . | xargs touch", "Touching all files so autoconf doesn't run.")

Although the intention clearly appears to be to AVOID running autoconf, it's actually creating a race condition where some files (i.e., configure.ac) wind up with a NEWER timestamp than others because this line could get executed over a clock (second) boundary -- forcing autoconf to run. I suppose this could be fixed a few different ways, but using a simple "find ." does NOT generate a sufficiently ordered list. Some options...

  1. Order the output appropriately before piping to touch
  2. Choose a static timestamp (current time is fine) and then update all using "touch -t STAMP"
evan commented 11 years ago

Nice catch; can you submit a pull request with a fix according to your second suggestion?

agelwarg commented 11 years ago

Closed with #112