Hi Sean,<div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We both have 'arpack @3.1.3+mpich' installed but they were built with<br>
two very different compilers: mine with clang and yours with gcc45. If<br>
we force the user to specify the compiler then we can use<br>
require_active_variants to make sure everything is in line, e.g.<br>
<br>
arpack +mpich +gfortran -> mpich+gfortran will be used<br>
arpack +mpich +gcc45 -> mpich+gcc45 will be used<br>
<br>
And this ensures that the same compiler is used on all machines with the<br>
same variants.<br></blockquote><div><br></div><div>To me, this seems to complicate life for the user (you are required to check what compiler you used for mpich, in order to install this port). Also, I can always do "port install mpich +whatever" later on, which implicitly deactivates the one I had at the time of building arpack, and now the mpich and underlying compiler libraries used in arpack are different, and your check does not succeed in enforcing anything about that. And, do you see my point that there are other variants involved too, which are not being checked? So, the build is still non-reproducible in ways that may potentially be important. (For the record, arpack uses only Fortran, but this a small detail. I understand the point of your example.)</div>
<div><br></div><div>BUT: How about this idea which may fit with both of our conceptions of how things should work?</div><div><br></div><div>A default variant for fortran is set according to whichever one was used for building MPI. Then, you can still do "port install arpack +mpich" without worrying which compiler was used to build mpich, but then the Portfile will make this actually "arpack +mpich +gcc45" or whatever in the registry, so you can report a problem knowing which compiler was used. (And in case the user set gcc45 by hand, this will be checked for consistency against mpich.)</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I only mean enforcing the same compiler if the same variants are given<br>
as I showed above.<br></blockquote><div><br></div><div>Ok.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It just simply loops through all the fortran variants (gccXY, gfortran,<br>
and g95) and returns the one that is set or the empty string if none are set.<br>
</blockquote></div><br><div>All right, so my suggestion instead is to just see what variant MPI was built with, rather than checking against something provided by the user.</div><div><br></div><div>David</div>
</div>