7 Replies Latest reply: Nov 12, 2007 7:19 AM by 807575 RSS

    wrong ELF class: ELFCLASS64 error

    807575
      Hi ,

      we are upgrading from oracle 8 to 9.2.0 in solaris.
      Getting the following error /u01/app/oracle/product/9.2.0/lib/libocijdbc9.so: ld.so.1: java: fatal: /u01/app/oracle/product/9.2.0/lib/libocijdbc9.so: wrong ELF class: ELFCLASS64

      Can anybody help ?
        • 1. Re: wrong ELF class: ELFCLASS64 error
          807575
          Looks like you are using the 64 bit client, instead of the 32 bit. If you make your app look at /u01/app/oracle/product/9.2.0/lib32 instead for the library, should be OK.....
          • 2. Re: wrong ELF class: ELFCLASS64 error
            807575
            Hi all,
            I am also gettting the same error:
            ld: fatal: file /opt/sybase/12.5/OCS-12_5/lib/libsybdb64.so: wrong ELF class: ELFCLASS64
            ld: fatal: File processing errors. No output written to CvBb
            Can't i specify the 64 bit compile option instead as i have the 64 bit libraries.

            Regards,
            Vivek
            • 3. Re: wrong ELF class: ELFCLASS64 error
              807575
              I am also gettting the same error:
              Can't i specify the 64 bit compile option instead as i have the 64 bit libraries.
              (presuming that you are not speaking about java here, as your error comes from linker)
              If you link your code with 64-bit libraries then you have to :
              1. compile your sources in 64bit mode
              2. specify 64bit arch on a linker command line.
              • 4. Re: wrong ELF class: ELFCLASS64 error
                807575
                Better late than never, huh... :-)

                Anyway I just faced this myself. I also found this solution which worked for me: point to the LIB32 libraries.


                http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=3&t=005058

                java.lang.UnsatisfiedLinkError:
                /export/home3/oracle/product/9.2.0.4/lib/libocijdbc9.so:
                ld.so.1: java:

                fatal: /export/home3/oracle/product/9.2.0.4/lib/libocijdbc9.so: wrong ELF class: ELFCLASS64
                -------------------------------------------------------------------------------
                Everything I've read says this is caused by using the 64bit libraries instead of the 32bit ones. Change your LD_LIBRARY_PATH to point to $ORACLE_HOME/lib32.


                And indeed, doing:

                ### Change your LD_LIBRARY_PATH to point to $ORACLE_HOME/lib32.

                LD_LIBRARY_PATH=$ORACLE_HOME/lib32:${LD_LIBRARY_PATH}

                export LD_LIBRARY_PATH

                removed the error for me.

                FWIW, and decidedly late in replying here...

                -mc
                • 5. Re: wrong ELF class: ELFCLASS64 error
                  807575
                  i use some.mk file to compile *.pc.. in oracle8i
                  i got same error message like 'wrong ELF class'.. at compiling in oracle9i
                  so..

                  i modified '/precomp/lib/env_precomp.mk' file
                  like this..
                  'LIBDIR=lib' --> 'LIBDIR=lib32'

                  the error is cause by 'lib' something..

                  everything is fine..

                  thanks all :)
                  • 6. Re: wrong ELF class: ELFCLASS64 error
                    807575
                    Hey

                    My suggestion is

                    -) Don't change your 64 bit library path
                    -) just start ur java application with -d64
                    -) then you should not get this error

                    Regards
                    Erkin
                    • 7. Re: wrong ELF class: ELFCLASS64 error
                      807575
                      Yes! Erkin is right.Don't change your 64 bit library path, just start ur java application with -d64,It should work