Page 1 of 1

Posted: Sun Dec 02, 2007 10:55 pm
by JoshGeorge
You might not have made the right entries in the General tab for this parallel routine. Cross check "External subroutine name" entry. I have recently made a blog entry on Parallel routines, you can find that in this link

Same error message

Posted: Mon Dec 03, 2007 6:44 am
by AmeyJoshi14
Hi Joshy,

I have seen the link you have given..Thanks for the reply..It is really nice and very helpful. :wink: Thanks once again!! :lol:
I have created the parallel routine as per the example given by you, but for this simple routine
i am again facing the same error message: :cry:

Transformer_24: Failed to load the library "V0S24_Object_test1_Transformer_24.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 "V0S24_Object_test1_Transformer_24": ld.so.1: osh: fatal: relocation error: file /data/projectlib/PAR_dev/RT_BP3579.O/V0S24_Object_test1_Transformer_24.so: symbol __1cKObjTestOne6F_pc_: referenced symbol not found.

Posted: Mon Dec 03, 2007 12:11 pm
by throbinson
What's the Compile command line look like?
I think you need to drop the "-c" command line option so that you compile AND link the routine.

Posted: Mon Dec 03, 2007 3:35 pm
by JoshGeorge
"-c" option is to compile the file and produce an object file. That shouldn't be the cause. Pls. post your compiler, compiler options and all the entries you made in the general tab of parallel routine.

Posted: Mon Dec 03, 2007 5:06 pm
by DSguru2B
Go to APT_COMPILER_OPT environment variable, copy the options listed there and provide those options while compiling your c code. Thats the best way to avoid any discrepencies.
for eg: if you APT_COMPILER_OPT = +z +Z -o
then you will compile your code as such (assuming your compiler is aCC)

Code: Select all

aCC +z +Z -o Ereplace.c

Posted: Tue Dec 04, 2007 12:45 am
by AmeyJoshi14
Thanks!!

My complier option
APT_COMPLIEOPT=-dalign -O -PIC -library=iostream -c

So
/opt/SUNWspro/prod/bin/cc -dalign -O -library=stdio,stdlib -c /opt/home/dsadmin/checking/OBJECTTEST.c -o /opt/home/dsadmin/checking/OBJECTTEST.o

In the general tab of Parallel Routine following are the entries:
Routine name=OBJECTTEST
Type= External Function
Object Type=Object
Catergory=Examples\Functions
External subroutine name=ObjTestOne
Return Type =char*
Library Path =/opt/home/dsadmin/checking/OBJECTTEST.o

The C code is as per the Joshy's given link.

Posted: Tue Dec 04, 2007 10:13 pm
by JoshGeorge
Does that Razz Emoticon means you got what you want? :?
Pls. post your compiler, compiler options ...

Posted: Wed Dec 05, 2007 4:40 am
by AmeyJoshi14
No The problem is not solved yet..... :cry:

Still i am facing the same problem, even though i have tried many other C program....

Posted: Wed Dec 05, 2007 4:50 am
by JoshGeorge
Post your compiler and compiler option seperately.

And also confirm if you have compiled using the same syntax:

Compiler : compiler options : {filename with extenstion}

Posted: Wed Dec 05, 2007 5:56 am
by AmeyJoshi14
JoshGeorge wrote:Post your compiler and compiler option seperately.

And also confirm if you have compiled using the same syntax:

Compiler : compiler options : {filename with extenstion}

My complier option
APT_COMPLIEOPT=-dalign -O -PIC -library=iostream -c

So
/opt/SUNWspro/prod/bin/cc -dalign -O -library=stdio,stdlib -c /opt/home/dsadmin/checking/OBJECTTEST.c -o /opt/home/dsadmin/checking/OBJECTTEST.o

Posted: Wed Dec 05, 2007 6:08 am
by iDomz
can you try changing your library parameter as iostream

-library=iostream

just to make sure it is a c++ object and not c.

Posted: Wed Dec 05, 2007 6:42 am
by AmeyJoshi14
Hi IDomz,

I have changed the library parameter to iostream. It is working fine...
By doing thsi i also changed the complier option from cc to CC
so code is changed to
/opt/SUNWspro/prod/bin/CC -dalign -O -library=iostream -c /opt/home/dsadmin/checking/OBJECTTEST1.cpp

Posted: Wed Dec 05, 2007 10:39 pm
by JoshGeorge
Good to hear you finally managed to get it working. As noted repeatedly in the thread you should have used your APT_COMPLIEOPT ie. "-dalign -O -PIC -library=iostream -c" for compiling, instead of "-dalign -O -library =stdio,stdlib -c" . So time for you to mark the thread as resolved. :D

Posted: Thu Dec 06, 2007 2:40 am
by AmeyJoshi14
Yes ,the main problem was due to complier... I was using C compiler not C++ Complier..Due to this my code was getting complied by C complier and not C++ complier... :P
Thanks all for your help!!! :D