Bug 5411 - Does not start arduino after choosen folder for sketches (new rxtx fix it)
Summary: Does not start arduino after choosen folder for sketches (new rxtx fix it)
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: Mageia 3
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: MGA2TOO MGA3TOO
Keywords: Junior_job, PATCH
: 4185 (view as bug list)
Depends on:
Blocks: 6181
  Show dependency treegraph
 
Reported: 2012-04-15 07:21 CEST by Jan Pihlgren
Modified: 2015-10-23 19:17 CEST (History)
22 users (show)

See Also:
Source RPM: rxtx-2.1.7.2-2.mga2, arduino
CVE:
Status comment:


Attachments

Description Jan Pihlgren 2012-04-15 07:21:46 CEST
Description of problem:
After installed both arduino and avr packages and relogged in I tried to start the arduino IDE.

Version-Release number of selected component (if applicable):
arduino 1.0 5.mga2
avr-libc 1.7.1 3.mga2
avrdude 5.11.1 1.mga2
cross-avr-gcc 4.6.2 1.mga2

How reproducible:
Install all avr except "cassandra".
Try to start arduino


Steps to Reproduce:
1.
2.
3.
Comment 1 Morgan Leijström 2012-04-15 14:14:56 CEST
Hi Jan

If you start arduino from a terminal window, do you get any output in that window?

CC: (none) => fri

Comment 2 Morgan Leijström 2012-04-15 14:17:33 CEST
Ah, Jan, i see you forgot to tell here what happened.  From Jans post in the forum which led me here:
https://forums.mageia.org/en/viewtopic.php?f=15&t=2236

"When I installed the packages and tried to start Arduino IDE I'm comming to a window where I have to choose a folder where to hold sketches.
When I do that The window disappear and nothing more happens."
Comment 3 Jan Pihlgren 2012-04-15 14:34:00 CEST
When I start from a terminal:

[jan@localhost ~]$ arduino
Gtk-Message: Failed to load module "canberra-gtk-module"

And when I chain user to root:
[root@localhost jan]# arduino
Gtk-Message: Failed to load module "canberra-gtk-module"
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:1681)
        at java.lang.Runtime.loadLibrary0(Runtime.java:840)
        at java.lang.System.loadLibrary(System.java:1047)
        at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
        at processing.app.Editor.populateSerialMenu(Editor.java:996)
        at processing.app.Editor.buildToolsMenu(Editor.java:698)
        at processing.app.Editor.buildMenuBar(Editor.java:483)
        at processing.app.Editor.<init>(Editor.java:205)
        at processing.app.Base.handleOpen(Base.java:700)
        at processing.app.Base.handleOpen(Base.java:665)
        at processing.app.Base.handleNew(Base.java:561)
        at processing.app.Base.<init>(Base.java:301)
        at processing.app.Base.main(Base.java:190)

But here no window will appear.
Comment 4 Jan Pihlgren 2012-04-15 14:43:22 CEST
After checking I can not install canberra-gtk-module. There is only 
canberra-common 0.28 7.mga2
canberra-gtk 0.28 7.mga2
They are installed.
But there is also
libcanberra-devel 0.28 7.mga2
libcanberra-gtk-devel 0.28 7.mga2
libcanberra-gtk0 0.28 7.mga2
which are not installed.
Comment 5 Manuel Hiebel 2012-04-15 15:40:14 CEST
the issue is not in canberra

see my thread from today:
"> Ok nice so it's never the cause [of] a bug ? 
It would be if the bug was related to missing sounds from gtk widgets"

Another one for you dmorgan

Assignee: bugsquad => dmorganec

Comment 6 Florian Hubold 2012-04-15 16:02:22 CEST
That canberra-gtk-module message is unrelated, many GTK programs spit that out, no problem with that. Also you should not run such programs as root, FWIW.

Best wait for a response from maintainer, as i can't really help you with debugging java programs.

CC: (none) => doktor5000
Assignee: dmorganec => bugsquad

Comment 7 Manuel Hiebel 2012-04-15 17:22:04 CEST
           What    |Removed         |Added
----------------------------------------------------------------------------
         AssignedTo|dmorganec       |bugsquad@mageia.org
                 CC|                |doktor5000

Dmorgan is the maintainer

Assignee: bugsquad => dmorganec

Comment 8 Alejandro Cobo 2012-04-24 12:32:53 CEST
Same problem over here.

CC: (none) => alejandrocobo

Comment 9 Jan Pihlgren 2012-05-06 07:15:57 CEST
After installing libcanberra-gtk0 this messages disappear:
Gtk-Message: Failed to load module "canberra-gtk-module"
But still the java error exist.
I installed Netbeans 7.01 (hoping some missing program would be installed) but that doesn't change anything.
It still looks like to be some javaerror.
Comment 10 Frank Griffin 2012-05-06 14:50:08 CEST
The UnsatisfiedLinkError occurs because Java is trying to load a native library called librxtxSerial.so and it can't be found.

