2 Replies Latest reply: Jan 30, 2013 3:40 PM by alan.pae RSS

    wrong ELF class: ELFCLASS32, Not able to build 64 bit so file

    988024
      I am using make command for making .so file.
      It is working for 32 bit so file BUT i need 64 bit .so file.
      Here is error log:-
      `Makefile' is up to date.
      gcc -m64 -I../include -D_REENTRANT -fPIC -c passwordplugin.c
      ld -G -o libtest-plugin.so passwordplugin.o
      ld: fatal: file /usr/ucblib/libucb.so: wrong ELF class: ELFCLASS32
      ld: fatal: file /usr/lib/libresolv.so: wrong ELF class: ELFCLASS32
      ld: fatal: file /usr/lib/libsocket.so: wrong ELF class: ELFCLASS32
      ld: fatal: file /usr/lib/libnsl.so: wrong ELF class: ELFCLASS32
      ld: fatal: file /usr/lib/libelf.so: wrong ELF class: ELFCLASS32
      ld: fatal: File processing errors. No output written to libtest-plugin.so
      *** Error code 1
      make: Fatal error: Command failed for target `libtest-plugin.so'

      Following LIB path is already set.
      Server:/ $ echo $LD_LIBRARY_PATH
      /usr/local/lib
      Server:/ $ echo $LD_LIBRARY_PATH_64
      /usr/ucblib/sparcv9

      And solaris version:
      Server:/$ isainfo -kv
      64-bit sparcv9 kernel modules

      Please help me out what should i do....
      Thanks in advance