gephi icon indicating copy to clipboard operation
gephi copied to clipboard

Officially support arm64 architecture

Open davetroy opened this issue 3 years ago • 4 comments

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

davetroy avatar Apr 03 '21 17:04 davetroy

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

2714222609 avatar Jul 29 '21 15:07 2714222609

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.

davetroy avatar Jul 29 '21 15:07 davetroy

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 avatar Dec 23 '21 09:12 mbastian

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.

joachimwolff avatar Jul 06 '22 10:07 joachimwolff

any news on this one ?

stygmate avatar Oct 05 '22 21:10 stygmate

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 avatar Nov 09 '22 19:11 mbastian

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.

oaken-source avatar Nov 22 '22 13:11 oaken-source

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)

mbastian avatar Nov 22 '22 18:11 mbastian

@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.

stygmate avatar Nov 22 '22 20:11 stygmate

@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.

mbastian avatar Nov 22 '22 20:11 mbastian

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. 👍

davetroy avatar Nov 22 '22 21:11 davetroy

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 ?!

stygmate avatar Nov 22 '22 22:11 stygmate

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.

jzy3d avatar Nov 23 '22 09:11 jzy3d

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.

oaken-source avatar Nov 23 '22 09:11 oaken-source

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.

jzy3d avatar Nov 23 '22 10:11 jzy3d

We are looking forward to its release.

xyjigsaw avatar Nov 25 '22 07:11 xyjigsaw

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

mbastian avatar Dec 25 '22 19:12 mbastian

😱👍

seinecle avatar Dec 25 '22 23:12 seinecle

Would you please update arm64 version to homebrew cask code?

skymagician avatar Jan 09 '23 14:01 skymagician

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.

hannesbreit avatar Jan 09 '23 18:01 hannesbreit

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?

elvey avatar Jun 06 '23 17:06 elvey