You are not logged in.

#1 2012-06-16 22:27:08

tomzooi
Member
Registered: 2010-05-01
Posts: 24

Processing UnsatisfiedLinkError librxtx

Hi,

I have a 64 bit version of linux installed on my machine, but I have a problem. In processing (from the AUR, works great, apart from one thing) I cannot work with the serial library (librxtx). I get the following error(s):

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1028)
	at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
	at processing.serial.Serial.list(Unknown Source)
	at graphwriter_v2.setup(graphwriter_v2.java:53)
	at processing.core.PApplet.handleDraw(Unknown Source)
	at processing.core.PApplet.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:662)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.ports()
	at processing.serial.Serial.errorMessage(Unknown Source)
	at processing.serial.Serial.list(Unknown Source)
	at graphwriter_v2.setup(graphwriter_v2.java:53)
	at processing.core.PApplet.handleDraw(Unknown Source)
	at processing.core.PApplet.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:662)

at the println(Serial.list()); command in processing.

I have tried some things as copying them from the arduino (which seems to work as I can use the serial monitor) into the /usr/lib or the ones from the /usr/share/processing/modes/java/libraries/serial/library/linux64 folder to the /usr/lib folder (both librxtxSerial.so and librxtxSerial64.so). When doing so, it complains about a wrong ELF class (which is 64), see below:

java.lang.UnsatisfiedLinkError: /usr/share/processing/modes/java/libraries/serial/library/linux32/librxtxSerial.so: /usr/share/processing/modes/java/libraries/serial/library/linux32/librxtxSerial.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
java.lang.UnsatisfiedLinkError: /usr/share/processing/modes/java/libraries/serial/library/linux32/librxtxSerial.so: /usr/share/processing/modes/java/libraries/serial/library/linux32/librxtxSerial.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1028)
	at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
	at processing.serial.Serial.list(Unknown Source)
	at graphwriter_v2.setup(graphwriter_v2.java:53)
	at processing.core.PApplet.handleDraw(Unknown Source)
	at processing.core.PApplet.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:662)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.ports()
	at processing.serial.Serial.errorMessage(Unknown Source)
	at processing.serial.Serial.list(Unknown Source)
	at graphwriter_v2.setup(graphwriter_v2.java:53)
	at processing.core.PApplet.handleDraw(Unknown Source)
	at processing.core.PApplet.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:662)

I would like to use the serial library, as I would like to communicate with my arduino (which works fine, also with the arduino IDE) from processing, but I am getting quiet stuck. But I am quiet a newby so I hope any of you is able to help me out here.

Any ideas, suggestions, or questions just shoot.

//edit: updated error messages to right ones.

Last edited by tomzooi (2012-06-16 22:28:59)

Offline

#2 2012-06-16 22:46:52

tomzooi
Member
Registered: 2010-05-01
Posts: 24

Re: Processing UnsatisfiedLinkError librxtx

Who knew the answer was so simple:
I downloaded the rxtx 2.1-7r2 (stable)  binaries from http://rxtx.qbang.org/wiki/index.php/Download and pasted the 32-bit version librxtxSerial.so in /usr/share/processing/modes/java/libraries/serial/library/linux32 and say what, it worked!

This might require some attention though in the AUR package maybe.

Offline

#3 2013-07-28 14:39:02

djipey
Member
Registered: 2011-07-30
Posts: 156

Re: Processing UnsatisfiedLinkError librxtx

I'll try to bring my own contribution, as I searched for 2 hours. I think I just figured out how to solve the problem, I just got it. But my solution is a bit more simple I guess:

cd /usr/share/arduino/lib
sudo cp librxtxSerial* ../

Offline

Board footer

Powered by FluxBB