Bug 246958

Summary: 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.
Product: Ports & Packages Reporter: Lorenzo Salvadore <salvadore>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: fernape, gerald, linimon, powerpc, tcberner
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 246700    

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.