liby was compled on a sytem that is incompatible with this s

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
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

liby was compled on a sytem that is incompatible with this s

Post by suresh_dsx »

I created a parallel routine

// This is a C++ Routine (Sample1 routine)
#include <stdlib.h>
#include <stdio.h>
#include <iostream.h>
#include <string>
{
<Code>
}

Object file creation:

Compile and create object file:
bCC -O -c -ext -z +Z Sample1.cpp
Note: The compiler path is same as in the administrator
create exe file:
bCC Sample1.cpp -o Sample1

run the exe file:
./Sample1

Job:

rowgenerator--> Transformer stage--> seq file stage

In the transformer stage i am calling the routine
Sample1('n/a','n/a','n/a','n/a','n/a','n/a','n/a','n/a','n/a','n/a','n/a')

i am getting the below error.
The job is aborted (library file is not on the library search path). Do i need to add any internal file path to the routine?

Transformer_1: Failed to load the library "V0S1_Sample1_Transformer_1.sl"; 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_Sample1_Transformer_1": Unresolved external.


Any help greatly appreciated

Thanks
S_dsx
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You created an executable file, not a library.
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

Thanks for giving replay,

I tried with a simple cpp code.I followed the same procedure which I used previously but there are no arguments.

#include <stdlib.h>
#include <stdio.h>
int ObjTestOne()
{
int OutStr=321;
return OutStr;
}


Object file creation:

Compile and create object file:
bCC -O -c -ext -z +Z Sample1.cpp
Note: The compiler path is same as in the administrator
create exe file:
bCC Sample1.cpp -o Sample1

run the exe file:
./Sample1

Job:

rowgenerator--> Transformer stage--> seq file stage
In the transformer stage i am calling the routine Sample1()

I did not create any library. The job is working fine. It is giving proper output.

But I did the same logic for the below cpp file. I am passing 11 arguments to the routine. Still I am getting the same error.
Please share with me the syntax to create a library.

Thanks,

S_dsx
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

bCC Sample1.cpp -o Sample1
run the exe file:
./Sample1
That doesn't look right to me - you either have an executable or a library. What OS are you running on?
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

Operating system: Unix (HP-UX)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not in a position to check, but I thought under HP-UX you need to use "cc -aA" or the like to crate a shared library. Also, your entrypoint is called "ObjTestOne", not Sample1 - was this a typogrphical error?
Post Reply