A search in rpmdrake on rxtxSerial finds the necessary library in the librxtx2.1 (or lib64rxtx2.1) package.  Install one of these and it should work.

A general fix involves some other package needing to require librxtx.  I'm not familiar enough with this application to know which.

CC: (none) => ftg

Comment 11 Jan Pihlgren 2012-05-07 07:27:44 CEST
I installed librxtx2.1 but the javaerror still exist.
Comment 12 Frank Griffin 2012-05-07 12:30:39 CEST
Please post the new Java stacktrace.  Either librxtx2.1 isn't running ldconfig, or (more likely) the new UnsatisfiedLinkException mentions a different library from some other package that you now have to install.

Just to be sure, you might reboot before regenerating the error.
Comment 13 Jan Pihlgren 2012-05-07 13:42:32 CEST
Just started the host.
1. This is the errormessage:
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:1681)
        at java.lang.Runtime.loadLibrary0(Runtime.java:840)
        at java.lang.System.loadLibrary(System.java:1047)
        at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
        at processing.app.Editor.populateSerialMenu(Editor.java:996)
        at processing.app.Editor.buildToolsMenu(Editor.java:698)
        at processing.app.Editor.buildMenuBar(Editor.java:483)
        at processing.app.Editor.<init>(Editor.java:205)
        at processing.app.Base.handleOpen(Base.java:700)
        at processing.app.Base.handleOpen(Base.java:665)
        at processing.app.Base.handleNew(Base.java:561)
        at processing.app.Base.<init>(Base.java:301)
        at processing.app.Base.main(Base.java:190)

2. There are 5 different librxtx2.1 in /usr/lib/
  librxtxl2C-2.1-7.so
  librxtxParallell-2.1-7.so
  librxtxRaw-2.1-7.so
  librxtxRS485-2.1-7.so
  librxtxSerial-2.1-7.so
Comment 14 Frank Griffin 2012-05-07 14:01:41 CEST
The problem is that Java is looking for "librxtxSerial.so" and not finding it.  Normally, this should be created as a symlink to the versioned file.

This is probably a bug in the librxtx2.1 packaging, unless you or arduino are supplying the name "rxtxSerial" as input to Java in some way.  In that case, changing your input to "rxtxSerial-2.1.-7" should fix it.

In any case, 
           ln -s /usr/lib/librxtxSerial-2.1-7.so librxtxSerial.so"
should fix you up.

Somebody else will need to decide (1) if librxtx2.1 should be doing that automatically, and (2) what, if anything, in the arduino chain should have a "requires" for librxtx2.1.
Comment 15 Jan Pihlgren 2012-05-07 17:00:56 CEST
Now I came a bit further.
The Arduinowindow (sketch_may07a|Arduino 0100) open.
But Tool - Serial port is gray.

The following messages displays in konsolwindow:
[jan@localhost ~]$ arduino
java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver

The following is displayed in Arduino window:
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver

When used example BlinkWithoutDelay skech validation and compilation run OK.

But can not connect Arduino to any port.
Comment 16 Frank Griffin 2012-05-07 17:38:45 CEST
>[jan@localhost ~]$ arduino
java.lang.UnsatisfiedLinkError:

This means you're still missing other libraries.  You have to get the library name from the UnsatisfiedLinkError message, as in 

java.lang.UnsatisfiedLinkError: no xyz in java.library.path thrown while loading gnu.io.RXTXCommDriver

Here's your procedure:

1) Get an UnsatisfiedLinkError
2) Note the value of "xyz"
3) Open rpmdrake, set screening to All/All, set "Search in filenames", and search for "xyz"; figure out which package contains "libxyz*"in /usr/lib or /usr/lib64
4) Install that package
5) Look in /usr/lib or /usr/lib64 for libxyz*.  If there isn't a libxyz.so among these, create a suitable symlink as you did above
6) Note which package was required and whether you had to manually create the symlink, and note these here
7) Try again

Do this until you no longer get UnsatisfiedLinkErrors.
Comment 17 Jan Pihlgren 2012-05-09 06:59:24 CEST
I'm sorry.
I couldn't find anything when trying to search for: 
gnu.io.RXTXCommDriver ther wher no searchresult.
Neither I get any result when searching for java.library.path

I tried to install java-1.7-openjdk-devel-1.7 with no change
Then I tried to install librxtx-devel with no change.

I have no idea of what to do next, what package to install.
Comment 18 Frank Griffin 2012-05-09 12:37:24 CEST
No, no.  You're searching for the wrong thing.  You have to go to the UnsastifiedLinkError message and take the library name it's looking for, i. e. "xyz" in "no xyz in java.library.path".

