[Rxtx] Mac 10.5.2 + JDK 1.6 (64-bit) jnilib

Zach Shelby zach at sensinode.com
Sat May 17 15:54:22 MDT 2008


Hi,

Was happy to see the new JDK 1.6 release for Leopard from Apple. However 
  the 64-bit only nature of the release causes headaches for RXTX's 
jnilib. Found a fix for 2.1.7r2:

Symptom:
java.lang.UnsatisfiedLinkError: 
/Library/Java/Extensions/librxtxSerial.jnilib:  thrown while loading 
gnu.io.RXTXCommDriver

Fix:
Build a new jnilib from the 2.1.7r2 source with 3 architectures.
./configure
Then edit the Makefile:
- Add "-arch x86_64 -arch i386 -arch ppc" to CFLAGS
- Also add it in the cc -bundle lines

This builds the jnilib in all the architectures, which is required by 
this JDK 1.6.

However, now that this nice bug is out of the way for me, jnilib is 
crashing. Anybody have RXTX working on 10.5.2 with JDK 1.6? At first I 
was getting "Serial port is open" errors, but after fixing the locks 
(/var/lock instead of /var/spool/uucp) I get a bit further but it now 
crashes on the first port read with a segmentation fault. Transmit seems 
to work OK (at least once):

May 18, 2008 12:50:29 AM com.sensinode.ewsn.NodeView.NVLogger nvLog
INFO: Serialport: /dev/tty.Bluetooth-Modem
May 18, 2008 12:50:29 AM com.sensinode.ewsn.NodeView.NVLogger nvLog
INFO: Starting receive method for Router 0
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX Warning:  Removing stale lock file. /var/lock/LK.003.017.002
May 18, 2008 12:50:32 AM com.sensinode.ewsn.NodeView.NVLogger nvLog
INFO: Writing reset to N600
May 18, 2008 12:50:32 AM com.sensinode.ewsn.NodeView.NVLogger nvLog
INFO: Trying to read reset reply from N600
May 18, 2008 12:50:32 AM com.sensinode.ewsn.NodeView.NVLogger nvLog
INFO: No data available from N600
May 18, 2008 12:50:33 AM com.sensinode.ewsn.NodeView.NVLogger nvLog
INFO: Trying to read reset reply from N600
Invalid memory access of location 24e4b7c8 rip=23aa97d8

First transmit works (I get the command over the port), seems that the 
first read comes up empty, and then the next read crashes. This happens 
consistently, and diabling locks doesn't help. Anybody seen this kind of 
invalid memory access on read before?

Thanks,
Zach

-- 
Zach Shelby | Head of Research | +358 40 7796297
Sensinode Ltd.   www.sensinode.com



More information about the Rxtx mailing list