Bug 1444550 - Crashes at startup with "java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/libastyle-2.05.so"
Summary: Crashes at startup with "java.lang.UnsatisfiedLinkError: Can't load library: ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: arduino
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gianluca Sforna
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-22 06:08 UTC by Arjun A.K.
Modified: 2017-07-31 16:21 UTC (History)
11 users (show)

Fixed In Version: arduino-1.6.6-3.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-31 16:21:32 UTC
Type: Bug


Attachments (Terms of Use)
arduino-use-system-astyle.patch updated for astyle 3.x (947 bytes, patch)
2017-06-27 23:02 UTC, Jens Lody
no flags Details | Diff

Description Arjun A.K. 2017-04-22 06:08:52 UTC
Loading configuration...
Initializing packages...
Preparing boards...
Starting...
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/libastyle-2.05.so
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at cc.arduino.packages.formatter.AStyleInterface.<clinit>(AStyleInterface.java:47)
        at cc.arduino.packages.formatter.AStyle.<init>(AStyle.java:54)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at processing.app.Editor.createToolMenuItem(Editor.java:1077)
        at processing.app.Editor.addInternalTools(Editor.java:1100)
        at processing.app.Editor.buildToolsMenu(Editor.java:803)
        at processing.app.Editor.buildMenuBar(Editor.java:568)
        at processing.app.Editor.<init>(Editor.java:249)
        at processing.app.Base.handleOpen(Base.java:870)
        at processing.app.Base.handleOpen(Base.java:855)
        at processing.app.Base.handleOpen(Base.java:851)
        at processing.app.Base.handleNew(Base.java:746)
        at processing.app.Base.<init>(Base.java:450)
        at processing.app.Base.guardedMain(Base.java:214)
        at processing.app.Base.main(Base.java:130)
Can't load library: /usr/lib/libastyle-2.05.so
Cannot load native library /usr/lib/libastyle-2.05.so
The program has terminated!

Comment 1 Jens Lody 2017-04-23 15:19:04 UTC
I bumped astyle to 2.06 and was in contact of one of the arduino-maintainers before and after the change.
And he mailed me, that he wants to update arduino accordingly.
But it looks like it never happened.
I now tried to contact another POC for arduino, because I plan to update astyle to the actual 3.0-release soon.

Comment 2 Yann Droneaud 2017-06-27 20:18:29 UTC
Same issue here, after upgrading to F26 beta, arduino IDE cease to work.

Will it be necessary to introduce have a "compat-libastyle" just for the "arduino" package ?

Comment 3 Yann Droneaud 2017-06-27 20:21:21 UTC
Note: I'm already having astyle-3.0.1-1.fc26 through update-testing repo.

Comment 4 Jens Lody 2017-06-27 23:02:16 UTC
Created attachment 1292485 [details]
arduino-use-system-astyle.patch updated for astyle 3.x

