[sctp-dev] Undefined symbol problems in libsctp.so running with java 1.6

Chris Hegarty chris.hegarty at oracle.com
Fri Oct 7 10:43:50 PDT 2011


Jason,

This exception would appear to indicate a problem trying to locate 
sctp_getladdrs in the lksctp socket exceptions library, 
/usr/lib/libsctp.so. Yes poor naming, I know. The lksctp socket 
exceptions library has the same name as the internal JDK JNI library!

Can you try looking at the output of:
   nm /usr/lib/libsctp.so
   objdump -T /usr/lib/libsctp.so

-Chris.


On 10/ 7/11 04:36 PM, Jason Kania wrote:
> Hello,
>
> For RHEL 5 linux with kernel 2.6.18-92.1.22.el5, I downloaded the latest
> JDK 7 source and libsctp.so library. I am attempting to use the code
> modified for java 1.6, but I am encountering the following problem:
>
>  > java -Xbootclasspath/a:sctp6.jar -classpath app.jar TestSCTP
>
> Exception in thread "main" java.lang.UnsupportedOperationException:
> /usr/java/jre1.6.0_12/lib/i386/libsctp.so: undefined symbol: sctp_getladdrs
>
> at sun.nio.ch.SctpNet.socket0(Native Method)
>
> at sun.nio.ch.SctpNet.socket(SctpNet.java:82)
>
> at sun.nio.ch.SctpChannelImpl.<init>(SctpChannelImpl.java:131)
>
> at com.sun.nio.sctp.SctpChannel.open(SctpChannel.java:165)
>
> at TestSCTP.main(TestSCTP.java:4)
>
> app.jar is simply a jar to hold the TestSCTP.class file.
>
> The problem is the same when I use the libsctp.so file from the SCTP on
> 1.6 instruction page
>
> http://openjdk.java.net/projects/sctp/html/sctp6.html
>
>  From the error output, the library is definitely being found.
>
> When I use the nm command to list what symbols are in the library, I get
> the following name with “nio_” prefix instead:
>
>  > nm /usr/java/jre1.6.0_12/lib/i386/libsctp.so
>
>>
> nio_sctp_getladdrs
>
>>
> The ldd output looks as follows:
>
>  > ldd /usr/java/jre1.6.0_12/lib/i386/libsctp.so
>
> linux-gate.so.1 => (0xffffe000)
>
> libnio.so => /usr/java/jre1.6.0_12/lib/i386/libnio.so (0xf7f58000)
>
> libnet.so => /usr/java/jre1.6.0_12/lib/i386/libnet.so (0xf7f44000)
>
> libpthread.so.0 => /lib/libpthread.so.0 (0xf7f27000)
>
> libdl.so.2 => /lib/libdl.so.2 (0xf7f23000)
>
> libjava.so => /usr/java/jre1.6.0_12/lib/i386/libjava.so (0xf7efd000)
>
> libjvm.so => not found
>
> libc.so.6 => /lib/libc.so.6 (0xf7dba000)
>
> libnsl.so.1 => /lib/libnsl.so.1 (0xf7da3000)
>
> /lib/ld-linux.so.2 (0xf7f66000)
>
> libjvm.so => not found
>
> libjvm.so => not found
>
> libverify.so => /usr/java/jre1.6.0_12/lib/i386/libverify.so (0xf7d96000)
>
> libjvm.so => not found
>
> Permissions on the file and directories are all 755
>
> The libsctp.jar library is included on the JVM command line as follows:
>
> Any suggestions on a direction for resolving this?
>
>
> Thanks for any help,
>
> Jason
>


More information about the sctp-dev mailing list