Searching for gnu.io.RXTXCommDriver is useless.  Java has already found this.  Searching rpm for "java.library.path" is likewise useless, since it's not a package or file name.  Searching bugzilla might turn up somebody else getting a (probably unrelated) UnsatisfiedLinkError, but not much else.
Comment 19 Jan Pihlgren 2012-05-10 04:08:30 CEST
Some info:
When use Mageia 2 RC (32-bit) I do not need to link librxtxSerial.so.
I still have to install libcanberra-gtk0 to get rid of the gtk-messages.
Else the same problem:Where to choose Serial Port is gray, and the message:
java.lang.UnsatisfiedLinkError:
gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading
gnu.io.RXTXCommDriver
java.lang.NoClassDefFoundError: Could not initialize class
gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
Jacques Pronchery 2012-05-10 07:34:32 CEST

CC: (none) => jacques.pronchery

Comment 20 Marja Van Waes 2012-05-10 08:02:01 CEST
*** Bug 4185 has been marked as a duplicate of this bug. ***
Comment 21 Marja Van Waes 2012-05-10 08:07:29 CEST
(In reply to comment #20)
> *** Bug 4185 has been marked as a duplicate of this bug. ***

Is this information in that bug relevant?
https://bugs.mageia.org/show_bug.cgi?id=4185#c7

> I downloaded and installed 2.2pre2 version libraries instead of shipped rxtx2.1
> and Arduino works fine now.

> I think the best solution is use RXTX version 2.2pre2 instead of 2.1.7.2 for
> following Mageia packages:
>  rxtx
>  librxtx-devel
>  librxtx2.1 (will became librxtx2.2)
>  lib64rxtx-devel
>  lib64rxtx2.1 (will became librxtx2.2)

CC: (none) => marja11

Comment 22 Teymuraz Khazaradze 2012-05-10 08:26:54 CEST
This is the bug of RXTX library, not Mageia. RXTX library version 2.1 is not working under JRE/JDK versions over 1.5 (either java-sun or java-openjdk). Mageia uses Java 1.6/1.7, so I think the only way to solve problem is to use RXTX version 2.2pre2 instead of 2.1.7.2.

CC: (none) => hazard157

Comment 23 Marja Van Waes 2012-05-10 08:56:08 CEST
(In reply to comment #22)
> This is the bug of RXTX library, not Mageia. RXTX library version 2.1 is not
> working under JRE/JDK versions over 1.5 (either java-sun or java-openjdk).
> Mageia uses Java 1.6/1.7, so I think the only way to solve problem is to use
> RXTX version 2.2pre2 instead of 2.1.7.2.

Thx, it can't be done now, though, because of freeze for Mga 2 release

Source RPM: arduino => rxtx-2.1.7.2-2.mga2, arduino

Comment 24 Frank Griffin 2012-05-10 12:37:43 CEST
The UnsatisfiedLinkError problems are a result of uninstalled packages or missing symlinks.  Until Jan goes through the exercise of identifying what's missing as I described above, and gets past all of the ULEs, we're not going to know whether it works or not.
Comment 25 Jan Pihlgren 2012-05-11 07:35:42 CEST
I installed eclipse-jdt without success. (if some library will be installed)
I tried some of the hints above but can't search anylonger by filename.
I have to wait until Monday (14 of May) to connect an Arduino and see if this will do any changes.
Now I'm out of ideas.
Comment 26 Teymuraz Khazaradze 2012-05-11 08:38:44 CEST
Jan, you need to remove rxtx 2.1.7 package. Instead, download and install rxtx 2.2pre2 libraries from http://rxtx.qbang.org/wiki/index.php/Download. This worked for me on Mageia 2 beta3.
Comment 27 Jan Pihlgren 2012-05-11 15:34:48 CEST
I get the files as you mention, rxtxSerial.so and rxtxParallel.so and copied them to /usr/lib (before I uninstalled as you mention).
Done after updated Mageia 2 Beta 3.

Then I started Arduino and get the following errors:
Stable Library
=========================================
Native lib Version = RXTX-2.2pre2
Java lib Version   = RXTX-2.1-7
WARNING:  RXTX Version mismatch
        Jar version = RXTX-2.1-7
        native lib Version = RXTX-2.2pre2
check_group_uucp(): error testing lock file creation Error details:Ãtkomst nekascheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

The sugestion semmes not to work?
Comment 28 Teymuraz Khazaradze 2012-05-11 15:54:03 CEST
As I know you need to be member of following groups: uucp, dialout, lock.
Comment 29 Frank Griffin 2012-05-11 17:40:48 CEST
@Jan

Our rxtx package puts the JARFiles rxtxComm.jar) in /usr/share/java.  The tarball you downloaded probably puts them somewhere else.  Move any JARFiles contained in the tarball to /usr/share/java.
Comment 30 Teymuraz Khazaradze 2012-05-11 17:50:36 CEST
About file placement. Downloaded rxtx-2.2pre2-bins contains following files needed for Arduino to work:

RXTXcomm.jar - copy to /usr/share/java (overwrites exiting file of version 2.1.7)
x86_64-unknown-linux-gnu/librxtxSerial.so - copy to /lib64 (for 64-bit Mageia)
i686-pc-linux-gnu/librxtxSerial.so - copy to /lib (for 32-bit Mageia)
Comment 31 Jan Pihlgren 2012-05-12 05:03:31 CEST
Done the following:
copied RXTXcomm.jar to /usr/share/java:
Result:
WARNING:  RXTX Version mismatch
        Jar version = RXTX-2.2pre1
        native lib Version = RXTX-2.2pre2
check_group_uucp(): error testing lock file creation Error details:Ãtkomst nekascheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

Copied librxtxSerial.so to /lib: (earlier copied to /usr/lib)
Result:
WARNING:  RXTX Version mismatch
        Jar version = RXTX-2.2pre1
        native lib Version = RXTX-2.2pre2
check_group_uucp(): error testing lock file creation Error details:Ãtkomst nekascheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

But Tool - Serial port is still gray.
Comment 32 Teymuraz Khazaradze 2012-05-12 08:19:17 CEST
You need to be member of following groups: uucp, dialout, lock. So open Mageia Control Center, User Management and add to yourself these groups. You need to logout and login again for changes to take effect.
Comment 33 Jan Pihlgren 2012-05-12 08:34:42 CEST
SMILING
The last thin did it.
I was already member of dialout and lock.
I added membersship of uucp and I get it.
Now ttyS0 0ch ttyS1 appears in the Arduino window.
Comment 34 Jan Pihlgren 2012-05-12 16:43:17 CEST
When I connect Arduino to the computer I also get /dev/ttyUSB0.
Compile and upload succeed.

I'm a happy man now. :)
Thanks for all help. THANKS.
Florian Hubold 2012-05-14 22:44:29 CEST

CC: doktor5000 => (none)

Comment 35 Alejandro Vargas 2012-05-16 10:33:00 CEST
ATENTION: For the packet manteiner: 

I made the arduino packet for blogdrake mageia repository. I dealed with the group problem and the compilation of examples problem. I also solved the rxtx library problem. I compiled myself rxtx with the needed patches, and created a wrapper program that avoids the grup problem.

I sugest you to use my sources packages that was working and tested for years.

Note also it will generate packets for 32 and 64 bits avoiding the known problems of Arduino on x86_64.


You can get the source packages from here:

ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/arduino-1.0-1bdk.mga1.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/avr-binutils-2.20.1-1bdk2010.1.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/avr-gcc-4.4.3-4bdk2010.1.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/avr-gdb-7.1-1bdk2010.1.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/avr-libc-1.7.0-9bdk2010.1.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/avr-libc-1.7.1-2.mga1.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia1/SRPMS/avrdude-5.11.1-1.mga1.src.rpm


WARNING: you MUST use this new packet for rxtx because it has a patch for making it work with the new Arduino UNO hardware. Older versions will fail to detect the ttyACM port.

http://217.11.101.18/anv/rxtx-nolock-2.2-0.2.pre2bdk2010.1.src.rpm


For those who want to use binaries, you can use the blogdrake repository until the problems in the official packets are fixed.

CC: (none) => alejandro.anv

Alejandro Vargas 2012-05-16 10:33:21 CEST

Severity: normal => major

Alejandro Vargas 2012-05-16 10:33:42 CEST

Target Milestone: --- => Mageia 2

Comment 36 Marja Van Waes 2012-05-26 13:02:41 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 37 Fleck 2012-05-27 01:45:04 CEST
Mageia 2, 64bit - same problem!

FIX for RXTX error: download rxtx-2.1-7-bins-r2.zip from http://rxtx.qbang.org/wiki/index.php/Download
and copy file rxtx-2.1-7-bins-r2.zip/Linux/x86_64-unknown-linux-gnu/librxtxSerial.so to /usr/lib/jvm/java/jre/lib/amd64

This is for 64bit Mageia 2, for 32bit i have no clue, but guess its similar just i686, i386 etc directories! :)

After that - arduino app launches, but there are bunch of LOCK errors:
check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

FIX for LOCK error: add your user to uucp group and logout, then login again!

FIX for Gtk-Message: Failed to load module "canberra-gtk-module" error: just install lib64canberra-devel package in Software Management and error will be gone!

Resolution: (none) => FIXED
Status: NEW => RESOLVED
CC: (none) => Fleck

Comment 38 Thomas Backlund 2012-05-27 01:48:28 CEST
It's not fixed until the rpm in mga repo is fixed

Status: RESOLVED => REOPENED
CC: (none) => tmb
Resolution: FIXED => (none)

Comment 39 Fleck 2012-05-27 01:51:05 CEST
ok, sorry, now you know where the problem is! :)
Manuel Hiebel 2012-05-27 01:51:45 CEST

Summary: Does not start arduino after choosen folder for sketches => Does not start arduino after choosen folder for sketches (new rxtx fix it)
Keywords: NEEDINFO => Junior_job

Comment 40 Fleck 2012-05-27 02:07:13 CEST
One more thing... you can install lib64rxtx-devel package, after that you will be able to launch arduino app but you will not be able to use serial device - so no way to upload new sketch to arduino chip and no way to use serial monitor!
Comment 41 Jan Pihlgren 2012-05-27 05:52:43 CEST
in i586 the problem still exist as in Cauldron when reported the bug.
Nothing chageed. I haven't tried x86-64 yet.
And I haven't tried with the workaround mentioned abouve yet.
Comment 42 Jan Pihlgren 2012-05-28 06:48:50 CEST
System:i586 in VMware Workstation 8.0.3
This is what I did in Mageia 2
Downloaded file rxtx 2.1.7 from http://rxtx.qbang.org/wiki/index.php/Downloaded
Unpaced the file with Ark
copied file librxtxSerial.so to /usr/lib (no rxtx package before)
made me a member of the uucp-group

