>>>>> satya seshu kumar dammu writes:
 > i am getting undefined symbol errors when System.loadLibrary is
 > loading shared object file.

 > i have a java class called "hello" ( very simple one like we all
 > imagine) it has a single native method and the native method
 > implementation is in "hello.c" the native method implementation in
 > hello.c makes a call to "lstat"

 > my gcc compile options are %gcc -g -shared -lc_nonshared
 > -I/usr/include -I/usr/share/jdk1.1.6/include
 > -I/usr/share/jdk1.1.6/include/genunix -L/lib -L/usr/lib
 > -L/usr/share/jdk1.1.6/lib
 > -L/usr/share/jdk1.1.6/lib/i686/green_threads hello.c -o libhello.so

 >I have tried your HelloWorld2 program and it works fine on my machine.
 >I even don't have to link against c_nonshared
 >Is your libc of recent date?
 >Juergen

hi,
here is some more info:

%cat /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

%rpm -q glibc
glibc-2.0.7-13

%rpm -q gcc
gcc-2.7.2.3-11
%ldconfig -D | grep libc
ldconfig: warning: /usr/lib/libnewt.so.0.25 has inconsistent soname
(libnewt.so.0.20)
ldconfig: warning: /usr/lib/libnewt.so.0.25 has inconsistent soname
(libnewt.so.0.20)
        libcrack.so.2 => libcrack.so.2.7
ldconfig: warning: /lib/ld-2.0.7.so has inconsistent soname (ld-linux.so.2)
ldconfig: warning: /lib/libBrokenLocale-2.0.7.so has inconsistent soname
(libBrokenLocale.so.1)
ldconfig: warning: /lib/libc-2.0.7.so has inconsistent soname (libc.so.6)
ldconfig: warning: /lib/libcrypt-2.0.7.so has inconsistent soname
(libcrypt.so.1)
ldconfig: warning: /lib/libdb-2.0.7.so has inconsistent soname (libdb.so.2)
ldconfig: warning: /lib/libdl-2.0.7.so has inconsistent soname (libdl.so.2)
ldconfig: warning: /lib/libm-2.0.7.so has inconsistent soname (libm.so.6)
ldconfig: warning: /lib/libnsl-2.0.7.so has inconsistent soname (libnsl.so.1)
ldconfig: warning: /lib/libnss_compat-2.0.7.so has inconsistent soname
(libnss_compat.so.1)
ldconfig: warning: /lib/libnss_db-2.0.7.so has inconsistent soname
(libnss_db.so.1)
ldconfig: warning: /lib/libnss_dns-2.0.7.so has inconsistent soname
(libnss_dns.so.1)
ldconfig: warning: /lib/libnss_files-2.0.7.so has inconsistent soname
(libnss_files.so.1)
ldconfig: warning: /lib/libnss_nis-2.0.7.so has inconsistent soname
(libnss_nis.so.1)
ldconfig: warning: /lib/libpthread-0.7.so has inconsistent soname
(libpthread.so.0)
ldconfig: warning: /lib/libresolv-2.0.7.so has inconsistent soname
(libresolv.so.2)
ldconfig: warning: /lib/libutil-2.0.7.so has inconsistent soname
(libutil.so.1)
        libcrack.so.2 => libcrack.so.2.7
        libcom_err.so.2 => libcom_err.so.2.0
        libcrypt.so.1 => libcrypt-2.0.7.so
        libc.so.6 => libc-2.0.7.so


can u tell me the following info on ur machine

1. cat /usr/lib/libc.so
2. rpm -q glibc
3. rpm -q gcc
4. ldconfig -D | grep libc
5. nm /usr/lib/libc.so.6 | grep lstat


--seshu



____________________________________________________________
satya seshu kumar dammu|4087332589|[EMAIL PROTECTED]
             http://www.cslab.uky.edu/~ksdamm0

Dream BIG..... because dreams so small .......
                  hath no power to move men........


____________________________________________________________________
More than just email--Get your FREE Netscape WebMail account today at 
http://home.netscape.com/netcenter/mail

Reply via email to