error and solution installing NicheMapR with most recent gfortran versions

27 views
Skip to first unread message

urtzi enriquez

unread,
Jul 16, 2025, 2:48:37 PM7/16/25
to NicheMapR
Hi Mike,

Today I've been trying to install NicheMapR in a machine that runs archlinux, and that uses gfortran version 15.1.1. Installing it in Debian works fine, but it uses gfortran 12.2.0. With gfortran 15, when compiling the package i got:

Error: Interface mismatch in dummy procedure at (1) conflicts with (2): 'funwing' is not a function

I tried different things, but I only managed to compile the program passing a flag to the compiler forcing it to be less strict with interface mistmatches (and in general, as far as I undesrtand what the flag does). For that I had to create a Makevars file in src with the following line that passes the flag to the compiler:

PKG_FFLAGS = -std=legacy

With that, the error turned into a warning and NicheMapR compiled. I don't think that this would cause any issue to users using an older version of gfortran (or in other OSs, I haven't tried any of those cases though), so it might be good to have that file in case gfortran is updated in other OSs. 

All the best,
Urtzi

NicheMapR

unread,
Jul 16, 2025, 11:48:02 PM7/16/25
to NicheMapR
Hi Urtzi,
Interesting - thanks for flagging. It was because that function also had a variable with the same name it I think, so I've made a change that shoudl rectify the problem and pushed it to github.
All the best,
Mike

urtzi enriquez

unread,
Jul 17, 2025, 4:12:54 AM7/17/25
to NicheMapR
Hi Mike,
I also tried that (and declaring FUN and FUNWING as EXTERNAL first and as DOUBLE PRECISION, in all possible combinations), but both functions collide for some reason. So, even with your change it does not compile with the most recent fortran compiler. The only way that nmr compiles is with the Makevars file passing the flag...
All the best,
Urtzi

Reply all
Reply to author
Forward
0 new messages