It works!
Marja Van Waes 2012-05-28 10:13:16 CEST

Whiteboard: (none) => MGA2TOO

Comment 43 Alejandro Vargas 2012-05-28 13:34:28 CEST
This is the problem:

Arduino requires the library rxtx. But the file rxtx dies not have the library:

Name        : rxtx
Version     : 2.1.7.2
Release     : 2.mga2
Group       : System/Libraries
Size        : 158577                       Architecture: i586
Source RPM  : rxtx-2.1.7.2-2.mga2.src.rpm    Build Host: ecosse
Packager    : Mageia Team <http://www.mageia.org>
URL         : http://www.rxtx.org/
Summary     : serial and parallel I/O libraries supporting Sun's CommAPI
Description :
RXTX is a native library providing serial and parallel communication for the
Java Development Toolkit (JDK) moving towards compliance with Sun's CommAPI.
/usr/share/doc/rxtx
/usr/share/doc/rxtx/AUTHORS
/usr/share/doc/rxtx/COPYING
/usr/share/doc/rxtx/ChangeLog
/usr/share/doc/rxtx/README
/usr/share/doc/rxtx/RMISecurityManager.html
/usr/share/doc/rxtx/SerialPortInstructions.txt
/usr/share/doc/rxtx/TODO
/usr/share/java/RXTXcomm.jar
/usr/share/maven-fragments/rxtx
/usr/share/maven-poms/JPP-rxtx.pom
Comment 44 Fleck 2012-05-28 13:39:07 CEST
Thats right, lib is in lib64rxtx-devel, well in devel package symlinks, but this will also install lib64rxtx2.1 package, this package contains libs, thou, arduino app doesnt work with serial ports, and i have error in terminal when using rxtx lib from repos!
I explained this in comment #40! :)
Comment 45 Alejandro Vargas 2012-05-28 13:57:31 CEST
Please, when compiling ADD the following patch for letting programs to access ttyACM devices:

