compilers PortGroup

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Wed Jul 6 19:18:00 UTC 2022


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.

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.


On Tue, Jul 5, 2022 at 9:22 PM Mark Brethen <mark.brethen at gmail.com> wrote:

> I have the compiler.setup so that gfortran is selected by default, however
> checking the build log I’m seeing these warning messages:
>
> Warning: Fortran 2018 deleted feature: DO termination statement which is
> not END DO or CONTINUE with label 215 at (1)
>
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
>
> 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?
>
> E.g. compiler.c_standard   2008
>
> Thanks
> Mark
>
>
> > On Jul 4, 2022, at 9:36 AM, Mark Brethen <mark.brethen at gmail.com> wrote:
> >
> > Sorry for the confusion, 'sudo port build xyx'.
> >
> > Mark Brethen
> > mark.brethen at gmail.com
> >
> >
> >> On Jul 4, 2022, at 9:07 AM, Joshua Root <jmr at macports.org> wrote:
> >>
> >> On 2022-7-4 23:24 , Mark Brethen wrote:
> >>> Here’s what I’ve observed:
> >>> compilers.choose fc cc
> >>> compiler.setup  require_fortran -g95 -clang
> >>> If I issue sudo port xyz +gcc11, I get ${configure.cc} =
> /usr/bin/clang.
> >>
> >> What is xyz? When are you reading the variable? If it's before the
> variants execute, you won't see the changes they make.
> >>
> >> - Josh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220706/9ef0c39b/attachment.htm>


More information about the macports-dev mailing list