After upgrading to etch recently, I had a plaintive email from a user saying that some Fortran software she had downloaded now wasn’t compiling any more (when it had been previously).
The error message was pretty clear that the problem was with
g77 not being able to find the relevant include file - but there it was, right in the directory.
It transpired after a little Googling that
g77 (at least as of the version in etch) doesn’t use the current directory or the source file directory to look for include files in. The problem was readily solved by adding
-I. (note the dot!) in the
configure file & running
However, this seems to me to be a strange decision - for my intuition, looking in the current directory and in particular the source file directory for desired files makes sense. I can’t offhand find anything explaining why it works this way; and the fact that this code used to work fine implies that it’s not “it’s always been done this way” (although I’ve now upgraded all machines to etch so haven’t got a sarge box kicking around to test!).
There’s a bug report for
gfortran stating that it does include files in the current working directory while
g77 doesn’t (with a patch fixing the problem); but this also states that
g77 includes files in the same directory as the source file; which doesn’t actually seem to be the case with this version. Curious.
(yes, we do still have people using Fortran here. Lots of people, in fact!)