esteinberg / plantuml4idea

Intellij IDEA plugin for PlantUML
Apache License 2.0
629 stars 114 forks source link

Certain diagram types are not working on M1 Macs #365

Closed malclear closed 1 year ago

malclear commented 1 year ago

I've recently installed the plugin in Rider on my Mac M1 (ARM64) machine. I also installed Graphviz via brew install graphviz. Now, only the Sequence and Activity diagrams are working. The 6 other file types I tested all returned a message stating: image

I did find the jar file related to PlantUml in the following directory and ran the suggested command regarding "testdot": /Users/[ *** my user name ***]/Library/Application Support/JetBrains/Toolbox/apps/Rider/ch-0/222.4167.23/Rider.app.plugins/plantuml4idea/lib. I got the following result: image

I've tested this on three different Mac M1s (but nothing else) and got the same results each time.

malclear commented 1 year ago

A workaround/solution to this was found by my very smart friend and co-worker, @jblackburn21. The solution involves adding a sym link from the Dot executable path listed in the image above to the correct location for the Graphviz installation on ARM64 machines.

cd /opt
sudo mkdir -p local/bin
sudo ln -s /opt/homebrew/bin/dot /opt/local/bin/dot
malclear commented 1 year ago

Reopening as I realized the previous comment was more workaround than solution.

jblackburn21 commented 1 year ago

This is a duplicate of #330 but with an alternative solution. The default paths for plantuml look for /usr/local/bin/dot, /usr/bin/dot, or the GRAPHVIZ_DOT env var. Any of these can be restored since the graphviz brew package installs to /opt/homebrew/bin/dot.

izmaylovdev commented 1 year ago

I have the same issue, I have set GRAPHVIZ_DOT variable and looks like testdot works fine:

image

but when I try to create diagram I get:

image

variable setup:

image
krasa commented 1 year ago

related #379

Does it work from the command line? https://plantuml.com/command-line

izmaylovdev commented 1 year ago

@krasa yes, it works

image
pmverma commented 1 year ago

I am having the same problem as well with homebrew installed graphvis. Everything is installed and set up as expected, still not working.

krasa commented 1 year ago

Lets continue this in #379