Re: gfortran compiler problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



6 Nov 2024 4:19:59 am George Rinker <gar137@xxxxxxxxxx>:

What prompted me to ask was a compiler error flag that pointed to column 72 of the first line of the source code main program, which was unchanged from what had previously been compiled many times. The first thing that occurred to me was that a bad non-printing character had somehow crept into the line, and I spent a while moving things around and re-editing it. Without success. Eventually I found the problem, which was that a subroutine declaration in one of my libraries had been inadvertently removed, so that a bunch of dead code with an end statement lurked far down in the source. I guess that was why the error pointer was so far off.

My bigger concern is why the Fortran errors get dumped to my terminal (cmd.exe in Windows 10) in such a way that the terminal hangs and I have to kill the window and restart it. The first line of the error message is OK, but subsequent lines are garbled and hang the I/O. Whatever routines gcc uses to dump those subsequent messages, they are not the same as what is used for the first one, or for other compiler messages. Or their parameters are different. That's what I'd like to track down.

Which gcc version are you using? It would be best to see if this reproduces with a currently supported version.

Also, cmd.exe is a shell, not a terminal. The terminal is probably conhost.exe, or maybe windows terminal if you opted to install it. There is also mintty, but probably you'd know if you were using it.


The problem is independent of the source code being compiled.

- George Rinker


On 2024-11-05 16:43, Peter0x44 wrote:
On 2024-11-04 23:57, George Rinker wrote:
I've been having some problems getting my source code compiled with gfortran. In particular, I get inexplicable fatal errors with pointers to code lines that are legal and have compiled many times before, and the error messages are not informative and hang the command shell I'm using (cmd.exe). There seem to be problems with stderr, stdin, and stdout in the compiler, presumably due to incompatible terminal assignments. I've been writing Fortran programs continually for almost 60 years (since 1967), so it's not like I'm new at this. Is there a forum or something where I can get advice about this sort of thing?

- George Rinker

You can get gfortran from w64devkit:
https://github.com/skeeto/w64devkit/releases/latest

It is hard to comment further without more details, such as perhaps windows version or the gcc version you are using, or the code itself.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux