Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows compilation with MSYS2 and gfortran10 #48

Open
ToninoTarsi opened this issue Oct 12, 2020 · 5 comments
Open

Windows compilation with MSYS2 and gfortran10 #48

ToninoTarsi opened this issue Oct 12, 2020 · 5 comments

Comments

@ToninoTarsi
Copy link

Hi,

I want to compile WRF on windows and I was following this wiki ( https://github.com/WRF-CMake/wrf/blob/wrf-cmake/doc/cmake/LIBS.md#windows ) for installing required libraries on a clean installation of MSYS2

I got a first error compiling netcdf-c but it was easy to solve using :

pacman -S m4

But when I compile netcdf-fortran-4.4.4

I got this error I really do not find a solution

$ make
[  2%] Building Fortran object fortran/CMakeFiles/netcdff.dir/netcdf4.f90.obj
netcdf4_func.f90:708:75:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).
netcdf4_func.f90:698:75:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(8)/REAL(8)).
netcdf4_func.f90:688:74:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
netcdf4_func.f90:678:73:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(2)/REAL(8)).
netcdf4_func.f90:668:73:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/REAL(8)).
netcdf4_func.f90:648:75:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).
netcdf4_func.f90:638:75:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(8)/REAL(8)).
netcdf4_func.f90:628:74:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
netcdf4_func.f90:618:73:

......
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(2)/REAL(8)).
netcdf4_func.f90:608:73:

Any help is appreciated.

Regards

@ToninoTarsi
Copy link
Author

I tried a second time and now it worked :-( Sorry :-)

@ToninoTarsi
Copy link
Author

ToninoTarsi commented Oct 14, 2020

The problem is still there and I think it is related to my gfortran 10,2 compiler (current MSYS2 version) that makes type check as errors.
I suppose it is possible to disable this error as warning in gfortran 10.2 but I have no idea how. Any hint ?

Thanks

@dmey
Copy link

dmey commented Oct 14, 2020

This should be related to https://github.com/wrf-model/WRF/pull/1251/files

@ToninoTarsi
Copy link
Author

Thanks. Thats will help.
Regards.

@ToninoTarsi ToninoTarsi changed the title Windows compilation with MSYS Windows compilation with MSYS2 and gfortran10 Oct 15, 2020
@ToninoTarsi
Copy link
Author

ToninoTarsi commented Oct 15, 2020

Setting ;:


export FCFLAGS="-w -fallow-argument-mismatch -O2"
export FFLAGS="-w -fallow-argument-mismatch -O2"

solves the netcdf compilation. But then I have similar issue also compiling WRF_Cmake and flags do not help there.

So I changed the issue title and reopened it .
For the moment I solved avoiding updating the index in MSYS2 (pacman -Syu) and using old toolchain version.
Thanks.

@ToninoTarsi ToninoTarsi reopened this Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants