Unix Technical Forum

runtime linker failing to load symbols on some machines

This is a discussion on runtime linker failing to load symbols on some machines within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello, I'm having an odd problem where an executable fails to find a symbol in a shared library. The ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 10:47 AM
crabboy@gmail.com
 
Posts: n/a
Default 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 <map>
#include <string>
#include <vector>

void test();

std::map<std::string, std::map<std::string, std::map<std::string,
std::vector<unsigned int> > > > 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 10:48 AM
crabboy@gmail.com
 
Posts: n/a
Default 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com