nexusformat / code

NeXus API code and helper applications
GNU Lesser General Public License v2.1
12 stars 16 forks source link

Fortran build errors with RHEL9 based system (gfortran 11.2.1) #478

Open birkenfeld opened 1 year ago

birkenfeld commented 1 year ago

With RHEL9 (gfortran 11.2.1), the Fortran bindings fail to build on master.

For F90, multiple errors of the form:

/code/bindings/f90/NXmodule.f90:1052:53:

 1052 |       status = nxifputattr(file_id, NXCstring(name), value, 1, NX_FLOAT64)
      |                                                     1
......
 1068 |       status = nxifputattr(file_id, NXCstring(name), NXCstring(value), &
      |                                                     2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(1)).

and for F77:

/code/bindings/f77/napif.f:265:41:

  250 |       NXGETDATA = NXIGETDATA(FILEID, DATA)
      |                                     2    
......
  265 |       NXGETCHARDATA = NXIGETDATA(FILEID, IDATA)
      |                                         1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/INTEGER(4)).