Bug 2607

Summary: Problem with ordering of includes of *.pidl in IDL
Product: TAO Reporter: Simon McQueen <sm>
Component: IDL CompilerAssignee: DOC Center Support List (internal) <tao-support>
Status: ASSIGNED ---    
Severity: normal    
Priority: P3    
Version: 1.5.2   
Hardware: x86   
OS: Linux   

Description Simon McQueen 2006-07-20 07:56:56 CDT
I don't really know what to make of this.

The IDL compiler has no problems compiling:

#include "tao/PortableServer/PortableServer_include.pidl"
#include "tao/PI_Server/PI_Server_include.pidl"

#include "tao/RTPortableServer/RTPortableServer_include.pidl"

... or:

#include "tao/PI_Server/PI_Server_include.pidl"
#include "tao/PortableServer/PortableServer_include.pidl"

... but trying to compile:

#include "tao/PI_Server/PI_Server_include.pidl"
#include "tao/PortableServer/PortableServer_include.pidl"

#include "tao/RTPortableServer/RTPortableServer_include.pidl"

... produces:

../../../bin/tao_idl -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h
-I../.. test.idl
../../../bin/tao_idl:
"/home/sm/doccvs/ACE_wrappers/TAO/tao/RTPortableServer/RTPortableServer.pidl",
line 36: error in lookup of symbol: PortableServer::POA
terminate called after throwing an instance of 'FE_Bailout'

So it seems that the order that the files PortableServer_include.pidl and
PI_Server_include.pidl are included in is important iff they are followed by
RTPortableServer_include.pidl. Go figure.
Comment 1 Jeff Parsons 2006-07-20 08:33:18 CDT
I'm not sure what to make of it either, although we have seen the same thing 
with C++ header files in TAO. As far as I know, those cases were dealt with by 
just rearranging the order of includes, and no specific cause of the problem 
was ever found. Maybe I'll have more luck with the IDL compiler - it will be a 
while before I can get to it though.