Failed to load the library

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sensiva
Premium Member
Premium Member
Posts: 21
Joined: Tue Aug 22, 2017 10:39 am

Failed to load the library

Post by sensiva »

Hello,

I am getting the same error as noted here.

Code: Select all

trfRoutine: Error when checking composite operator: Failed to load the library "V0S1_TestJob_trfRoutine.so"; either the directory containing the library file
is not on the library search path, or the library was compiled on a system
that is incompatible with this system: Could not load "V0S1_TestJob_trfRoutine": /xxxx/iws/xxx/xxx/xxx/RT_BP369.O/V0S1_TestJob_trfRoutine.so: undefined symbol: DSGetProjectList.
My routine works fine if there is no call to ds functions. I searched the site for similar other errors and implemented stuffs like updating the LD_lib path, shell search path, compiling with different other options provided in the site. I have not restarted the datastage server after making any of these changes as ours is a mutulaized server. Not sure if that is required as well.

ld path = /usr/lib:.:/bustools/oracle/product/12.1.0.2_client/lib:/bustools/wmq/800/lib64
shell search path = /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:.

I updated both the above paths to point to my object file but didnt work, i get the same error.

These are my compiler options
compiler OPT = -c -O -fPIC -Wno-deprecated -m64 -mtune=generic -mcmodel=small
compiler = g++

My programs is very simple

Code: Select all

#include <stdio.h>
#include "/xxxx/iws/InformationServer/Server/DSEngine/include/dsapi.h"

char* projects1()
{
char* prlist;
prlist=DSGetProjectList();
return prlist;
}
Any pointers would be really helpful

Thanks
sen
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Did you do a Force Compile?

Maybe it can't find stdio.h ?
sensiva
Premium Member
Premium Member
Posts: 21
Joined: Tue Aug 22, 2017 10:39 am

Post by sensiva »

Yes, i did force compile as well. As suggested, i manually added the stdio.h file, but didnt make any difference. As mentioned earlier, any non ds function works fine. Only the DS functions are failing with "unknown symbol" error
sen
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Let's get you into your own post so you have control over its future... done.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The Symbol "DSGetProjectList" is in the library (yourpath)/Server/DSEngine/lib/libvmdsapi.so

Is that Directory in your LD_LIBRARY_PATH at runtime?
sensiva
Premium Member
Premium Member
Posts: 21
Joined: Tue Aug 22, 2017 10:39 am

Post by sensiva »

Hi ArndW

No, this path is not in my LD_LIBRARY_PATH. We have usr/lib which contains most object files but not libvmdsapi.so. Thanks for pointing, after updating the lib path, it works fine
sen
Post Reply