Comment 5 Jens Lody 2017-06-27 23:03:07 UTC
(In reply to Yann Droneaud from comment #2)
> Same issue here, after upgrading to F26 beta, arduino IDE cease to work.
> 
> Will it be necessary to introduce have a "compat-libastyle" just for the
> "arduino" package ?

Just a simple update to arduino would help.
The 2.xx packages never worked (source-formatting in arduino does not work).

I fixed this by adding special functions just for the arduino compatibility to astyle 3.x.

The so versioning-scheme of astyle is changed in a way, that only major astyle-updates would need a rebuild of arduino.

I sent a patch to update the arduino-use-system-astyle.patch to the maintainer.
It's tested locally and works well with the arduino revision in the repo, which is outdated by the way.
In other words arduino is broken, since F26 was rawhide, I was in contact with the former and actual POC (before the updates), they said, they want to update arduino accordingly, but nothing happened.
Maybe it's time to ask a proven packager to fix this.

I attached the update arduino-use-system-astyle.patch .

Comment 6 Akın Ömeroğlu 2017-07-12 09:29:41 UTC
Hello,

After official release of F26 I still can reproduce this error. There is a special patch in rpm which force to use system wide libastyle but this patch is broken because it looks for /usr/lib64/libastyle-2.05.so and as Jens wrote we need to look for /usr/lib64/libastyle.so.3. 

So it would be great if you apply this patch to arduino package and as you may know there is a bug record for new version of arduino (https://bugzilla.redhat.com/show_bug.cgi?id=1435029) maybe we can bump the package to new version while we are fixing this bug.

Thanks,

Comment 7 Akın Ömeroğlu 2017-07-12 09:30:06 UTC
Hello,

After official release of F26 I still can reproduce this error. There is a special patch in rpm which force to use system wide libastyle but this patch is broken because it looks for /usr/lib64/libastyle-2.05.so and as Jens wrote we need to look for /usr/lib64/libastyle.so.3. 

So it would be great if you apply this patch to arduino package and as you may know there is a bug record for new version of arduino (https://bugzilla.redhat.com/show_bug.cgi?id=1435029) maybe we can bump the package to new version while we are fixing this bug.

Thanks,

Comment 8 Gianluca Sforna 2017-07-12 10:59:49 UTC
Ok guys, sorry for sleeping on this issue. I am rebuilding now the package with the patch applied (thanks Jens!), please test and give karma so we can push it through quickly.

Comment 9 Fedora Update System 2017-07-12 11:02:32 UTC
arduino-1.6.6-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6576714231

Comment 10 Fedora Update System 2017-07-12 18:22:38 UTC
arduino-1.6.6-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6576714231

Comment 11 Fedora Update System 2017-07-21 22:09:06 UTC
arduino-builder-1.0.5-6.fc26 arduino-1.6.6-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-394c0f1880

Comment 12 Fedora Update System 2017-07-23 06:57:19 UTC
arduino-1.6.6-2.fc25, arduino-builder-1.0.5-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c33ec5464a

Comment 13 Fedora Update System 2017-07-23 09:59:30 UTC
arduino-1.6.6-3.fc26, arduino-builder-1.0.5-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-394c0f1880

Comment 14 Javier Ramirez 2017-07-28 18:09:45 UTC
I still can reproduce this issue:

arduino-builder-1.0.5-4.fc26.x86_64
arduino-1.6.6-1.fc26.noarch
arduino-core-1.6.6-1.fc26.noarch
astyle-3.0.1-1.fc26.x86_64

arduino 
Loading configuration...
Initialising packages...
Preparing boards...
Starting...
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/libastyle-2.05.so
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827)
	at java.lang.Runtime.load0(Runtime.java:809)
	at java.lang.System.load(System.java:1086)
	at cc.arduino.packages.formatter.AStyleInterface.<clinit>(AStyleInterface.java:47)
	at cc.arduino.packages.formatter.AStyle.<init>(AStyle.java:54)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at processing.app.Editor.createToolMenuItem(Editor.java:1077)
	at processing.app.Editor.addInternalTools(Editor.java:1100)
	at processing.app.Editor.buildToolsMenu(Editor.java:803)
	at processing.app.Editor.buildMenuBar(Editor.java:568)
	at processing.app.Editor.<init>(Editor.java:249)
	at processing.app.Base.handleOpen(Base.java:870)
	at processing.app.Base.handleOpen(Base.java:855)
	at processing.app.Base.handleOpen(Base.java:851)
	at processing.app.Base.handleNew(Base.java:746)
	at processing.app.Base.<init>(Base.java:450)
	at processing.app.Base.guardedMain(Base.java:214)
	at processing.app.Base.main(Base.java:130)
Can't load library: /usr/lib/libastyle-2.05.so
Cannot load native library /usr/lib/libastyle-2.05.so

Comment 15 Jens Lody 2017-07-28 21:35:26 UTC
You need at least arduino 1.6.6-2 as stated in the comments above.
Its's still in testing, you either have to enable updates-testing (at least for arduino) or wait until it is pushed to stable.

Comment 16 Fedora Update System 2017-07-31 16:21:32 UTC
arduino-1.6.6-3.fc26, arduino-builder-1.0.5-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


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