<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">The source is a combination of C and fortran, so a C-compiler with fortran is needed-preferably gcc. The gcc8 build is the only one that does not issue those warnings. But I have successfully run verification test cases packaged with the source against gcc8, gcc9, gcc11 and gfortran builds.  </div><div class=""><br class=""></div><div class="">The compilers PortGroup sets gfortran by default with these settings:</div><div class=""><br class=""></div><div class=""><div class="">compilers.choose    fc cc</div><div class="">compilers.setup     require_fortran -g95 -clang</div></div><div class=""><br class=""></div><div class="">But it uses clang to compile the C-code. I tried blacklisting clang but then it wants to install clang-14. Choosing a gcc variant uses its associated mp-gfortan compiler.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div class="">
<div class="">Mark Brethen</div><div class=""><a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a></div><div class=""><br class=""></div><br class="Apple-interchange-newline">

</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2022, at 2:18 PM, Dave Allured - NOAA Affiliate via macports-dev <<a href="mailto:macports-dev@lists.macports.org" class="">macports-dev@lists.macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Mark, those are specifically fortran issues, not C.  Both of those warnings refer to fortran constructs which were declared obsolescent in fortran 90.  That is a long time ago.  However, it looks like your modern gfortran version is still compiling these constructs correctly, but issuing compile time warnings.  This is most appropriate.  If possible, test functionality to ensure that part about "compiling correctly" is not a lie.</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">I suggest best practice is to /not/ cover up these warnings with some -std option or other sort of patch.  If the build works, then leave the warnings in place for future benefit.  For best results, request an upstream fix to replace these deleted constructs with more modern constructs, or submit your own upstream fix.  Both fixes are straightforward fortran.</div><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 5, 2022 at 9:22 PM Mark Brethen <<a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I have the compiler.setup so that gfortran is selected by default, however checking the build log I’m seeing these warning messages:<br class="">
<br class="">
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 215 at (1)<br class="">
<br class="">
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)<br class=""><br class="">
Those messages are only warnings. But to side-step these issues, do I need to add the -std option to specify which version of the fortran standard to use when compiling?<br class="">
<br class="">
E.g. compiler.c_standard   2008<br class="">
<br class="">
Thanks<br class="">
Mark<br class=""><br class="">
<br class="">
> On Jul 4, 2022, at 9:36 AM, Mark Brethen <<a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a>> wrote:<br class="">
> <br class="">
> Sorry for the confusion, 'sudo port build xyx'.<br class="">
> <br class="">
> Mark Brethen<br class="">
> <a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a><br class="">
> <br class="">
> <br class="">
>> On Jul 4, 2022, at 9:07 AM, Joshua Root <<a href="mailto:jmr@macports.org" target="_blank" class="">jmr@macports.org</a>> wrote:<br class="">
>> <br class="">
>> On 2022-7-4 23:24 , Mark Brethen wrote:<br class="">
>>> Here’s what I’ve observed:<br class="">
>>> compilers.choose fc cc<br class="">
>>> compiler.setup  require_fortran -g95 -clang<br class="">
>>> If I issue sudo port xyz +gcc11, I get ${<a href="http://configure.cc" class="">configure.cc</a>} = /usr/bin/clang.<br class="">
>> <br class="">
>> What is xyz? When are you reading the variable? If it's before the variants execute, you won't see the changes they make.<br class="">
>> <br class="">
>> - Josh<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>