Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 751562

Summary: dev-embedded/arduino-1.8.13: Needs patched astyle for source code formatting
Product: Gentoo Linux Reporter: Jan Seeger <jan.seeger>
Component: Current packagesAssignee: Embedded Gentoo Team <embedded>
Status: UNCONFIRMED ---    
Severity: normal CC: aklhfex, sam, sultan
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jan Seeger 2020-10-28 08:57:48 UTC
Apparently, the arduino project requires a patched astyle to work correctly. The correct patches are available at [1], but I don't know how to make the patched version available for arduino only. Maybe with an extended java.library.path?



[1]: https://github.com/arduino/astyle

Reproducible: Always

Steps to Reproduce:
1. emerge arduino
2. run 'arduino'
3. Press Ctrl+T

Actual Results:  
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: cc.arduino.packages.formatter.AStyleInterface.AStyleMain(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	at cc.arduino.packages.formatter.AStyleInterface.AStyleMain(Native Method)
	at cc.arduino.packages.formatter.AStyle.run(AStyle.java:80)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


Expected Results:  
Formatted source code.
Comment 1 Jan Seeger 2020-10-28 09:27:18 UTC
I have built the astyle from the included link, and can confirm that source code formatting works using these patches. If someone could advise me on how to build a "special" version of astyle for arduino, I could probably write an ebuild.
Comment 2 Chris Mayo 2024-11-10 19:19:27 UTC
Fixed I believe in now stable dev-util/astyle-3.6.1

https://gitlab.com/saalen/astyle/-/tags/3.6.1