[tao-bugs] Issues Compiling with Solaris Studio 12.4 compiler

Melton, Jim 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)

#define ACE_ANY_OPS_USE_NAMESPACE

#endif

)



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

ace_for_tao=1

fast=0

rwho=0

buildbits=64

threads=1

CFLAGS += -std=sun03 -features=zla

include $(ACE_ROOT)/include/makeinclude/platform_sunos5_sunc++.GNU



    CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features: N/A



    AREA/CLASS/EXAMPLE AFFECTED: Does not link



    DOES THE PROBLEM AFFECT:

        COMPILATION?

        LINKING? yes

        EXECUTION?

        OTHER?



    SYNOPSIS:

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)



    DESCRIPTION:

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.



    REPEAT BY:

Compiling TAO



    SAMPLE FIX/WORKAROUND:

TAO/orbsvcs/orbsvcs/Notify/Container_T.h:



Delete embedded class Destroyer. Note that this class has an error; overridden virtual function "work()" should be declared in public scope.



TAO/orbsvcs/orbsvcs/Notify/Container_T.cpp:



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>

{

public:

                virtual void work(TYPE *type)

                {

                                type->destroy();

                }

};

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.
--
Jim Melton
Software Architect, Fusion Programs
Lockheed Martin RMS
(720) 922-5584


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-bugs/attachments/20171031/d2d83f16/attachment.html>


More information about the tao-bugs mailing list