• ACE_Service_Gestalt::process_directive fails when loaded .so has unreso

    From Danny / Torque Video@21:1/5 to All on Fri Sep 28 21:56:35 2018
    We're porting old code to ACE 6.4.8. process_directive() fails if the library being loaded has unresolved symbols.

    Specifically, we load 'lib/libecpav.so', which contains references to symbols in 'lib/libecptesting.so'.

    The transcript and PRF is below.

    Thanks!

    12:26:34.376354 - process_directive(dynamic ecp_av_module Service_Object * ecpav:_make_EcpAVFeederModule() " ")
    ACE (13903|3069991760) SG::process_directive, repo=0xa036420 - dynamic ecp_av_module Service_Object * ecpav:_make_EcpAVFeederModule() " "
    ACE (13903|3069991760) SG::process_directives_i, repo=0xa036420 - dynamic ecp_av_module Service_Object * ecpav:_make_EcpAVFeederModule() " "
    ACE (13903|3069991760) - SCG:<ctor=0xbfcf3118> - config=0xa0363f0 repo=0xa036420 superseded by repo=0xa036420
    ACE (13903|3069991760) SG::initialize - repo=0xa036420, name=ecp_av_module - looking up in the repo
    ACE (13903|3069991760) STDG::<ctor>, repo=0xa036420, name=ecp_av_module - beginning at [0]
    ACE (13903|3069991760) LN::open_dll - path=ecpav
    ACE (13903|3069991760) DLL_Handle::open ("libecpav.so", 0x101) -> failed: /usr/local/ecp/lib/libecpav.so: undefined symbol: _ZTI19EcpTclTestingModule
    ACE (13903|3069991760) DLL_Handle::open ("ecpav.so", 0x101) -> failed: ecpav.so: cannot open shared object file: No such file or directory
    ACE (13903|3069991760) DLL_Handle::open ("ecpav", 0x101) -> failed: ecpav: cannot open shared object file: No such file or directory
    ACE (13903|3069991760) DLL_Handle::open ("ecpav"): Invalid handle error: no error
    ACE (13903|3069991760) DLL_Manager::open_dll: Could not open dll ecpav.
    ACE (13903|3069991760) DLL_Handle::close - ecpav (handle=0, refcount=0)
    ACE (13903|3069991760) LN::open_dll - Failed to open ecpav: no error

    ACE VERSION: 6.4.8

    HOST MACHINE and OPERATING SYSTEM: 32-bit Centos 6.6 4.4.127-1.el6.elrepo.i686
    COMPILER NAME AND VERSION (AND PATCHLEVEL): c++4.9 (GCC) 4.9.4

    THE $ACE_ROOT/ace/config.h FILE:
    #include "config-linux.h"
    // For debugging
    #define ACE_HAS_DUMP
    #define ACE_HAS_REACTOR_NOTIFICATION_QUEUE
    #define ACE_REACTOR_NOTIFICATION_ARRAY_SIZE 1024

    THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE
    exceptions=1
    inline=1
    optimize=1
    shared_libs_only=1

    ifndef debug
    debug=0
    endif
    threads=1

    TAO_ORBSVCS = Naming
    include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

    # Use -mno-avx so Valgrind works. DW
    CCFLAGS := $(strip $(subst -fno-implicit-templates,,$(CCFLAGS))) -fdiagnostics-color=auto -mno-avx -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-sse2avx
    OCCFLAGS += -O3 -march=pentium4


    CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
    [no such file present]

    AREA/CLASS/EXAMPLE AFFECTED: Service process_directive()

    DOES THE PROBLEM AFFECT: EXECUTION

    SYNOPSIS:
    Cannot load service string using ACE_Service_Gestalt::process_directive() when the library contains unresolved references.

    DESCRIPTION:
    Class "EcpAVFeederModule" is a dynamic service and has "ACE_FACTORY_DEFINE(ACE_Local_Service, EcpAVFeederModule)" at the end of its .cpp file. There is no ACE_XX macro in the header file. The class is NOT enclosed in any namespace.

    The class is compiled into shared library libecpav.so. EcpAVFeederModule makes calls to functions defined in another library, libecptesting.so.

    We pass, to process_directive, the following description string:
    dynamic ecp_av_module Service_Object * ecpav:_make_EcpAVFeederModule() " "

    process_directive() appears to fail because DLL_Handle::open() fails opening libecpav due to unresolved symbols:

    ACE (13903|3069991760) DLL_Handle::open ("libecpav.so", 0x101) -> failed: /usr/local/ecp/lib/libecpav.so: undefined symbol: _ZTI19EcpTclTestingModule

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)