Ubuntu

sun-java can't find rxtx when running arduino

Reported by Brewster Malevich on 2010-10-21
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Home Climate Control
Unknown
Unknown
arduino (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: arduino

When opening Arduino IDE I get:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" 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:123)
 at processing.app.Editor.populateSerialMenu(Editor.java:965)
 at processing.app.Editor.buildToolsMenu(Editor.java:717)
 at processing.app.Editor.buildMenuBar(Editor.java:502)
 at processing.app.Editor.<init>(Editor.java:194)
 at processing.app.Base.handleOpen(Base.java:709)
 at processing.app.Base.handleOpen(Base.java:674)
 at processing.app.Base.handleNew(Base.java:571)
 at processing.app.Base.<init>(Base.java:311)
 at processing.app.Base.main(Base.java:200)

Sounds like something is in the wrong place.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: arduino 0018+dfsg-4
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Wed Oct 20 22:55:13 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: arduino

Brewster Malevich (brews) wrote :

Thanks for the report: it sounds like bug #325506

https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/325506

Are you using sun-java? It appears that sun-java does not look where
it is supposed to for native libraries. This has been fixed in
openjdk, but since we don't have the source code for sun-java, it is
an open bug.

The work around is to set the LD_LIBRARY_PATH, you can put the
following in your .bashrc file

for JNI_PATH in /usr/lib/jni /usr/share/jni
do
  if [ -d "$JNI_PATH" ]
  then
    if [ -z "$LD_LIBRARY_PATH" ]
    then
      export LD_LIBRARY_PATH="$JNI_PATH"
    else
      export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JNI_PATH"
    fi
done

I'll actually put this into the debian and ubuntu wrapeprs and see if
upstream arduino would be interested in using this in their wrapper as
well.

setting to "low" since a work around exists (use default-jre instead of sun-java, and the wrapper script)

the patch to ubuntu is to use the -D command in the wrapper so it will work for both sun-java and openjdk:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -DLD_LIBRARY_PATH=/usr/lib/jni/ -jar /usr/share/arduino/arduino.jar

Changed in arduino (Ubuntu):
status: New → Triaged
importance: Undecided → Low

Brewster: Could you test a fixed package to see if it works:
(from https://launchpad.net/~showard314/+archive/ppa)

sudo add-apt-repository ppa:showard314/ppa
sudo apt-get update
sudo apt-get install arduino

That should install version 0021+dfsg-2~ppa1

let me know if that works with your set up

Hey Scott,

Yeah, I'm on Sun Java.
I have no error when I open Arduino after installing the package from your PPA.

P.S. Thanks for getting on this so quickly. Nice work!

I upgrade to Ubuntu 10.10 32bit and tried out your update, and it
worked fine. Ran, compiled, uploaded.
--Rick

On Thu, Oct 21, 2010 at 2:31 PM, Scott Howard <email address hidden> wrote:
> Brewster: Could you test a fixed package to see if it works:
> (from https://launchpad.net/~showard314/+archive/ppa)
>
> sudo add-apt-repository ppa:showard314/ppa
> sudo apt-get update
> sudo apt-get install arduino
>
>
> That should install version 0021+dfsg-2~ppa1
>
> let me know if that works with your set up
>
> --
> java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
> https://bugs.launchpad.net/bugs/664309
> You received this bug notification because you are a member of Arduino
> on Ubuntu Packagers, which is subscribed to arduino in ubuntu.
>
> Status in “arduino” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: arduino
>
> When opening Arduino IDE I get:
> java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
> Exception in thread "main" 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:123)
>        at processing.app.Editor.populateSerialMenu(Editor.java:965)
>        at processing.app.Editor.buildToolsMenu(Editor.java:717)
>        at processing.app.Editor.buildMenuBar(Editor.java:502)
>        at processing.app.Editor.<init>(Editor.java:194)
>        at processing.app.Base.handleOpen(Base.java:709)
>        at processing.app.Base.handleOpen(Base.java:674)
>        at processing.app.Base.handleNew(Base.java:571)
>        at processing.app.Base.<init>(Base.java:311)
>        at processing.app.Base.main(Base.java:200)
>
> Sounds like something is in the wrong place.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 10.10
> Package: arduino 0018+dfsg-4
> ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
> Uname: Linux 2.6.35-22-generic i686
> NonfreeKernelModules: nvidia
> Architecture: i386
> Date: Wed Oct 20 22:55:13 2010
> InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
> PackageArchitecture: all
> ProcEnviron:
>  PATH=(custom, user)
>  LANG=en_US.UTF-8
>  SHELL=/bin/bash
> SourcePackage: arduino
>
>
>
> _______________________________________________
> Developers mailing list
> <email address hidden>
> http://arduino.cc/mailman/listinfo/developers_arduino.cc
>

Thanks, I'll update Debian/Natty (there is a minor packaging bug in the package you guys have which I'll fix before uploading to the official repos). I'll also try to get version 0021 backported.

For those that see this bug report, there are several workarounds:
1) don't use sun-java but default-jre instead. This bug is actually a known bug in sun-java. (bug #325506)
2) add export LD_LIBRARY_PATH=/usr/lib/jni to your .bashrc, the .deskop file (in /usr/share/desktop), or on the command line before starting arduino
3) add the new package (instructions are above).

summary: - java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
- thrown while loading gnu.io.RXTXCommDriver
+ sun-java can't find rxtx when running arduino
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package arduino - 0021+dfsg-2

---------------
arduino (0021+dfsg-2) experimental; urgency=low

  * updates wrapper_for_deb.patch to set the LD_LIBRARY_PATH for sun-java
    jre. (LP: #664309)
  * debian/patches/install_jar_links.patch
    - Added patch to install symlinks for Debian java library packages.

arduino (0021+dfsg-1) experimental; urgency=low

  * New upstream release (debian/rules get-orig-source target updated)

arduino (0019+dfsg-1) experimental; urgency=low

  * New upstream release
    - switch to ant build system
    - refreshed patches
  * Debian policy 3.9.1
 -- Scott Howard <email address hidden> Tue, 26 Oct 2010 14:35:09 +0000

Changed in arduino (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.