I am trying to revive the PLplot project (https://plplot.sourceforge.net/) in a fairly minimal way: just apply some patches to the build system. For this I wanted to build it again on Cygwin, as that allows me to easily install the various components that PLplot can use. But I am running into an odd problem that I cannot fathom.
(Note: the current version of PLplot does not directly support Ifx - simple matter to correct that, and there are incompatibilities with newer versions of Python and other language bindings. So, I thoguht this holiday period was a good time to pick up these minor maintenance issues)
I had to reinstall Cygwin (new computer) and with that the latest version of CMake, GCC, … When I run make - after configuring the build environment via CMake - it immediately stops with the message that it cannot find a particular source file. When I check that file via the path that is printed, I see it simply exists. I have checked the line endings (maybe make was including a carriage-return character in the file name?) but that was not the problem.
Does anyone know what might be going wrong or any suggestions on how to analyse this? Before (on my old laptop running Windows 10, now it is Windows 11) it all worked fine. I suppose I can post the question on the CMake mailing list as well, but this is quicker.
To eliminate seome simple explanations, run the command that produces the error like so:
cmd |cat -v -e -t
and see if the message has any non-printing characters that that makes visible
and list the file with
ls -q
ls -lLq FILENAME
and make sure the filename does not have a leading or trailing space in the name, and
file FILENAME
and make sure the file shows as a regular file. It is not clear what command you used to see the filename you were looking for, and doing it with those commands eliminates a few questions about the file and filenames. make sure the case of the file is not a problem, like ending in .F90 in onee place and .f90 in another, as
there are several options but by default in cygwin case sometimes causes some surprising issues. Did you actually use a command for that file only or that would read that file or just do a listing of the directory? That would just get some of the simpler explanations out of the way.
Does the filename have any non-alphameric characters like a dash in the filename?
The file is shown to be a “C source, ASCII text” by the file command. I copied the file name from the output of the make command, as captured via “make >aa 2>&1”. Nothing suspicious, also I could open the file in a small Fortran program with status=‘old’.
Hm, I think the problem is with the make utility, not with CMake: I have retained the original build configuration and when I tried to build just the object file that make has been complaining about, it gave the very same error message. So, that is with the original build files that had worked fine before.
And that was the problem! The first “make” utility on the path is one that has nothing to do with Cygwin. Well, that is clear.
Thanks for thinking along with me - I now know what I should do.