View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002361CMakeCMakepublic2005-10-13 10:402008-01-15 21:10
Reporter 
Assigned ToBrad King 
PriorityurgentSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002361: FORTRAN 9x module dependencies parsing
DescriptionFORTRAN 9x module dependencies parsing is not working properly due to the following problems:
1) The lexer file cmDependsFortranLexer.in.l specifies uppercase FORTRAN keywords (USE, MODULE, END, INTERFACE, INCLUDE etc.) only. The FORTRAN specification about keywords states that the language is case insensitive.
2) FORTRAN preprocessor (cpp, fpp) switches aren't passed to the cmake dependencies generator resulting in bogus dependencies. For example,

#ifdef DVF
use dflib
#else
use iolib
#endif

This generates two module dependencies while it must be one based on the value of DVF.
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0003109closedBrad King Fortran dependancy checker does not ignore comments 
related to 0005809closedBrad King Fortran 77/9x support enhancements 

  Notes
(0003144)
Brad King (manager)
2005-10-17 10:04

The lexer was taken with permission from another author who did not include case-insensitive regular expressions. I think the mistake was that flex was not run with the "-i" option to make the lexer case insensitive. I have re-run flex with this additional option and committed the changes:

/cvsroot/CMake/CMake/Source/cmDependsFortranLexer.in.l,v <-- cmDependsFortranLexer.in.l
new revision: 1.5; previous revision: 1.4
/cvsroot/CMake/CMake/Source/cmDependsFortranLexer.cxx,v <-- cmDependsFortranLexer.cxx
new revision: 1.3; previous revision: 1.2

This should address problem #1.
(0003145)
Brad King (manager)
2005-10-17 10:08

For problem 0000002 the same issue exists in the C and C++ dependency scanners:

#ifdef FOO
# include "foo.h"
#else
# include "bar.h"
#endif

will result in a dependency on both foo.h and bar.h. Fixing this is non-trivial. Does the extra module dependency actually prevent things from building or does it just make them rebuild a little too often?
(0004785)
Warren Turkal (reporter)
2006-08-28 19:54

For fortran90 at least, this problem causes failures in build. Basically, it looks like the generated makefiles don't know how to make the modules that are not supposed to be made. When a source file is erroneously marked as depending on one of those modules, the build fails.

For the first comment, if DVF is defined, you get a module called dflib, and you don't get iolib. If does not get built when DVF is defined, the generated makefiles can fill the presumed dependency of iolib for the source file.
(0010160)
Brad King (manager)
2008-01-15 21:10

This bug has been fixed by changes described in bug 0005809.

 Issue History
Date Modified Username Field Change
2007-10-03 15:49 Brad King Relationship added related to 0005809
2007-10-03 15:49 Brad King Relationship added duplicate of 0003109
2008-01-15 21:10 Brad King Status assigned => closed
2008-01-15 21:10 Brad King Note Added: 0010160
2008-01-15 21:10 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team