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 was something like:

dlopen (‘/oracle/10203/lib/libclntsh.so’, RTLD_NOW | RTLD_GLOBAL);

done:

dlopen (‘libclntsh.so’, RTLD_NOW | RTLD_GLOBAL);


Advertisements
This entry was posted in *Nix. Bookmark the permalink.

2 Responses to Oratcl Libs: wrong ELF class: ELFCLASS64

  1. Hemalalli says:

    Yes it works properly …

    But now I’m getting login invalid id while login with tcl script and not with normal sqlplus login with same login id and password.

    Whether the ID & pwd related to lib file ?

    Please help me.

    • swinful says:

      Hi-

      Sorry for replying so late. Were you able to figure out your problem? If not post the Tcl code and I will see if I can reproduce on my end to better try and help you.

      Thanks,
      swinful

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s