Home » Infrastructure » Unix » Trouble compiling external procedure.
Trouble compiling external procedure. [message #285770] Wed, 05 December 2007 09:25
ziggy25
Messages: 206
Registered: July 2005
Senior Member
I've been trying to play around with this problem but i've now decided to try and seek help as im stuck. We migrated our machines from

Oracle 9.0.2.1 to 10.2.0
SunOS 5.8 to 5.9


As part of the migration i have to re-compile some C shared libraries using gcc 4.2.2 whereas on the old environment we used gcc 3.4.2

The make file for compiling and building the shared library is shown below


gcc -c -o runLoad.o runLoad.c


make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk \
        extproc_callback \
        SHARED_LIBNAME=${ORACLE_HOME}/lib/libextCCS.so  \
        OBJS=runLoad.o



I tried to run the above make file and got the following error

/usr/ccs/bin/ld -G -z text -L/disk2/ccsbill/app/oracle/product/10.2.0/db/lib -R/disk2/ccsbill/app/oracle/product/10.2.0/db/lib -o /disk2/ccsbill/app/oracle/product/10.2.0/db/lib/libextCCS.so runLoad.o /disk2/ccsbill/app/oracle/product/10.2.0/db/lib/libpls10.a -lclntsh   `cat /disk2/ccsbill/app/oracle/product/10.2.0/db/lib/sysliblist` -R/disk2/ccsbill/app/oracle/product/10.2.0/db/lib -laio  -lposix4 -lkstat -lm  -lthread -lpthread
ld: fatal: file /disk2/ccsbill/app/oracle/product/10.2.0/db/lib/libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to /disk2/ccsbill/app/oracle/product/10.2.0/db/lib/libextCCS.so
*** Error code 1
make: Fatal error: Command failed for target `extproc_callback'


I tried to investigate this and i think it has something to do with the fact that gcc is producing 32bit objects. I've tried all the following options with no luck

- changed gcc compile command to gcc -m64 -c -o runLoad.o runLoad.c
- Changed the make command to use demo_rdbms.mk, demo_rdbms64.mk and demo_rdbms32.mk but none of them worked

If i use demo_rdbms.mk with the -m64 option on the compile command, the error i get is
ld: fatal: relocation error: R_SPARC_H44: file runLoad.o: symbol MAX_PATH: relocations based on the ABS44 coding model can not be used in building a shared object
*** Error code 1
make: Fatal error: Command failed for target `extproc_callback'


When i try to run "ldd runLoad.o" to see what libraries are being used in the object i get the following error

warning: ldd: runLoad.o: is not executable
ld.so.1: lddstub: fatal: relocation error: R_SPARC_H44: file ./runLoad.o: symbol MAX_PATH: relocations based on the ABS44 coding model can not be used in building a shared object


I have tried everything and now i've run out of ideas. Has anyone got any clues as to what im doing wrong?

Thanks



Previous Topic: How I can make ANSI printer on Oracle 7.1.6 for SCO UNIX
Next Topic: Error Exception Handling from SQLPLUS to PL/SQL
Goto Forum:
  


Current Time: Thu Mar 28 09:08:42 CDT 2024