Skip to content
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 doesn't generate all needed code #1809

Open
GixG opened this issue Mar 29, 2022 · 4 comments
Open

tao_idl doesn't generate all needed code #1809

GixG opened this issue Mar 29, 2022 · 4 comments

Comments

@GixG
Copy link

GixG commented Mar 29, 2022

Hello
Using the ACE-TAO-REPORT FORM

TAO VERSION: 3.0.6
ACE VERSION: 7.0.6

HOST MACHINE and OPERATING SYSTEM: x86_64, Fedora 35 

COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)

THE $ACE_ROOT/ace/config.h FILE:

#define ACE_HAS_IPV6
#define ACE_USES_IPV4_IPV6_MIGRATION
#include "ace/config-linux.h"

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU:

ssl = 1
inline = 0
buildbits = 64
optimize = 1
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
ssl=1
bzip2 = 1
zlib = 1
DOES THE PROBLEM AFFECT:
OTHER (please specify)?
tao_idl doesn’t generate all needed C++ code from idls

SYNOPSIS:

tao_idl doesn’t generate all needed C++ code (arg traits, templates) from idls

DESCRIPTION:

Trying to migrate from tao 1.5.10 to tao 3.0.6. Built the latter without issues.
But, when trying to compile the generated C++ code, a compilation error occurs (I tried to set/unset all tao_idl IMHO relevant flags, but no effect), the intermediary goal being a library containing the skeletons:

/bin/tao_idl -g /usr/bin/ace_gperf  -DTAO30 -Cw -aw -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_include=AnyTypeCode/TimeBaseA.h -Gse -Gsd -Gt -Gp -Gd -GC -GH -GT -I/usr/include/tao -I/usr/include/orbsvcs -I/lsp_oam_common/ext/idl/sard -I/lsp_oam_common/ext/idl/actl -o /lsp_oam_common/obj/x86_64/idl/amf /lsp_oam_common/ext/idl/amf/BulkDataFileManagement.idl;
Warning - /bin/tao_idl: "/lsp_oam_common/ext/idl/sard/OamFrameBody.idl", line 77: anonymous type found
…
g++ -Wall -g3 -O3 -ggdb -fPIC -pthread -fexceptions -fPIC -D_REENTRANT -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -O3 -ggdb -fPIC  -I/lsp_oam_common/obj/x86_64/idl/sard -I/lsp_oam_common/obj/x86_64/idl/actl -I/usr/include/ace -I/usr/include/tao -I/usr/include/orbsvcs -c /lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp -o /lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.o
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp: In member function ‘virtual OM::BulkData::Bulk_Reprise_Get_Reply* OM::BulkData::BulkDataCallBack::bulkRepriseGet(const char*, const char*)’:
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:954:27: error: ‘Bulk_Reprise_Get_Info_4’ is not a member of ‘TAO’
  954 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Get_Info_4>::in_arg_val _tao_info (info);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:954:50: error: template argument 1 is invalid
  954 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Get_Info_4>::in_arg_val _tao_info (info);
      |                                                  ^
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:954:64: error: expected initializer before ‘_tao_info’
  954 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Get_Info_4>::in_arg_val _tao_info (info);
      |                                                                ^~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:960:22: error: ‘_tao_info’ was not declared in this scope
  960 |       std::addressof(_tao_info),
      |                      ^~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp: In member function ‘virtual char* OM::BulkData::BulkDataCallBack::bulkRepriseSet(const OM::BulkData::Bulk_Reprise_Set_Info&, const char*)’:
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1006:27: error: ‘Bulk_Reprise_Set_Reply_4’ is not a member of ‘TAO’
1006 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Set_Reply_4>::ret_val _tao_retval;
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1006:51: error: template argument 1 is invalid
1006 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Set_Reply_4>::ret_val _tao_retval;
      |                                                   ^
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1006:62: error: expected initializer before ‘_tao_retval’
1006 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Set_Reply_4>::ret_val _tao_retval;
      |                                                              ^~~~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1012:22: error: ‘_tao_retval’ was not declared in this scope; did you mean ‘_tao_release’?
