I compiled Oratcl against a 64-bit Oracle installation
and got the following error when executing a test script:
---BEGIN ERR MESSAGE---
Oratcl_Init(): Failed to load
/db/app/oracle/product/10.0.1.2/lib/libclntsh.so with
error ld.so.1: test_oratcl.tcl: fatal:
/db/app/oracle/product/10.0.1.2/lib/libclntsh.so: wrong
ELF class: ELFCLASS64
while executing
"load
/home/rover/aa469817/programs/lib/Oratcl4.4/libOratcl4.4.so"
("package ifneeded" script)
invoked from within
"package require -exact Oratcl 4.4"
(file "./test_oratcl.tcl" line 5)
---END ERR MESSAGE---
After some googling on "wrong ELF class: ELFCLASS64", I
came across a discussion thread which advised this was
due to trying to invoke a 64-bit library using a 32-bit
executable (which my compiled version of tcl must
be...the discussion thread is here, and it's related to
Perl's Oracle package, but the information was
relevant:
http://www.issociate.de/board/post/211258/Can't_load_Oarcle.so.html)
The fix was to compile Oratcl against
$ORACLE_HOME/lib32 instead of $ORACLE_HOME/lib, which i
accomplished by editing line 385 of oratcl.c to be:
pt2_obj = Tcl_NewStringObj("lib32", -1);
instead of
pt2_obj = Tcl_NewStringObj("lib", -1);
This code edit fixed my specific problem, however it's
clearly hack and not a real fix. Perhaps the program
should check for the existence of
$ORACLE_HOME/lib32/libclntsh.so and link against that,
defaulting to $ORACLE_HOME/lib/libclntsh.so only in its
absence? Just my first guess at a fix...
Anyway, thanks for the product, other than this compile
error it works great, I really appreciate the effort!!
--Kris
Todd Helfter
None
None
Public
|
Date: 2006-07-19 17:32 Logged In: YES |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use