Topic: SF Linux: file not found in a stated search directory

In SF Linux

In Options
    > Project options
        > File locations
            > Search directories
..I have added a pathname to a directory called 'INCLUDE'.

The full pathname to the directory is
/home/jmw/DEV/Fortran/IOLibWin/Source/INCLUDE
That pathname has a file in it called AscTyp.inc

Source file AInput.for has the statement,
      INCLUDE  'ASCTYP.INC'

When I try to BUILD, SF returns the error message

Source/AInput.for:36: Error: Can't open included file 'ASCTYP.INC'
Error(E42): Last command making (build64/AInput.o) returned a bad status
Error(E02): Make execution terminated

I have tried changing the filename to ASCTYP.INC.
That appears not to be the problem.
---
John

Re: SF Linux: file not found in a stated search directory

John,

Can you post the contents of the Makefile?

Jeff Armstrong
Approximatrix, LLC

3 (edited by JohnWasilewski 2016-01-27 03:22:50)

Re: SF Linux: file not found in a stated search directory

==============================================================================
Generating Makefile... Okay
==============================================================================
Compiling Source/AIF.for
Compiling Source/MODULES/mCONFIG.for
Compiling Source/MODULES/mFiles.for
Compiling Source/MODULES/mLUNITS.for
Compiling Source/AInput.for
Source/AInput.for:36: Error: Can't open included file 'ASCTYP.INC'
Error(E42): Last command making (build64/AInput.o) returned a bad status
Error(E02): Make execution terminated

* Complete *



HERE IS THE MAKEFILE
Please note that I encountered this error when just starting to port my project from Windows to Linux, so there may well be other things that I have not yet found, that will need changing, because my Windows and Linux directory structures are slightly different.

[ I HAVE EDITED THIS POST AFTER A FEW DAYS,    ]
[ TO REMOVE THE MAKEFILE THAT I HAD PASTED   ]
[ BELOW HERE, BECAUSE THE MAKEFILE NEEDED  ]
[ A LOT OF SCROLLING TO GET PAST IT AND READ  ]
[ ON, BUT THE SOLUTION SHOWN IN LATER POSTS ]
[ HAS NOTHING TO DO WITH THE MAKEFILE - John ]

Re: SF Linux: file not found in a stated search directory

John,

What is the name of the file, in case-sensitive form, of the file you're trying to include? The Makefile looks fine (I'm not saying it is fine, though), so I'm trying to figure out what's wrong.

Jeff Armstrong
Approximatrix, LLC

Re: SF Linux: file not found in a stated search directory

The 'include' statement that failed is,

      INCLUDE  'ASCTYP.INC'

.

The file name in the INCLUDE subdirectory was, 'asctyp.inc'.

I had thought already that the fault might lie in the case-sensitivity of Linux file names.
I had therefore tried already - or so I thought I had done - to re-BUILD, after, first, re-naming the file in the INCLUDE subdirectory to 'ASCTYP.INC', and I believed it to have made no difference.  However, I have just tried it again, and it DID solve the problem. 
I must, therefore, have made a mistake when I tried this correction the first time, and I apologise for wasting your time, Jeff.

I am wondering nonetheless, in view of the fact that FORTRAN is normally not case dependent, do you know of any setting one can use in GFortran that will over-ride the case-dependence of Linux for file names?  Alternatively, could the Linux version of SF be fitted with a clickable tick-box option in Project Options-->File locations-->Search Directories, to make filenames case-independent?

If neither of these is on the cards then this won't matter all that much, because Linux users should know already that filenames and pathnames mentioned in the source codes have to be case-matched with the names of the files and paths to which they refer, but this will then detract just in a small way from the ability of SF in Linux to use SF projects developed in Windows seamlessly.  Users will need to REMEMBER to check projects ported from Windows for INCLUDE filename case compatibility with source codes.

Just to re-confirm, when I changed about six or eight saved filenames in my INCLUDE sub-directory to match the cases of the filenames referred to by dozens of INCLUDE statements in my source codes in this project, SF for Linux did then BUILD it completely successfully, without further alterations of any kind.
---
John