Bug 246958 - net/mpich: Fails to build with current GCC: configure: error: The Fortran compiler gfortran10 will not compile files that call the same routine with arguments of different types.
Summary: net/mpich: Fails to build with current GCC: configure: error: The Fortran com...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 246700
  Show dependency treegraph
 
Reported: 2020-06-03 13:48 UTC by Lorenzo Salvadore
Modified: 2020-07-05 14:57 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2020-06-03 13:48:07 UTC
Please see PR #246700 for details, which is about updating the default version of GCC from 9 to 10.

  checking whether Fortran 77 compiler processes .F files with C preprocessor... yes
  checking whether gfortran10 allows mismatched arguments... no
  configure: error: The Fortran compiler gfortran10 will not compile files that call the same routine with arguments of different types.
  ===>  Script "configure" failed unexpectedly.

This error was produced on powerpc64 (see comment 7 in PR #246700).

This issue is probably due to the -fno-common flag set by default. The easy workaround is adding CFLAGS=-fcommon until the code can be fixed (preferably upstream) according to https://gcc.gnu.org/gcc-10/porting_to.html#common .
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2020-06-03 14:16:56 UTC
However note please that the issue probably is not powerpc specific. Thus I set back the Hardware field to any.

Moreover, it seems more likely that the issue is related to https://gcc.gnu.org/gcc-10/porting_to.html#argument-mismatch rather than to -fcommon.
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2020-06-18 07:27:16 UTC
Has anyone tried: FFLAGS="-w -fallow-argument-mismatch -O2" as described in this recent thread? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91731
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2020-07-05 14:57:33 UTC
Fixed in ports r541283.