--- src/gnu/io/RXTXCommDriver.java.orig
+++ src/gnu/io/RXTXCommDriver.java
@@ -574,6 +574,7 @@
                                        if(osName.equals("Linux"))
                                        {
                                                String[] Temp = {
+                                               "ttyACM", // linux USB modems
                                                "ttyS", // linux Serial Ports
                                                "ttySA", // for the IPAQs
                                                "ttyUSB", // for USB frobs


And please configure with --disable-lockfiles (this is a library for java applications, then you can't suid it for letting it access lock files)
Comment 46 Alejandro Vargas 2012-05-28 14:00:00 CEST
And plese use the lastest version (2.2 pre2)!!!
Comment 47 Jan Pihlgren 2012-05-31 04:14:11 CEST
I reported it also as 6181 for Mageia 2 final and x86-64.
The problem still exist in Mageia 2 .
Comment 48 Fleck 2012-05-31 09:01:04 CEST
+1 on comment 46 - arduino app crashes when using serial monitor with .so lib from rxtx-2.1-7-bins-r2.zip, works with 2.2 pre2! :)
Marja Van Waes 2012-05-31 18:45:15 CEST

Blocks: (none) => 6181

Comment 49 Marja Van Waes 2012-05-31 18:48:04 CEST
 (In reply to comment #48)
> +1 on comment 46 - arduino app crashes when using serial monitor with .so lib
> from rxtx-2.1-7-bins-r2.zip, works with 2.2 pre2! :)

adding the last rxtx committer

CC: (none) => puntogil
Hardware: i586 => All

Comment 50 Alejandro Vargas 2012-05-31 19:23:34 CEST
Please, remember to add --nolock option to configure.

This is needed for running programs without special privileges. Remember that you can't  just add suid bit to a java program, it is important to avoid the need or write privileges to system folders like /var/lock

And, please,  also remember to add the ttyACM patch, otherwise it will not work on newer ttyUSB devices that are created as ttyACM by the kernel.
Comment 51 Alejandro Vargas 2012-06-03 14:14:59 CEST
You could base the official packets on the arduino packet from blogdrake that is working OK
Comment 52 Alejandro Vargas 2012-06-18 14:13:37 CEST
Please, use the sources and patches from this packet. This includes the TTYACM patch and the switch for avoiding the lock problemas for non-root users:

ftp://ftp.blogdrake.net/mageia/mageia2/SRPMS/rxtx-nolock-2.2-2bdk.mga2.src.rpm
Manuel Hiebel 2012-06-18 16:14:11 CEST

Keywords: (none) => PATCH

Comment 53 Marja Van Waes 2012-07-06 15:03:55 CEST
Please look at the bottom of this mail to see whether you're the assignee of this  bug, if you don't already know whether you are.


If you're the assignee:

We'd like to know for sure whether this bug was assigned correctly. Please change status to ASSIGNED if it is, or put OK on the whiteboard instead.

If you don't have a clue and don't see a way to find out, then please put NEEDHELP on the whiteboard.

Please assign back to Bug Squad or to the correct person to solve this bug if we were wrong to assign it to you, and explain why.

Thanks :)

**************************** 

@ the reporter and persons in the cc of this bug:

If you have any new information that wasn't given before (like this bug being valid for another version of Mageia, too, or it being solved) please tell us.

@ the reporter of this bug

If you didn't reply yet to a request for more information, please do so within two weeks from now.

Thanks all :-D
Comment 54 papoteur 2012-10-31 10:24:55 CET
The bug is still valid.
To get arduino working, I installed it from blogdrake (not sure it was necessary) and copied 
cp i686-pc-linux-gnu/librxtxSerial.so /usr/lib/jvm/java/jre/lib/i386/
cp RXTXcomm.jar /usr/share/java/
from rxtx-2.2pre2-bins/
I have not yet tested with the arduino device.

CC: (none) => yves.brungard_mageia

Comment 55 Alejandro Vargas 2012-10-31 10:30:09 CET
popoteur: the blogdrake packet installs all necesary libs in the right place.

NOTE that you need the rxtx packets from blogdrake due to the patches needed to recognize the /dev/ttyACM devices of the newer Arduino boards (Arduino UNO and Arduino Leonardo). 

I think using the blogdrake repository and "urpmi arduino" should be enough to get all working. If not, please contact me for finding the reason and fixing the packet.
Comment 56 papoteur 2012-10-31 10:46:52 CET
Alejandro,
No, the urpmi from blogdrake does not be enough. It got always the error in java
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
Comment 57 Alejandro Vargas 2012-10-31 11:21:15 CET
popoteur: I will check this. The packet should search for the system rxtxSerial and require rxtx-nolock. May be an error somewhere.
Comment 58 Alejandro Vargas 2012-11-02 14:33:39 CET
popoteur: I just fixed the wrong dependence rxtx -> rxtx-nolock. I uploaded the new packets (release 14: arduino-1.0.1-14bdk.mga2.noarch.rpm arduino-core-1.0.1-14bdk.mga2.noarch.rpm arduino-doc-1.0.1-14bdk.mga2.noarch.rpm) to the Blogdrake repository. It should be available soon but if you can't wait, you can download them from here: ftp://ftp.blogdrake.net/incoming/noarch/



Installing this packets should ask you for replacing rxtx by rxtx-nolock. You should also use the lastest version of rxtx-nolock. This packet includes a patch for avoiding the creation of /var/lock files (normal users does not have the access rights to do this) and adds the detection of /dev/ttyACM and /dev/arduino devices. Then, you should use rxtx-nolock-2.2-3.mga2.i586.rpm that should be available soon in the repo but meannwhile you can be downloaded from ftp://ftp.blogdrake.net/incoming/i586/

If you need x68_64 version, it should be available soon in the repo, but you can build your own binary from the SRPM packet (ftp://ftp.blogdrake.net/incoming/SRPMS/rxtx-nolock-2.2-3.mga2.src.rpm)

Please report any problem and I will try to fix it.
Comment 59 papoteur 2012-11-05 20:39:45 CET
I installed the packages from the ftp cited in C58.
It works ! :)
Comment 60 Alex Loginov 2012-12-19 14:44:28 CET
Now arduino don't work without package librxtx-devel. I think librxtx-devel must be in Requires.

CC: (none) => loginov_alex

Comment 61 claire robinson 2013-01-05 19:38:44 CET
pinging before version freeze

CC: (none) => eeeemail

Comment 62 Alejandro Vargas 2013-03-01 10:08:24 CET
I think the version in Mageia 3 is exactly the same as in Mageia 2.

First problem: it is an old version. Current version is 1.0.3

Second problem: it does not work.

PLEASE PLEASE, read the previous messages. 

PLEASE, use this source packets:

ftp://ftp.blogdrake.net/mageia/mageia2/SRPMS/arduino-1.0.3-14bdk.mga2.src.rpm
ftp://ftp.blogdrake.net/mageia/mageia2/SRPMS/rxtx-nolock-2.2-3.mga2.src.rpm


What is changed?

1) In arduino packet it adds 99-arduino.rules to /udev/rules.d. It allows the users to access the arduino device avoiding the need of adding the user to any group. 


SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666", SYMLINK+="arduino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO", MODE="0666", SYMLINK+="arduino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE="0666", SYMLINK+="arduino arduino_$attr{serial}"
cat: cat: No existe el fichero o el directorio
SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666", SYMLINK+="arduino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO", MODE="0666", SYMLINK+="arduino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE="0666", SYMLINK+="arduino arduino_$attr{serial}"


2) rxtx-nolock adds the feature of detecting /dev/arduino and /dev/ttyACM devices in order to allow the use of newer arduino buards that are not detected ad ttyUSB devices and avoids the need of locking the device because normal users can't create files on the lock directory:


ls -l /var/run/lock
drwxr-xr-x 5 root root 100 Mar  1 09:17 /var/run/lock/
Comment 63 Alejandro Vargas 2013-03-01 10:16:59 CET
By the way: Arduino can't be installed in Mageia 3 (cauldron) due to this problem:

https://bugs.mageia.org/show_bug.cgi?id=9217
Alejandro Vargas 2013-03-01 12:27:08 CET

Target Milestone: Mageia 2 => Mageia 3

Comment 64 Jim Darby 2013-05-01 01:34:53 CEST
I too have just come across this problem. Essentially this makes Mageia 3 (and 2 as well) useless for Arduino development.

We should either fix this issue or remove the packages. Clearly the first is prefereable.

Alejandro seems to have fixed the problem. Can we update to his versions? Yes, I know that we're in version freeze but shipping versions that do not work makes no sense.

CC: (none) => uberscubajim

Comment 65 Alejandro Cobo 2013-05-01 02:26:13 CEST
I use Alejandro's version in Mageia since it was released with no problems at all.
claire robinson 2013-05-01 09:18:46 CEST

CC: (none) => juergen.harms

Comment 66 Juergen Harms 2013-05-05 09:48:52 CEST
Trying to understand: there have been several fundamental issues: (1) the rxtx reference problem (principal subject of bugzilla 5411), (2) the group association problem for doing serial I/O and (3) the broken cross-avr-gcc problem. If I understand right, (1) and (2) have been fixed by Alejandro quite some time ago - has that found its way into the mirrors?, (3) has recently been fixed in bugzilla 7825.

Can Mageia now be used again to generate software with Arduino - and without working through the comments in this thread? What about Mageia 3 (cauldron) ?

Please be aware that recent gcc (and therefore avr-gcc-4.7.2) versions introduced some severe problems of backward compatibility (reduction of compiler permissiveness, requirement to have PROGMEM statements declared with const, prohibiting to specify memory-type in type declarations). That might look like an additional problem - but in fact is a problem of upgrading application software.
Sébastien GUERIN 2013-05-13 22:55:13 CEST

CC: (none) => sebastien.guerin.news

Comment 67 Alejandro Vargas 2013-05-15 12:40:58 CEST
I think it may be necesary to create a special avr-gcc packet for arduino. It may be installed under the arduino directory for avoiding conflicts with standard cross-avr-gcc. 

The version included with Arduino official binaries is 4.3.2. 4.3.3 is also compatible but earlier versions are better but can't compile some libraries.

The arduino page says that since any verision of avr-gcc has problems, at least if you use the same version as all people, you will have the same problems and will be easy to find help. 

Another problem: I compiled 4.3.2 and it worked as expected but with one problem: ot does not recognize the ATMEGA32 included in Arduino Leonardo. I asked for the patch I supposed they applied to 4.3.2 but they says the binary they are distributing was taken from Ubuntu binaries... then we sould get the ubuntu sources for creating our binaries.
Comment 68 Alejandro Vargas 2013-06-19 10:42:08 CEST
Just informing that I created an RPM packet for Mageia 3

