-
Notifications
You must be signed in to change notification settings - Fork 373
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
tao_idl mangles #include's by inserting absolute paths after relative prefixes #2049
Comments
As far as I remember we intended to support relative parts only, else you can’t move a tree to a different location easily. Also make install to a different location will not work with full paths in the generated code |
Could you note this restriction in Also, what about for generating IDL files outside of the source tree? Modern build systems prefer to generate files (including IDL sources) in a separate tree. How can |
Feel free to add support for an absolute path |
Version
ACE 7.0.11
Host machine and operating system
macOS 12.6.3
Compiler name and version (including patch level)
Apple clang version 14.0.0 (clang-1400.0.29.202)
The $ACE_ROOT/ace/config.h file
The $ACE_ROOT/include/makeinclude/platform_macros.GNU file
Contents of $ACE_ROOT/bin/MakeProjectCreator/config/default.features
Unmodified.
AREA/CLASS/EXAMPLE AFFECTED:
TAO_Core_idl
generates bad anyop header files, meaning projects like AnyTypeCode and Portable Server fail to build.The problem effects:
TAO cannot be built.
Synopsis / Description
Invoking
tao_idl
with absolute paths like below causes the generated anyop header files to include mangled/illegal paths when accessing the stub header.cd /Users/dev/Downloads/Test/ACE_wrappers/TAO/tao && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E env TAO_ROOT=/Users/dev/Downloads/Test/ACE_wrappers/TAO "LD_LIBRARY_PATH=/Users/dev/Downloads/Test/ACE_wrappers/lib" /Users/dev/Downloads/Test/ACE_wrappers/bin/tao_idl -g /Users/dev/Downloads/Test/ACE_wrappers/bin/ace_gperf -Sp -Sd -Sp -Sd -Sg -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h --idl-version 4 -as --unknown-annotations ignore -I/Users/dev/Downloads/Test/ACE_wrappers/TAO -I/Users/dev/Downloads/Test/ACE_wrappers/TAO/tao -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I .. -Wb,versioning_begin=TAO_BEGIN_VERSIONED_NAMESPACE_DECL -Wb,versioning_end=TAO_END_VERSIONED_NAMESPACE_DECL -SS -Sorb -GA -Gp -Gd -oA AnyTypeCode -Wb,export_macro=TAO_Export -Wb,export_include=tao/TAO_Export.h -Wb,anyop_export_macro=TAO_AnyTypeCode_Export -Wb,anyop_export_include=tao/AnyTypeCode/TAO_AnyTypeCode_Export.h -Sci -Gse -Gata -o /Users/dev/Downloads/Test/ACE_wrappers/TAO/tao -oS /Users/dev/Downloads/Test/ACE_wrappers/TAO/tao /Users/dev/Downloads/Test/ACE_wrappers/TAO/tao/BooleanSeq.pidl
BooleanSeqA.h
is generated with these lines:Notice the absolute path to
BooleanSeqC.h
(constructed from the-o
opt) is illegally appended totao/
. Notice that only the reference to the stub header is affected.The problem does not affect
BooleanSeqC.cpp
orBooleanSeqA.cpp
, which only include their neighbors (e.g.#include "BooleanSeqC.h"
and#include "BooleanSeqA.h"
). However I suspecttao_idl
's code will produce this error whenever any generated file includes a generated header for whichtao_idl
was passed an absolute path.Repeat by
See above. This happens to
BooleanSeqA.h
whenever anything is passed to-o
, even-o .
.Sample fix/ workaround
Only not passing
-o
causestao_idl
to emit a normal include#include "tao/BooleanSeqC.h"
.Instead of mangled paths, if both files lie in TAO_ROOT or something,
tao_idl
should resolve the absolute path into a relative path, and just emit#include "tao/BooleanSeqC.h"
. Or just always emit that, and rely on the consumer to set up include directories properly.The text was updated successfully, but these errors were encountered: