<div dir="ltr">Hi folks,<div><br></div><div>I'm working on a Cygwin64 port of PETSc and I have a question about doing a specific disable in BuildSystem based on a failing link.</div><div><br></div><div>The Cygwin folks provide an fenv.h implementation that (as far as I can tell), is currently broken due to an undefined FE_DFL_ENV variable.  My inclination is to disable this functionality in PETSc by declaring that fenv.h is unavailable if a simple link test fails.  I tried to write a test like this (in Configure.py)</div>
<div><br></div><div><pre style="margin-top:0px;margin-bottom:15px;padding:6px 10px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);font-size:13px;line-height:19px;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">
<span class="" style="margin:0px;padding:0px">def</span> <span class="" style="margin:0px;padding:0px">configureCygwin</span><span class="" style="margin:0px;padding:0px">(</span><span class="" style="margin:0px;padding:0px">self</span><span class="" style="margin:0px;padding:0px">)</span><span class="" style="margin:0px;padding:0px;font-weight:bold">:</span>
  <span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'''</span><span class="" style="margin:0px;padding:0px">Cygwin</span> <span class="" style="margin:0px;padding:0px">specific</span> <span class="" style="margin:0px;padding:0px">stuff</span><span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'''</span>
  <span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">#</span> <span class="" style="margin:0px;padding:0px">detect</span> <span class="" style="margin:0px;padding:0px">problem</span> <span class="" style="margin:0px;padding:0px">with</span> <span class="" style="margin:0px;padding:0px">missing</span> <span class="" style="margin:0px;padding:0px">FE_DFL_ENV</span> <span class="" style="margin:0px;padding:0px">symbol</span> <span class="" style="margin:0px;padding:0px">in</span> <span class="" style="margin:0px;padding:0px">Cygwin64</span>
  <span class="" style="margin:0px;padding:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px">not</span> <span class="" style="margin:0px;padding:0px">self</span><span class="" style="margin:0px;padding:0px">.</span><span class="" style="margin:0px;padding:0px">checkLink</span><span class="" style="margin:0px;padding:0px">(</span><span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'#</span><span class="" style="margin:0px;padding:0px">include</span> <span class="" style="margin:0px;padding:0px;font-weight:bold"><</span><span class="" style="margin:0px;padding:0px">fenv</span><span class="" style="margin:0px;padding:0px">.</span><span class="" style="margin:0px;padding:0px">h</span><span class="" style="margin:0px;padding:0px;font-weight:bold">></span><span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'</span><span class="" style="margin:0px;padding:0px">,</span> <span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'</span><span class="" style="margin:0px;padding:0px">fesetenv</span><span class="" style="margin:0px;padding:0px">(</span><span class="" style="margin:0px;padding:0px">FE_DFL_ENV</span><span class="" style="margin:0px;padding:0px">)</span><span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'</span><span class="" style="margin:0px;padding:0px">)</span><span class="" style="margin:0px;padding:0px;font-weight:bold">:</span>
      <span class="" style="margin:0px;padding:0px">self</span><span class="" style="margin:0px;padding:0px">.</span><span class="" style="margin:0px;padding:0px">headers</span><span class="" style="margin:0px;padding:0px">.</span><span class="" style="margin:0px;padding:0px">headers</span><span class="" style="margin:0px;padding:0px">.</span><span class="" style="margin:0px;padding:0px">remove</span><span class="" style="margin:0px;padding:0px">(</span><span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'</span><span class="" style="margin:0px;padding:0px">fenv</span><span class="" style="margin:0px;padding:0px">.</span><span class="" style="margin:0px;padding:0px">h</span><span class="" style="margin:0px;padding:0px;color:rgb(166,23,23);background-color:rgb(227,210,210)">'</span><span class="" style="margin:0px;padding:0px">)</span></pre>
</div><div><br></div><div>I don't think it worked.  Has anybody had experience with *disabling* functionality in BuildSystem?  Should we be less optimistic about having the header and only enable it if the test passes?  Where would it go?</div>
<div><br></div><div>Cheers,</div><div>Aron</div></div>