-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS m1 failed build #564
Comments
Hi,
Yes, JCenter is down. We fixed this issue in the
Why not?
You can run x64 binaries in an ARM laptop? |
I see no aarch64 artefacts there
Mostly, yes. Thankfully to Rossetta 2, but not any binary. Here are examples https://isapplesiliconready.com/for/unsupported |
When I switch back to x64, I got this log on start
so I added
I guess awt api for Mac changed dramatically in idk 9, so native macOS GUI integration got broken, but basic functionality should work |
That Apple EAWT package is obsolete and scheduled for removal in the next Audiveris' release. |
Can you take care of getting Javacpp artifacts for Mac ARM64 compiled and uploaded to Maven Central? Javacpp-presets project provides the necessary infrastructure for that. This would be really great! I can't do that because I don't own the corresponding HW. There is a dedicated issue for Apple Silicon integration: bytedeco/javacpp-presets#1069 |
I'll give it a try, but I haven't done such things, I'm more into java :) |
I understand. Javacpp-presets is an important project that brings the Java language to a new level by providing C++ interops. Without it machine learning in Java wouldn't be possible. |
FYI, |
I tried to build the latest version of the If anyone wants to reproduce my work, I've posted it as a GitHub Gist. I'm trying to write a Homebrew formula for Audiveris, so I'm using that for testing. The full error messages that I'm getting are also posted in that Gist. Is there a way that Audiveris can update to these newer versions of |
@singingwolfboy Since I have no access to a MacOS environment, I plan to do this work on Windows, with the hope that the same Java code will apply to Mac as well. Stay tuned... |
…ract - javacpp set to 1.5.8 - leptonica set to 1.82.0 - tesseract set to 5.2.0 - TesseractOCR and TesseractOrder classes updated to new API
@singingwolfboy Could you pull again and make sure it's OK also for your Mac environment? |
I know of Mac users who are reluctant to get into development tools and expect just "plain applications". I'm not at all familiar with Homebrew.
Could you elaborate on this possibility in Audiveris context? |
Using commit 5b8204a, I was able to build and install Audiveris on my M1 Mac, and it runs! Sort of. When I launch the app, it looks like this: When I try to import a PDF of sheet music, it looks like this: Click here to see the traceback in the terminal$ audiveris INFO [] CLI 282 | CLI args: [] INFO [] Main 402 | Environment: - Audiveris: 5.3-beta:5b8204a0f - OS: Mac OS X 13.3.1 - Architecture: aarch64 - Java VM: OpenJDK 64-Bit Server VM (build 20.0.1, mixed mode, sharing) - OCR Engine: Tesseract OCR, version 5.2.0 INFO [] AliasPatterns 134 | Alias patterns: [(IMSLP[0-9]*)-.*] Mac OS X Adapter could not talk to EAWT: java.lang.IllegalAccessException: class org.jdesktop.application.utils.OSXAdapter cannot access class com.apple.eawt.Application (in module java.desktop) because module java.desktop does not export com.apple.eawt to unnamed module @3f3e6f71 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:394) at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:709) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:493) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484) at org.jdesktop.application.utils.OSXAdapter.setHandler(OSXAdapter.java:140) at org.jdesktop.application.utils.OSXAdapter.setQuitHandler(OSXAdapter.java:74) at org.jdesktop.application.Application.create(Application.java:257) at org.jdesktop.application.Application$1.run(Application.java:185) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) INFO [] MainGui 573 | Audiveris version 5.3-beta INFO [] MainGui 574 | LogUtil. Property logback.configurationFile not defined, skipped. LogUtil. No /Users/singingwolfboy/Library/Application Support/AudiverisLtd/audiveris/logback.xml, skipped. LogUtil. Configuration found jar:file:/opt/homebrew/Cellar/audiveris/5.3-beta/libexec/audiveris.jar!/res/logback.xml LogUtil. Logging to /Users/singingwolfboy/Library/AudiverisLtd/audiveris/log/20230506T092701.log It appears that there are a few other Java libraries that have problems running on a Mac, and I have no idea of these libraries have any fixes/updates available. Based on a quick web search, it appears that these libraries haven't been updated in years, so they probably are abandoned.
Yes! If we manage to get Audiveris packaged in Homebrew, then in order to install it, a Mac user would simply need to run |
The lines that appear in log window, located at the bottom of Audiveris main window, are just short messages, for example to signal that an exception has been raised. Generally there is a stack dump for every exception raised, giving more information about the root causes. |
Oops, sorry! |
I noticed this line in your stack dump:
This reminds me of illegal accesses that occurred with Java 9 and above, due to Jigsaw For example, look at lines 45/46 in
Perhaps you could add an arg like "--add-exports=com.apple.eawt=ALL-UNNAMED" |
@singingwolfboy It looks like you're missing Freetype library JPodRenderer needs for rasterizing PDFs. Freetype is a native dependency meaning it needs to be compiled from C sources and placed to some predefined location in order to be accessible for the Java Virtual Machine. |
Freetype is installed on my system already, but JPodRenderer probably doesn't know where to find it. On M1 Macs, Homebrew uses |
@maximumspatium Your message got into my mail box at 1:44 in the morning. What do you do in the middle of the night?!! :-) |
Symlink in |
I was not able to do that -- macOS System Integrity Protection prevents any modification of the Any other suggestions? |
Is there any progress on this issue? |
I haven't made any progress. However, I'm not sure closing it is the best option; this is still a problem on macOS, and leaving the issue open might allow others to find it more easily. |
OK, let's keep it open. |
I tried to build a project and stumbled upon some problems. Finally I solved them but I want to share this info.
OS: macOS Monterey , MacBook Air M1
I installed tesseract-eng via ports
IDE: Intellij IDEA
You can close this issue if there you find it unrelated
The text was updated successfully, but these errors were encountered: