OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000297OMNeT++IDE / C++ developmentpublic2011-05-11 07:022011-05-11 07:04
Assigned Toandras 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version4.1 
Target VersionFixed in Version 
Summary0000297: Build: inclusion of _m.h files may fail due to .msg file not translated to C++ in time
DescriptionSometimes there are spurious "cannot include xxx_m.h: no such file or directory" errors during build, while the corresponding .msg file exists. The Makefile somehow doesn't invoke opp_msgc in time for that .msg file.

Analysis reveals that this happens when the .cc file includes xxx_m.h via a header file (say foo.h) which is marked as "ambiguous include" in the IDE. (The warning for the #include "foo.h" line is: "Makefile autodeps: ambiguous include (more than one matching file found)", meaning there are more than one foo.h files in the project.) Looking at the Makefile, the dependencies for the .cc file DON'T contain foo.h (or xxx_m.h), which is apparently why make doesn't know that xxx_m.h will be needed for compiling the .cc file, and doesn't invoke opp_msgc.

Thus, the root cause of the problem seems to be that the makefile generator leaves out ambiguous includes from the dependencies. Instead of leaving out foo.h, it should play safe and list both (all) foo.h files in the project as the dependency of the .cc file.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
andras (administrator)
2011-05-11 07:04

Events go like this:
 - #include "TED.h" is ambiguous in some
 - thus, files that TED.h includes are not counted as dependency for
 - so, if even TED.h includes IntServ_m.h, IntServ_m.h is NOT listed in's dependency list in the generated Makefile
 - therefore, the Makefile doesn't ensure that IntServ.msg is processed with opp_msgc before is compiled
 - result: IntServ_m.h is missing when is compiled --> ERROR
andras (administrator)
2011-05-11 07:04


- Issue History
Date Modified Username Field Change
2011-05-11 07:02 andras New Issue
2011-05-11 07:04 andras Note Added: 0000436
2011-05-11 07:04 andras Note Added: 0000437
2011-05-11 07:04 andras Status new => resolved
2011-05-11 07:04 andras Fixed in Version => 4.2b3
2011-05-11 07:04 andras Resolution open => fixed
2011-05-11 07:04 andras Assigned To => andras

Copyright © 2000 - 2022 MantisBT Team
Powered by Mantis Bugtracker