Skip to content
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

Officially support arm64 architecture #2257

Closed
davetroy opened this issue Apr 3, 2021 · 21 comments
Closed

Officially support arm64 architecture #2257

davetroy opened this issue Apr 3, 2021 · 21 comments

Comments

@davetroy
Copy link

davetroy commented Apr 3, 2021

Expected Behavior

Graph window will initialize and show graph.

Current Behavior

Graph window does not initialize. Instead, this error is produced:

java.lang.NoClassDefFoundError: Could not initialize class com.jogamp.opengl.GLProfile
	at org.gephi.visualization.swing.GLAbstractListener.getCaps(GLAbstractListener.java:173)
	at org.gephi.visualization.swing.GraphCanvas.<init>(GraphCanvas.java:66)
	at org.gephi.visualization.VizController.createCanvas(VizController.java:310)
	at org.gephi.visualization.VizController.initInstances(VizController.java:123)
	at org.gephi.visualization.VizController.getInstance(VizController.java:88)
	at org.gephi.visualization.component.VizBarController.createDefaultGroups(VizBarController.java:99)
	at org.gephi.visualization.component.VizBarController.<init>(VizBarController.java:88)
	at org.gephi.visualization.component.GraphTopComponent.initCollapsePanel(GraphTopComponent.java:118)
	at org.gephi.visualization.component.GraphTopComponent.access$000(GraphTopComponent.java:77)
	at org.gephi.visualization.component.GraphTopComponent$1$1.run(GraphTopComponent.java:99)
	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 org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] 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)

Steps to Reproduce

  1. Install Azul JDK Java 8 dmg on a stock M1 Mac.
  2. Set jdkhome="/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home" in gephi.conf
  3. Open Gephi
  4. Graph window does not initialize, Java throws error

Context

I'm just trying to use Gephi in ARM64 native build on M1 Mac. Gephi does work with x64 JDK on M1 with Rosetta, but that's no fun is it?

Your Environment

  • Version used: Gephi 0.9.2
  • Java version: Azul Java 8 JDK arm64
  • Operating System: MacOS 11.1
@2714222609
Copy link

I got the same error on macbook pro M1, did you solve the problem?

@davetroy
Copy link
Author

No the only solution I was able to find was to run under x86 Java and Rosetta2, which I'm trying to avoid if possible. Please post here if you do find a solution, but I think Gephi has to be patched to change its display subsystem somehow.

@mbastian
Copy link
Member

We don't officially support the arm64 architecture yet. We'll need to review OpenGL native dependencies and package a different JRE with the Mac bundle. Plus potentially any other issues that may arise.

@mbastian mbastian changed the title Failure to Initialize Graph window on Mac M1 with Azul JDK 1.8 arm64 Java Officially support arm64 architecture Dec 23, 2021
@mbastian mbastian modified the milestones: 0.9.3, 0.9.4 Mar 1, 2022
@mbastian mbastian modified the milestones: 0.9.4, 0.10.0 Apr 11, 2022
@joachimwolff
Copy link

Any progress on this issue? Using the recommended Adoptium JDK version 11 but as aarch64 instead x64 leads to a much smoother Gephi experience, however, it does not display the graph. Would be really appreciated if this could be supported soon.

@stygmate
Copy link

stygmate commented Oct 5, 2022

any news on this one ?

@mbastian
Copy link
Member

mbastian commented Nov 9, 2022

No, I'm afraid that without the new viz engine project finishing (cc @eduramiba) nor JOGL (our current OpenGL dependency) officially support it we can't move forward. The rest of Gephi should work without issues, and much faster indeed. It's a pity but we'll keep you posted on the progress.

@mbastian mbastian removed this from the 0.10.0 milestone Nov 9, 2022
@mbastian mbastian added OpenGL and removed To review labels Nov 9, 2022
@mbastian mbastian added this to the 0.10.0 milestone Nov 21, 2022
@mbastian mbastian self-assigned this Nov 21, 2022
@oaken-source
Copy link

fwiw, the same issue seems to arise when trying to run gephi on an aarch64 linux system, such as archlinuxarm on a chromebook gru-kevin.

@mbastian
Copy link
Member

Hi, I have good news. I've dived into the latest discussions on the JOGL community and some folks (@jzy3d and others) built an arm64 compatible version of JOGL. I've succesfully tested it on my M1 and if no problem arize we could ship that in the next release. I consider it still experimental but it's also used in other softwares.

