cpp routine error

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
DINAKAR
Participant
Posts: 8
Joined: Fri Aug 08, 2008 11:45 am
Location: pune

cpp routine error

Post by DINAKAR »

Hi all,

We have some requirement where we need to invoke the cpp routine from DS to do some complex calculations,

To check if we are able to do so, we have developed a small dummy cpp routine having few input parameters and returning a char as follow,

/home/abc/test1.cpp

#include<stdlib.h>
#include <string.h>
char test1(char param1, int param2)
{
return param1;
}


Note: cpp program is in home directory,

I complied the cpp routine using following command to create objet file test1.o (We have IBM AIX machine)

/usr/vacpp/bin/xlC_r -O -q64 -c test1.cpp

In designer created new parallel routine by giving path to /home/abc/test1.o


I am using the same routine in transformer as follows,

test1(Dslink.param1,Dslink.param2) and assigning value to output character field.


Job is compiled successfully, but during run time getting following error,


Transformer_1: Failed to load the library "V0S1_test_cpp_Transformer_1.o"; 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_test_cpp_Transformer_1": rtld: 0712-001 Symbol test1__FScT1 was referenced
from module /opt/IBM/InformationServer/Server/Projects/DEPO_DEV/RT_BP750.O/V0S1_test_cpp_Transformer_1.o(), but a runtime definition
of the symbol was not found.
rtld: 0712-002 fatal error: exiting.. [transform/transform.C:1710]


Looks like some library path need to be setup correctly or appropriate option need to set.

I did researched on this forum and cam to know about LIBPATH from prevoius posts, then I tried explicitly overriding this variable in job properties and in the direvctior I can see value as follows,

LIBPATH=/opt/IBM/InformationServer/Server/Projects/DEPO_DEV/RT_BP750.O:/opt/IBM/InformationServer/Server/DSComponents/lib:/opt/IBM/InformationServer/Server/DSComponents/bin:/opt/IBM/InformationServer/Server/DSParallel:/opt/IBM/InformationServer/Server/PXEngine/user_lib:/opt/IBM/InformationServer/Server/PXEngine/lib:/opt/IBM/InformationServer/Server/Projects/DEPO_DEV/buildop:/usr/teragss/aix-power/client/lib:/opt/IBM/InformationServer/Server/branded_odbc/lib:/opt/IBM/InformationServer/Server/DSEngine/lib:/opt/IBM/InformationServer/Server/DSEngine/uvdlls:/opt/IBM/InformationServer/ASBNode/apps/jre/bin:/opt/IBM/InformationServer/ASBNode/apps/jre/bin/classic:/opt/IBM/InformationServer/ASBNode/lib/cpp:/opt/IBM/InformationServer/ASBNode/apps/proxy/cpp/aix-all-ppc_64:/usr/lib/lib_64:/usr/lib:/usr:/usr/bin:/usr/vacpp:/usr/vacpp/bin:/usr/vacpp/bin/xlC_r:/usr/vac/bin/:/home/abc/:/lib


It does points to my home directory /home/abc/ where object file is residing.... still no luck! Can anyone please guide me what exactly is going wrong here.. Appreciate your time and response.
Post Reply