C++ Comand to compile a routine on solaris

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
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

C++ Comand to compile a routine on solaris

Post by mab_arif16 »

Hi
I am trying to compile a C++ routine on solaris ,I used the command
g++ -O -fPIC mutiplyrtn.c -c -o mutiplyrtn.o , the object file is created ,after creating the routine through manger ,when used in transformer ,the job gets compiled but it fails at run time with error .

Transformer_3: Failed to load the library "V0S3_temp_Transformer_3.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 "V0S3_temp_Transformer_3": ld.so.1: osh: fatal: relocation error: file /opt/etl/Ascential/DataStage/Projects/BDR_DEVL/RT_BP3756.O/V0S3_temp_Transformer_3.so: symbol __1cIkeyWords6Fpc_0_: referenced symbol not found


Is it the right command to compile c++ code on soalris as I have some .o files and routines created by a contractor who left and they run fine
Thanks
Arif
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post by seanc217 »

Try the .o library instead and define that in DataStage as an object.
Let me know if this works for you.

I could not get a .so to work on Linux but the .o does!

Sean
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,
Check this post.

http://dsxchange.com/viewtopic.php?t=87 ... ee7882e274

And do a search on "ld.so.1: osh: fatal: relocation error: " with search all terms option,we have few posts discussed on this.
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

Post by mab_arif16 »

seanc217 wrote:Try the .o library instead and define that in DataStage as an object.
Let me know if this works for you.

I could not get a .so to work on Linux but the .o does!

Sean
when I used the command
g++ -O -fPIC mutiplyrtn.c -c -o mutiplyrtn.o
only a .o file is created,and in datastage manger object type I checked the Object radio button . and the library path as ../routines/myroutine.o.

Do I need to change something here to use .o library
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Hi Arif,
Command is correct. Check your Libray path of your Paralle Routine which is pointing to your .o file correctly.
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

Post by mab_arif16 »

Got it ,We need to use the following command format to generate object file
APT_LINKER APT_COMPILEOPT <<programme name>> -o objectfilename.o

APT_LINKER,APT_COMPILEOPT are the environment variables whose values can be obtained from administrator.
Thank you all who helped me solve this and ofcourse all DSXCHANGE team.

ARif
Post Reply