1012 |       std::addressof(_tao_retval),
      |                      ^~~~~~~~~~~
      |                      _tao_release
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp: In member function ‘virtual void OM::BulkData::BulkDataCallBack::sendc_bulkRepriseGet(OM::BulkData::AMI_BulkDataCallBackHandler_ptr, const char*, const char*)’:
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1184:27: error: ‘Bulk_Reprise_Get_Info_4’ is not a member of ‘TAO’
1184 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Get_Info_4>::in_arg_val _tao_info (info);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1184:50: error: template argument 1 is invalid
1184 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Get_Info_4>::in_arg_val _tao_info (info);
      |                                                  ^
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1184:64: error: expected initializer before ‘_tao_info’
1184 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Get_Info_4>::in_arg_val _tao_info (info);
      |                                                                ^~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:1190:22: error: ‘_tao_info’ was not declared in this scope
1190 |       std::addressof(_tao_info),
      |                      ^~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp: In member function ‘virtual void OM::BulkData::AMI_BulkDataCallBackHandler::bulkRepriseSet(const char*)’:
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:2352:27: error: ‘Bulk_Reprise_Set_Reply_4’ is not a member of ‘TAO’
2352 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Set_Reply_4>::in_arg_val _tao_ami_return_val (ami_return_val);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:2352:51: error: template argument 1 is invalid
2352 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Set_Reply_4>::in_arg_val _tao_ami_return_val (ami_return_val);
      |                                                   ^
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:2352:65: error: expected initializer before ‘_tao_ami_return_val’
2352 |   TAO::Arg_Traits< ::TAO::Bulk_Reprise_Set_Reply_4>::in_arg_val _tao_ami_return_val (ami_return_val);
      |                                                                 ^~~~~~~~~~~~~~~~~~~
/lsp_oam_common/obj/x86_64/idl/amf/BulkDataManagementClientC.cpp:2357:22: error: ‘_tao_ami_return_val’ was not declared in this scope; did you mean ‘ami_return_val’?
2357 |       std::addressof(_tao_ami_return_val)
      |                      ^~~~~~~~~~~~~~~~~~~
      |                      ami_return_val

It appears the tao_idl doesn’t generate anymore the “Arg traits specializations” seen in the tao_idl-1.5.10 – generated C++ file.
Please find attached an archive containing the relevant idls(only in 3.0.6 directory, since common), the 1.5.10 (only BulkDataManagementClientC.cpp) and 3.0.6 generated C++ code (whole relevant).

REPEAT BY:

[What you did to get the error; include test program or session
transcript if at all possible. ]

SAMPLE FIX/WORKAROUND:

[If available ]
tao_idl_3.0.6_error.zip

@jwillemsen
Copy link
Member

Please extend the TAO IDL_Test (see https://github.com/DOCGroup/ACE_TAO/tree/master/TAO/tests/IDL_Test) with a small reproducer that triggers the same error.

There is a warning about an anonymous type in your IDL, would recommend to resolve that warning first.

@GixG
Copy link
Author

GixG commented Mar 29, 2022

Hello
Sorry, but not being an active contributor to the tao_idl/tao in general (more like a user), I'm unsure what you mean... In the original post I attached an archive which contains, IMHO, all the relevant data, including the IDLs, the corresponding 1.5.10 and all the 3.0.6 generated files.

@jwillemsen
Copy link
Member

Please fork the https://github.com/DOCGroup/ACE_TAO repository and extend the IDL_Test with a reproducer IDL. In case you need help, consider commercial support so that someone can assist you with this issue, see https://github.com/DOCGroup/ACE_TAO/wiki/ACE-and-TAO-Commercial-support, that includes @RemedyIT, the company I work for.

@jwillemsen
Copy link
Member

See also https://docs.github.com/en/pull-requests/collaborating-with-pull-requests for more information about pull requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants