Oratcl Libs: wrong ELF class: ELFCLASS64
Could not complie Oractl today for the life of me, until a buddy at work pointed out I need to manually edit: generic/oratcl.c to contain:
pt2_obj = Tcl_NewStringObj(”lib32“, -1);
pt3_obj = Tcl_NewStringObj(”libclntsh”SHLIB_SUFFIX, -1);
instead of:
pt2_obj = Tcl_NewStringObj(”lib“, -1);
pt3_obj = Tcl_NewStringObj(”libclntsh”SHLIB_SUFFIX, -1);
The problem was, no mater how I set my environment variable:
setenv LD_LIBRARY_PATH /oracle/10203/lib32:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH_64 /oracle/10203/lib:$LD_LIBRARY_PATH_64
running:
tclsh% package require Oratcl
would always produce the following error:
Oratcl_Init(): Failed to load /oracle/10203/lib/libclntsh.so with error ld.so.1: tclsh8.5: fatal: /oracle/10203/lib/libclntsh.so: wrong ELF class: ELFCLASS64
Apparently this has been addressed by a developer and the work around was to (setenv ORACLE_LIBRARY $ORACLE_HOME/lib32/libclntsh.so), http://sourceforge.net/tracker/index.php?func=detail&aid=1525418&group_id=12880&atid=112880.
Oracle made their own ORACLE_LIBRARY environment variable:) What they should have done instead of doing something like:
dlopen (‘/oracle/10203/lib/libclntsh.so’, RTLD_NOW | RTLD_GLOBAL);
done:
dlopen (‘libclntsh.so’, RTLD_NOW | RTLD_GLOBAL);