runtime linker failing to load symbols on some machines - Aix

This is a discussion on runtime linker failing to load symbols on some machines - Aix ; Hello, I'm having an odd problem where an executable fails to find a symbol in a shared library. The missing symbol is the map of maps x3 seen in the header below. Using the exact same executable and library, the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: runtime linker failing to load symbols on some machines

  1. runtime linker failing to load symbols on some machines

    Hello,

    I'm having an odd problem where an executable fails to find a symbol
    in a shared library. The missing symbol is the map of maps x3 seen
    in the header below.

    Using the exact same executable and library, the problem is only seen
    on some of our machines. The 5.1 ML4 machine that it is compiled
    on fails to load the object, another 5.1 and now a 5.3 base
    level machine. But it runs on a 5.2 and other 5.3 ML1 machines.
    This code has been around for a while and has only started showing
    having rtl errors in recent builds.

    Any help would be appreciated.

    TIA

    Gary Bak

    Here is the last part of the error and the files below:

    <...snip>
    _5_Node_v was referenced
    from module ./libtestShared.a(testShared.o), but a runtime
    definition
    of the symbol was not found.

    rtld: 0712-002 fatal error: exiting.


    --------------------File: testLib.h -------------------
    #include
    #include
    #include

    void test();

    std::map std::vector > > > mapCacheOffsetByConfigSectionAndKeyID;

    --------------------File: testLib.cpp -------------------
    #include "testLib.h"
    void test()
    {

    }

    --------------------File: main.cpp -------------------
    #include "testLib.h"
    main()
    {
    test();
    }

    --------------------File: Makefile -------------------
    CPP = xlC_r
    AR = ar

    %.o: %.cpp
    $(CPP) $(CPPFLAGS) $(BUILD_OPTIONS) $(ADD_OPTIONS)
    $(INCLUDE_PATH) $(ADD_INCLUDES) -c -o $@ $<

    libtestLib.a: testLib.o
    rm -f $@
    $(AR) rcs $@ $<

    testShared.o: libtestLib.a
    $(LD) -r -o tmp.o -L. -ltestLib
    $(CPP) -G -bernotok -qtwolink -qnamemangling=v5 -qmkshrobj
    -bloadmap:loadmap.out -o$@ tmp.o

    libtestShared.a: testShared.o
    $(AR) -rv $@ $<

    runme: main.o libtestShared.a
    $(CPP) -brtl -qtwolink -bloadmap:loadmap.out -o$@ main.o -L. -l
    testShared

    all: runme
    clean:
    rm -f *.a *.o


  2. Re: runtime linker failing to load symbols on some machines

    > I'm having an odd problem where an executable fails to find a symbol
    > in a shared library.


    It looks to be an AIX problem. One of the 5.1 machines was upgraded to
    5.3 ML 1 and the missing symbol error went away.

    Gary


+ Reply to Thread