Could you folks test this dev version and let me know if you see issues with the OpenGL rendering? https://oss.sonatype.org/content/repositories/snapshots/org/gephi/gephi/0.10.0-SNAPSHOT/gephi-0.10.0-20221121.220603-21-macos-aarch64.dmg

This version embeds the JDK11 for aarch64 (Adoptium)

@stygmate
Copy link

@mbastian :) seems to work well. I'm on a mac studio m1 max.
But another bug is still here, when i launch Gephi, if it is at foreground while initialising the graph, it crash. It must be hidden by another window for graph to init with success.

@mbastian
Copy link
Member

@mbastian :) seems to work well. I'm on a mac studio m1 max. But another bug is still here, when i launch Gephi, if it is at foreground while initialising the graph, it crash. It must be hidden by another window for graph to init with success.

Yes, that is covered in #2546. Check the update. If you try the version I posted there it contains both fixes.

@davetroy
Copy link
Author

Good stuff! Seems to work fine on first glance on MacBook Pro M1 Max. Will give it a stress test and report back any findings. And I like the idea of embedding a known good JDK in the binary. 👍

@stygmate
Copy link

Yes, that is covered in #2546. Check the update. If you try the version I posted there it contains both fixes.

but the version linked in other issue is x86 and not aarch64 ?!

@jzy3d
Copy link

jzy3d commented Nov 23, 2022

Good news! I confirm the JOGL 2.4 rc4 supporting Apple M1 is used by multiple software including commercial software.

Most of the known bug have workarounds that have been referenced in this document. Each issue is described in my JOGL clone's issue list.

Just sharing thoughts for the future : JOGL main commiter has left and pursuing is hard. Among other things, building a new JOGL release for multiple platforms requires a complex CI (involving as many computer as target {OS,CPU}). LWJGL is still alive but suffers from similar drawbacks (although the main commiter is still working on it). My opinion is that the main pain of building OpenGL bindings can be minimized by using the recent foreign function and memory API. I started evaluating this here, but going further requires some more work.

@oaken-source
Copy link

Hi, I have good news. I've dived into the latest discussions on the JOGL community and some folks (@jzy3d and others) built an arm64 compatible version of JOGL. I've succesfully tested it on my M1 and if no problem arize we could ship that in the next release. I consider it still experimental but it's also used in other softwares.

Could you folks test this dev version and let me know if you see issues with the OpenGL rendering? https://oss.sonatype.org/content/repositories/snapshots/org/gephi/gephi/0.10.0-SNAPSHOT/gephi-0.10.0-20221121.220603-21-macos-aarch64.dmg

This version embeds the JDK11 for aarch64 (Adoptium)

could you also package a version for linux? I tried to extract the dmg, but had no success.

@jzy3d
Copy link

jzy3d commented Nov 23, 2022

could you also package a version for linux? I tried to extract the dmg, but had no success.

I only patched JOGL's macOS jar to support ARM. Doing the same for Linux is another work that I can't do right now (mainly I don't have a Linux machine with ARM CPU). If somebody is willing to patch JOGL's Linux, you can read this how-to explaining how I did it for macOS.

@xyjigsaw
Copy link

We are looking forward to its release.

mbastian added a commit that referenced this issue Dec 25, 2022
@mbastian
Copy link
Member

Closing as resolved. The aarch64 version will be released in the upcoming 0.10.0 version

@seinecle
Copy link

😱👍

@skymagician
Copy link

skymagician commented Jan 9, 2023

Would you please update arm64 version to homebrew cask code?

@hannesbreit
Copy link

hannesbreit commented Jan 9, 2023

Still hanging directly after starting Gephi.
Starts rapidly but on welcome screen the whole app just freezes and I must force quit.

Working with MacBook Pro M1 Pro and using silicon version of Gephi.

By the way I do not have any issues on windows.

@elvey
Copy link

elvey commented Jun 6, 2023

It seems Gephi isn't yet really running entirely natively on arm64; I'm unable to run it on my M1. I get an error (below) saying have to install Rosetta, which I don't want to do. It seems something has yet to be converted. This happens with the latest production and snapshot releases. :
gephi-0.10.2-20230330.201245-35-macos-aarch64.dmg and
gephi-0.10.1-macos-aarch64.dmg
Screen Shot 2023-06-06 at 10 16 43 AM Medium
Reopen issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.