Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1357903 - Arduino only works on 64-bit systems because of bad astyle library check
Summary: Arduino only works on 64-bit systems because of bad astyle library check
Status: CLOSED DUPLICATE of bug 1357005
Alias: None
Product: Fedora
Classification: Fedora
Component: arduino
Version: 23
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Dennis Chen
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-07-19 14:36 UTC by Jonathan Bartlett
Modified: 2016-07-19 15:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-07-19 15:58:29 UTC
Type: Bug

Attachments (Terms of Use)

Description Jonathan Bartlett 2016-07-19 14:36:30 UTC
Description of problem:

Installing Arduino on a 32-bit system crashes on startup due to bug in finding JNI library.  Even on 32-bit systems attempts to 

How reproducible:


Steps to Reproduce:

Install 32-bit Fedora (I believe this is also true for 24, but only tried on 23).  Run arduino from a terminal.  See arduino crash with JNI complaint about not finding the 64-bit astyle library.

Additional info:

I believe the problem is in the RPM patch "arduino-use-system-astyle.patch".  It has the following code:

+    File libdir = new File("/usr/lib64");
+    String astylePath;
+    if (libdir.exists() && libdir.isDirectory()) {
+      astylePath = "/usr/lib64/";
+    } else {
+      astylePath = "/usr/lib/";
+    }

32-bit systems *do* have the /usr/lib64 directory, even though it doesn't have anything installed in them.  Therefore, the "true" branch will always be taken, and it will look for the 64-bit library instead of the 32-bit one.  I am not very familiar with Java and JNI, but I think you should check for the file itself.  You can probably change that to:

+    File libfile = new File("/usr/lib64/");
+    String astylePath;
+    if (libfile.exists()) {
+      astylePath = "/usr/lib64/";
+    } else {
+      astylePath = "/usr/lib/";
+    }

Comment 1 Dennis Chen 2016-07-19 15:58:29 UTC

*** This bug has been marked as a duplicate of bug 1357005 ***

Note You need to log in before you can comment on or make changes to this bug.