Topic: Target (build\x.o) is defined recursively

I'm now getting this in my rather large project.

And it is a show stopper -- or is there some way around it?

-----
Linda

Re: Target (build\x.o) is defined recursively

Linda,

Is it a certain file that's causing it?  You can email me directly if you want with filenames, and I'll have a look ASAP.  I'm guessing a module name is showing up as required and provided by the same source file erroneously.

Jeff Armstrong
Approximatrix, LLC

Re: Target (build\x.o) is defined recursively

Error(F37): Target (build\SQLiteFortranRoutines_NO.o) is defined recursively  -- I don't mind sharing it on the list.  This file has not changed (nor should any new files be accessing the module name) since early January.

If you need me to, I can send the whole project again.

-----
Linda

Re: Target (build\x.o) is defined recursively

Linda,

The issue is that Simply Fortran thinks that ISO_C_FUNCTION_BINDING is both provided and required by that file.  However, normally Simply Fortran detects this and doesn't include directives in the makefile that would cause the circular dependency.  I'm not sure why it's occurring in this particular case. 

What you can do for the time being is replace all occurrences of:

Use ISO_C_FUNCTION_BINDING

with:

! Use ISO_C_FUNCTION_BINDING

That allows the build to progress.  I'm currently continuing your compilation to see if any other similar issues occur.

Jeff Armstrong
Approximatrix, LLC

Re: Target (build\x.o) is defined recursively

I will do that.  I have a few other files where basic makefile generators (not SimplyFortran) include them -- I had to revise the one I used before.

-----
Linda

Re: Target (build\x.o) is defined recursively

Linda,

I'm running into some additional dependency errors.  I'll need to look into this a bit more deeply, but I should have a patch ready tomorrow. I'm sorry about all this.

Jeff Armstrong
Approximatrix, LLC

Re: Target (build\x.o) is defined recursively

Yes, as did I.  I don't think we've added any odd dependencies since the project I sent you -- so the project you have is good.

It is faster though!  That's a good thing.

-----
Linda

Re: Target (build\x.o) is defined recursively

Linda,

On first glance, I actually think the source of your original error is the existence of the disabled file "SQLiteFortranRoutines.f90."  The dependency checker is looking at disabled files in version 1.41, which it shouldn't be.  Because the disabled file contains a module named the same thing, it incorrectly assumes that it is not provided by "SQLiteFortranRoutines_NO.f90" and says it is a required module.

This error was a nasty little bug that snuck through testing.  I'll patch for it tomorrow.  Additionally, there may be some other related dependency issues that I'm looking into this evening.

Jeff Armstrong
Approximatrix, LLC

Re: Target (build\x.o) is defined recursively

Linda,

One last update - the errors are occurring due to case sensitivity in module names.  That's the source of the remaining errors.  I'll have everything patched tomorrow.  Again, sorry for the trouble.

Jeff Armstrong
Approximatrix, LLC

Re: Target (build\x.o) is defined recursively

cool.  yes, looking at disabled modules is not a good thing.  (I did like and obviously used that feature).

Ideally, we shouldn't have relied on case sensitive module names.

-----
Linda

Re: Target (build\x.o) is defined recursively

Linda,

The patched version 1.41 is now available, and it should fix the dependency issues you've reported.

Jeff Armstrong
Approximatrix, LLC