mzechmeister / GLS

Generalised Lomb-Scargle periodogram
MIT License
35 stars 5 forks source link

fortran: Compiling problems #20

Closed mzechmeister closed 2 years ago

mzechmeister commented 2 years ago

Problems reported by Stefan Kimeswenger with latest fortran compiler

    make
      gfortran -fbackslash -w GLS.f -o GLS.e
`     whereis gfortran f77 g77 | sed '/:$/d; s/:.*//; s/gfortran/& -fbackslash -w/; q' ` GLS.f -o GLS.e
      GLS.f:255:72:

        255 |       if (fast) call SetupTrAneM(emin,emax,estep)
            |                                                                        1
       Error: Type mismatch in argument ‘emin’ at (1); passed REAL(8) to REAL(4)
       make: *** [Makefile:7: GLS] Error 1
make
       g77 GLS.f -o GLS.e
       g77 GLS.f -o GLS.e
       GLS.f: In program `main':
       GLS.f:108:
         SUBROUTINE SetupTrAneM(emin,emax,estep)                   ! setup
                    1
       GLS.f:255: (continued):
         if (fast) call SetupTrAneM(emin,emax,estep)
                        2
       Argument #1 (named `emin') of `setuptranem' is one precision at (2) but is some other precision at (1) [info -f g77 M GLOBALS]
       make: *** [Makefile:8: GLS] Error 1
make
       g77 GLS.f -o GLS.e
       g77 GLS.f -o GLS.e
       /bin/ld: /tmp/cclcakQR.o: in function `sinefit_':
       GLS.f:(.text+0x57): undefined reference to `data_'
       /bin/ld: GLS.f:(.text+0x7b): undefined reference to `data_'
       /bin/ld: GLS.f:(.text+0xaf): undefined reference to `data_'
       /bin/ld: GLS.f:(.text+0xf1): undefined reference to `data_'
       /bin/ld: GLS.f:(.text+0x10d): undefined reference to `data_'
       /bin/ld: /tmp/cclcakQR.o:GLS.f:(.text+0x137): more undefined references to `data_' follow
       collect2: ld returned 1 exit status
       make: *** [Makefile:8: GLS] Error 1
mzechmeister commented 2 years ago

I don't encounter this problem with gfortran (GNU Fortran (SUSE Linux) 7.5.0, on openSuse 15.4). Maybe it is not the latest compiler.