-
Notifications
You must be signed in to change notification settings - Fork 108
Complaints about recursive rules #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Some of the source files contain a program at the end which uses the module. This use statement signals to the fpm build system that the module depends on itself. Thus, the recursive rule error message. Basic fix, remove the example programs from the end of the module source files. |
Hi Brad,
oh, I will have to check that - I was rather certain there was nothing like
that ... Thanks for looking into this.
Regards,
Arjen
Op di 21 jul. 2020 om 01:26 schreef Brad Richardson <
[email protected]>:
… Some of the source files contain a program at the end which uses the
module. This use statement signals to the fpm build system that the module
depends on itself. Thus, the recursive rule error message.
Basic fix, remove the example programs from the end of the module source
files.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#126 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YRYYYOIWSM7W3KDR5WLR4THA3ANCNFSM4PAASMNA>
.
|
Yes, two of the source files contained a test program (I should have a look at those :)). But when I removed them and tried again, I ran into another issue: a presumed relation between the names of the module and the source file that contains it. I will report it as a separate issue. |
Especially because this (module + program in a source file) is valid, fpm needs to be able to detect this and print a helpful message to the user. |
Yes, the error message was puzzling. If you know the design decisions
and usage constraints it is probably easy enough to locate the cause,
but for a novice user it will not immediately be clear.
Regards,
Arjen
Op di 21 jul. 2020 om 16:58 schreef Milan Curcic <[email protected]>:
…
Especially because this (module + program in a source file) is valid, fpm needs to be able to detect this and print a helpful message to the user.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I'll close this as fpm now supports having programs and modules in the same file and has removed any required relationship between file path and module name. |
I tried to use fpm on a somewhat more complex collection of Fortran modules and their test programs. They are all part of my Flibs project (http://flibs.sf.net). I copied the source files for the modules to a directory src and the sources for the test programs to test/xxx (well, for two test programs, to get started). Then I set up a fpm.toml file. All have been attached.
fpm gave me an error message:
Build system error - recursion detected:
Key type: FilesQ
Key value: build/gfortran_debug/computing/combinations.o build/gfortran_debug/computing/combinations.mod
Rules may not be recursive
As all the modules are standalone I am not sure what went wrong. Also, I noticed that with my first attempt it complained about a different (!) module than when I redirected the output.
It may be that the problem has already been solved - my version of fpm is one month old.
test-fpm-flibs.zip
The text was updated successfully, but these errors were encountered: