This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Fortran Compiler Error CMBFAST

Igor Peshansky wrote:
> Doesn't foo.F represent a FORTRAN file that needs to be preprocessed
> by the C preprocessor?  Changing foo.F to contain
> #include ""
> makes it work for me.

That is no doubt the difference. As I said, I don't use
FORTRAN enough to know what others would expect, though
this difference is spelled out in the info file--files
with .F/.FPP/.fpp extensions are preprocessed using the
C preprocessor.

It's still not clear that G77 is doing the right thing,
though. Even though CPP is used, include directives are
still processed. The problem is that the preprocessed
output files are in a temp directory, so it's looking
in the wrong place (creating in that directory
allows it to succeed, confirming this). G77 on my Linux
box does the same thing of course, but somehow it finds
the include file anyway.

>> So it seems that the rules by which the preprocessor
>> looks in the current directory and/or the directory
>> containing the source file does not apply to files
>> named *.F for some reason. It's possible that this
>> was intentional, although I don't get this behavior
>> on my Linux box (which granted is using GCC version
>> 3.2.3, so it could have changed since then...).
> Does running f77 with '-v' help?

Yes it does. Cygwin's version is preprocessing using
cc1, whereas my RedHat Linux box running GCC 3.2.3 is
using tradcpp0, so something is different in the way
preprocessing is done. I'm still not entirely clear on
what's different, since both are preprocessing to a
temp directory, but something is different.

Since I'm not a big FORTRAN user, I can't comment on
whether the current behavior is acceptable or not, so
I'm going to pass the buck for now. But this is a bug,
either in GCC/G77 (at least the Cygwin port of it) or
in CMBFAST (which expects the other behaviour in its
build process).


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]