ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

TAO 2.5.10 compile error when using TAO_IDLFLAGS=-DTAO_LACKS_EVENT_CHANNEL_ANY

Open okellogg opened this issue 3 years ago • 2 comments

Using the ACE+TAO 6.5.10 ACE_wrappers distribution on a Linux x86_64, I did/got this:

cd $ACE_ROOT
cd ace
ln -s config-linux.h config.h
cd ../include/makeinclude
ln -s platform_linux.GNU platform_macros.GNU
cd $ACE_ROOT
make
[.......]
cd TAO
make TAO_IDLFLAGS=-DTAO_LACKS_EVENT_CHANNEL_ANY
[.......]
GNUmakefile: /tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/GNUmakefile.Quoter_RT_Event_Service_Server MAKEFLAGS=w -- TAO_IDLFLAGS=-DTAO_LACKS_EVENT_CHANNEL_ANY

g++ -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0   -I/tools/ACE_6.5.10+TAO_2.5.10 -D__ACE_INLINE__ -I../../../../.. -I../../../.. -I../../../../orbsvcs  -c -o .obj/QuoterC.o /tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/QuoterC.cpp
g++ -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0   -I/tools/ACE_6.5.10+TAO_2.5.10 -D__ACE_INLINE__ -I../../../../.. -I../../../.. -I../../../../orbsvcs  -c -o .obj/QuoterS.o /tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/QuoterS.cpp
g++ -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0   -I/tools/ACE_6.5.10+TAO_2.5.10 -D__ACE_INLINE__ -I../../../../.. -I../../../.. -I../../../../orbsvcs  -c -o .obj/Stock_Factory_i.o /tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_Factory_i.cpp
g++ -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0   -I/tools/ACE_6.5.10+TAO_2.5.10 -D__ACE_INLINE__ -I../../../../.. -I../../../.. -I../../../../orbsvcs  -c -o .obj/Stock_i.o /tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_i.cpp
/tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_i.cpp: In member function `virtual void Quoter_Stock_i::set_price(CORBA::Double)':
/tools/ACE_6.5.10+TAO_2.5.10/TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_i.cpp:86:10: error: `RtecEventComm::EventData' has no member named `any_value'
   e.data.any_value <<= this->data_;
          ^

I notice that the -DTAO_LACKS_EVENT_CHANNEL_ANY does not get passed down to the docs/tutorials/Quoter/RT_Event_Service compile flags. Is that intentional?

okellogg avatar Aug 13 '20 12:08 okellogg

tao_idl and C++ compiler flags are not automatically related, you should also update the C++ compiler flags, most easily both can be set in your platform_macros.GNU file.

Looks this tutorial doesn't support disabling this feature, please open a pull request to update this the tutorial to not compile the problematic code when TAO_LACKS_EVENT_CHANNEL_ANY is set, at that moment other tests are using the payload, see for example https://github.com/DOCGroup/ACE_TAO/tree/master/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated

jwillemsen avatar Aug 13 '20 12:08 jwillemsen

As a first step, here is the list of TAO files that access the RtecEventData any_value member :

docs/tutorials/Quoter/RT_Event_Service/Stock_i.cpp
docs/tutorials/Quoter/RT_Event_Service/Stock_Consumer.cpp
examples/Simulator/Event_Supplier/Event_Con.cpp
examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
interop-tests/AnyTypeCode/tao/Demo_i.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumer_i.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_Federated/EchoEventConsumer_i.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_Federated/EchoEventSupplierMain.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_Filter/EchoEventConsumer_i.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_Filter/EchoEventSupplierMain.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventConsumer_i.cpp
orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp
orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp
orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp
orbsvcs/orbsvcs/Log/RTEventLogNotification.cpp
orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp
orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp
orbsvcs/tests/Event/UDP/Consumer.cpp
orbsvcs/tests/Event/UDP/Supplier.cpp
orbsvcs/tests/FtRtEvent/PushConsumer.cpp
orbsvcs/tests/FtRtEvent/PushSupplier.cpp

My guess would be we have to go through the files and determine for each whether the test makes sense at all if any_value is absent:

  • If any_value is indispensable then exclude the test from the build
  • If any_value is used as an optional addon (e.g. the test also uses payload) include #ifdefs depending on TAO_LACKS_EVENT_CHANNEL_ANY

okellogg avatar Aug 17 '20 12:08 okellogg