[PATCH] D33281: [Doc] Update how to install graphviz on macOS

Wei-Ren Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 05:46:32 PDT 2017


chenwj added inline comments.


================
Comment at: docs/ProgrammersManual.rst:1291-1295
 with X11, install the `graphviz <http://www.graphviz.org>`_ toolkit, and make
-sure 'dot' and 'gv' are in your path.  If you are running on Mac OS X, download
-and install the Mac OS X `Graphviz program
-<http://www.pixelglow.com/graphviz/>`_ and add
-``/Applications/Graphviz.app/Contents/MacOS/`` (or wherever you install it) to
-your path. The programs need not be present when configuring, building or
-running LLVM and can simply be installed when needed during an active debug
-session.
+sure 'dot' and 'gv' are in your path.  If you are running on macOS, install the
+'graphviz-gui' through `MacPorts <https://www.macports.org>`_. The programs need
+not be present when configuring, building or running LLVM and can simply be
+installed when needed during an active debug session.
----------------
MatzeB wrote:
> dberlin wrote:
> > MatzeB wrote:
> > > MatzeB wrote:
> > > > dberlin wrote:
> > > > > chenwj wrote:
> > > > > > davide wrote:
> > > > > > > Why not just removing the link and let people google `install graphviz macos` and pick what's the best solution for them?
> > > > > > Well, that's usually what people will try first (including me). After trail and error, I found MacPorts would be the easier and feasible one. We can rephrase somehow to say MacPorts is one solution, and there are many others can try if MacPorts fail.
> > > > > i'm with davide on this one.
> > > > > THe problem with what you suggest is that when macports now becomes out of date, or whatever, we have to update this again :)
> > > > > 
> > > > > Personally, i used homebrew to install it (and had no issue)
> > > > > in the past, people used fink (but nobody does anymore).
> > > > > It'd be nice to not have to worry that our random install instructions will be out of date :)
> > > > > 
> > > > > It's one thing when they are critical to llvm development (which we obviously must keep easy and up to date), but this is pretty secondary, so i think it would probably be better to just tell people "install graphviz" rather than trying to say how to do it .
> > > > > 
> > > > In my experience the packages on graphviz.org work better than the homebrew/macports ones. The macports/homebrew ones would always annoyingly go through X11 to displays stuff and were for some reason a lot slower than the packages on graphviz.org...
> > > > 
> > > > But indeed what works best may change from time to time and this may be more apropriate for a mailinglist question than giving a definite answer in the documentation...
> > > I am also convinced we would do better if LLVM gets out of the business of starting graphviewers and just produces a few .dot files and lets the user figure out how to open them. (but that is of course more work than just patching the documentation).
> > The homebrew ones don't use x11, they build/install the macos version :)
> > (dunno about macports)
> > 
> > As for producing dot files/etc, i think it's probably reason to call "open" on the thing and whatever happens, happens.
> > 
> > i think it's probably reason to call "open" on the thing and whatever happens, happens.
> 
> - I remember having some discussion already because `open`/`xdg-open`/`gnome-open` etc. do not agree on whether they block (and wait for the application to quit) or not. Not necessarily a reason not do it though.
> 
> - MachineScheduler/SelectionDAG today create a graph per basic block, I often only want to look at 1 of the N blocks in my function anyway and today it is spamming we with N windows each time. Manually opening them I could just ignore N-1 of the dot files.
@davide @dberlin @MatzeB Do we have some kind of agreement what's the next step? ;-)

I know I can make a little hack, let `llc` keep the dot files, then call command-line tool to open them. The intention of this patch is documenting the simplest instruction for Dummies (like me, a MacOS newbie), who just want to see what those Dags looks like, don't care X11 will be installed, don't want to tweak anything else for a pop-Window showing Dags. For those Unix/MacOS experts, they can find how to get things done without too much help from the document.

MacPorts is just happened to be the one works based on my recent experience. Saying it's the only choice is not my intension. So maybe we can come up statements helping MacOS dummies.  :-)


https://reviews.llvm.org/D33281





More information about the llvm-commits mailing list