Topic: fatal error: no input files; unwilling to write output files - What?

In using Version 3.23 build 3691 (GTK+) on a Mac Mini and was modifying a previously working program that I last visited in early February. There are no input files for this program. I assign values to variables inside the program and generate permutations of numbers until the desired permutation is achieved. Then I write the result out via
Write (*,*)
and
Write (*,"(A3)", advance = "no") myvariable
style statements

I get:
Generating target
gfortran: fatal error: no input files; unwilling to write output files
compilation terminated.
Error: Last command making (target) returned a bad status
Error: Make execution terminated

After I finished the Mods, saved the source, saved the project, build and launch, it ran the program as it was before the mods. In the project folder, I found a target, makefile, fort.100, a build folder, and a file named unix executable (maybe I compiled to a standalone) - all with the early Feb dates.

I moved them to the trash so I just had the .f95 and .prj files with today's date. Then I saved, and build
and the MakeFile appears in the project folder along with an empty build folder.

I ran some unmodified programs from the same era (with this newer Simply Fortran version), and they are working.

So I'm don't know why the build is unhappy. The program is not supposed to have input files.

I'm not as young as I used to be so 12:30 AM is quitting time - for now.

That issue with not writing because there are no inputs is puzzling.

I need insight into that.
Thank you,

PS: Yes, next time I'll save the original, copy the source, and start a new project with that source as a starting point.

Re: fatal error: no input files; unwilling to write output files - What?

What version of macOS are you using?

The macOS security features may be blocking the creation of files in the project directory if you're just starting with a freshly installed version.  Try opening the source file by selecting "Open..." in the File menu or opening the project via "Open Project..." in the Project menu.  Using the file selection window may prompt for permissions that have not yet been granted, clearing up the issue.

I'm trying to replicate the problem on a fresh macOS install, but I can't seem to do so.

Jeff Armstrong
Approximatrix, LLC

Re: fatal error: no input files; unwilling to write output files - What?

Jeff,
Thank you for your reply. I am running OS 12.3.1
After the "failure to communicate" compiler message, I opened, by clicking the .prj file in its folder, another program of the same vintage. I didn't modify that one but did build and launch. It worked fine.

I'm guessing my mods introduced an error but there were no compiler complaints about the syntax.

These programs are used to solve puzzles by brute force trying number permutations. When I started out, I thought it would be faster to generate, on time, a file of all the possible permutations for a given number base, then the program would just read that file to pull off numbers. A perfectly reasonable idea for base 10. But as the Base increased (11, 12, 13), so did the file size and time to write/read. Amazing but true, I found algorithms that could generate the numbers, within the program, faster than I could read a previously generated file of them. Sort of like having a point-of-demand water heater rather than holding the hot water in a tank.

So my next goal was, instead of having a separate program for each number base, to have a general program where I just need to change the number base variable and some other variable relationships - leaving any looping and I/O (actually just "O") alone.

I could easily start new and paste in parts from the older source into it, but I wouldn't learn anything about the error that way. So I'll do the tried and true method of commenting large sections out until I get a build/launch, then uncomment sections until it fails.

I'll report back, embarrassing though it may be, where the error finally appeared.

4 (edited by designer 2022-04-09 00:36:38)

Re: fatal error: no input files; unwilling to write output files - What?

I commented everything out except
Program myprogramname
End Program myprogramname

And still got:
Error: Last command making (target) returned a bad status
Error: Make execution terminated

I started a new project, using the Command-Line template and following the tutorial.
When I write:
program GenPermCode
implicit none
print *, "welcome to FORTRAN"
end program GenPermCode

and try to Save under file, the whole file menu is disabled (grayed out).
There's a big red dot after the line number before the end program GenPermCode that I don't recall seeing before.
When I clicked on it, it went away.
When I try to build, a message says the .f95 has not been saved - which is as it should be because when I highlight it and try to save under File, the whole menu is disabled.

This is on an Intel MacMini running OS 12.3.1

Re: fatal error: no input files; unwilling to write output files - What?

I reloaded the latest version and slowly followed the simplest example. My guess is, I might have forgotten to push a Start in the project steps. But I now have access to Save under file. I do often forget to add that .fxx extension. Too bad that can't be set by default.

A slight confusion is, that I can designate a location/folder for a project to reside. But somewhere along the steps, a folder with the project's name is created, separate from the folder I specify with New Project.

These are all basic learning step things I knew four months ago.

Now to add little bits at a time and create something usefull.