[tao-bugs] Issues Compiling with Solaris Studio 12.4 compiler
jim.melton at lmco.com
Mon Oct 30 19:13:56 CDT 2017
First, I know that Solaris is not really supported.
Second, I know that Studio 12.4 is not the newest version, but it's what I have approved for use at this time.
Third, I know I'm not building the latest version of ACE/TAO. However, I've checked the GIT repo and the issue still exists.
Fourth, I have other COTS products that preclude me using the C++11 features of the compiler (!*&^#), so I'm trying to get it to be as backwards compatible with 12.2 as possible.
TAO VERSION: 2.3.0
ACE VERSION: 6.3.0
HOST MACHINE and OPERATING SYSTEM: Oracle SunFire X4270 M2 / Solaris 11.3
TARGET MACHINE and OPERATING SYSTEM: same
COMPILER NAME AND VERSION: Solaris Studio 12.4 (CC 5.13)
THE $ACE_ROOT/ace/config.h FILE: config-sunos5.11.h
(I created this and it includes config-sunos5.10.h and adds the following clause:
#if (__SUNPRO_CC >= 0x5130)
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
CFLAGS += -std=sun03 -features=zla
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features: N/A
AREA/CLASS/EXAMPLE AFFECTED: Does not link
DOES THE PROBLEM AFFECT:
The Solaris Studio 12.4 compiler template rules are different from prior versions. When building TAO/orbsvcs/DevGuideExamples/NotifyService/SupplierSideNC, the build fails because
TAO_Notify_Container_T<TAO_Notify_Proxy>::Destroyer::__vtbl is undefined (repeat for other instantiations; same issue exists in multiple directories)
This compiler does not generate a v-table for the embedded class TAO_Notify_Container_T<T>::Destroyer (which derives from TAO_ESF_Worker<T>) because at the point of definition no virtual methods are invoked. Because of the way this class is used, it does not get fully instantiated when the library is built, resulting in the above link errors.
Delete embedded class Destroyer. Note that this class has an error; overridden virtual function "work()" should be declared in public scope.
Delete the definition of TAO_Notify_Container_T<TYPE>::Destroyer::work
In method TAO_Notify_Container_T<TYPE>::destroy() add these lines at the beginning of the method:
class Destroyer : public TAO_ESF_Worker<TYPE>
virtual void work(TYPE *type)
This change removes the Destroyer functor from embedded dependent scope and ensures that it can be fully instantiated when the container's destroy method is instantiated. I wouldn't mind an explanation from someone smarter than me.
Software Architect, Fusion Programs
Lockheed Martin RMS
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tao-bugs