The official Mageia binaries does not work. Also, Mageia binaries has another problem: it uses a newer version of AVR-GCC that is not compatible with all Arduino sources. Then I created a new packet based on the official binaries with a little changes. The packet "just works" and don't need to change any permissions or groups.


Instruction for usage:

For 32 bits:

Alternative 1 (better because it auto-updates with new versions):

Code:
urpmi.addmedia --wget --distrib http://ftp.blogdrake.net/mageia/mageia3/i586 
urpmi arduino
Alternative 2 (manual install):

Code:
urpmi http://ftp.blogdrake.net/mageia/mageia3/free/i586/arduino-1.0.5-1bdk.mga3.i586.rpm
For 64 bits:
Alternative 1 (better because it auto-updates with new versions):

Code:
urpmi.addmedia --wget --distrib http://ftp.blogdrake.net/mageia/mageia3/x86_64 
urpmi arduino
Alternative 2 (manual install):

Code:
urpmi http://ftp.blogdrake.net/mageia/mageia3/free/x86_64/arduino-1.0.5-1bdk.mga3.x86_64.rpm

The packet is also available for mageia 2 and should work in other rpm based distros.

Explanation of the changes:
The packet includes all the official binaries for maximum compatibility except for:
I replaced the RXTX library with the following changes from official binaries:
Disabled port locking avoiding the need of adding the user to lock group
Added /dev/ttyACM and /dev/arduino devices
I added a new udev rule that:
Sets the default permissions of the arduino device to 666 for avoiding the need of adding the user to dialout group.
Added a link to the device named arduino for auto creating the /dev/arduino device

"Source" (not really source because it uses official binaries) packet available at: http://ftp.blogdrake.net/mageia/mageia3/SRPMS/arduino-1.0.5-1bdk.mga.src.rpm
Comment 69 Glen Ogilvie 2013-07-05 10:10:58 CEST
Is anyone working on this bug? 

I've also found that it does not work in Mageia3, as shipped.

Thank you Alejandro for your package.  It will help people that would like to use their arduino on Mageia while the offical package is being fixed.

CC: (none) => nelg

Comment 70 Pierre Jarillon 2013-08-29 19:18:09 CEST
Mageia 3
I have added rxtx but I have the message with the basic example "blink":

Binary sketch size: 984 bytes (of a 32256 byte maximum)
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver

CC: (none) => jarillon

D Morgan 2013-09-18 00:18:37 CEST

Assignee: dmorganec => bugsquad

Comment 71 Magnus Rasche 2013-11-04 21:17:03 CET
I have the same problem with a other piece of hardware (Tams MC - Model railroad control) respond to a Java program (CV-Navi).

The developer has no problem with the same configuration on his Fedora19
(32 bit).

Also, I noticed that all rxtx packages (Mageia3 and Cauldron) have the ID
mga2.

If tests needed, call me.
In the moment I use a MGA3 (64) with all updates.
But I can also setup a Cauldron very quickly.

CC: (none) => magnus.mud

Comment 72 Oliver Burger 2013-11-10 12:06:52 CET
I just tested building the package in cauldron.

It does not build using our default LDFLAGS.

When removing the "-Wl,--no-undefined" flag, the build succeeds.

Now we could either fix the source code of the package (which I can't really, not knowing enough about it) or we can change the spec file to not use that flag.

This would at least solve the problem for Cauldron.

CC: (none) => oliver.bgr

Comment 73 Magnus Rasche 2013-12-14 18:03:11 CET
Any good news?
There are still mga2 packages in cauldron
Comment 74 Pierre Jarillon 2014-01-27 13:14:57 CET
I have removed arduino with MCC and run

urpmi http://ftp.blogdrake.net/mageia/mageia3/free/x86_64/arduino-1.0.5-1bdk.mga3.x86_64.rpm

Now, arduino runs fine in mga3
Comment 75 Matteo Pasotti 2014-03-12 23:04:08 CET
I've just experienced this bug.
If no lib64rxtx-devel package is installed the ide don't start.

Installed using urpmi arduino on a fresh mga3 installation.

CC: (none) => matteo.pasotti

Comment 76 Alex Loginov 2014-03-13 13:38:11 CET
No package lib(64)rxtx-devel for Mageia 4, but arduino needs lib(64)rxtx-devel (rxtx-java-2.2pre2 in OpenSuse).
Catenary https://sites.google.com/site/chalkmarrowfiles needs librxtxSerial.so
Please return devel package and add devel in Requires for arduino.
Matteo Pasotti 2014-03-13 19:21:02 CET

Whiteboard: MGA2TOO => MGA2TOO MGA3TOO

Comment 77 Yann Cantin 2015-10-23 19:17:46 CEST
No more supported version bugs, closing.

Please test with current Mageia and open a new bug report if problem persist.

Status: REOPENED => RESOLVED
CC: (none) => yann.cantin
Resolution: (none) => OLD


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