Ráfagan
Ráfagan

Reputation: 2255

How to install luagraph using luarocks

I'm trying to use luagraph, a binding to the graphviz library: http://luagraph.luaforge.net/index.html

To install, I'm using luarocks in Mac OS X. The following command is executed in bash:

luarocks install luagraph

The output is the following:

Installing https://luarocks.org/luagraph-1.0.4-1.src.rock... Using https://luarocks.org/luagraph-1.0.4-1.src.rock... switching to 'build' mode

Error: Could not find expected file graphviz/graph.h, or graphviz/graph.h for GRAPHVIZ -- you may have to install GRAPHVIZ in your system and/or pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR to the luarocks command. Example: luarocks install luagraph GRAPHVIZ_DIR=/usr/local

I have been installed graphviz using homebrew, but I can't figure out how to pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR properly.

How can I install luagraph?

Upvotes: 1

Views: 547

Answers (2)

Dimitry
Dimitry

Reputation: 2358

Well, luaGRAPH is still the top result when searching for lua and graph. So the question is still standing.

And, unfortunately, the answer is: luagraph is OLD, the last update happened before the ubuntu 14.04 was released. And there seem to be some notable changes in the system itself, the flags the error message show do not seem to work. On top of that, graphviz is now about 20 releases newer than the luarock recommends.

There now is a bare bone alternative lua package: graphviz It is extremely basic, and documentation in not at all informative, but at least it works.


update: Luagraph may be working again, but not through rocks. See the other answer.

Upvotes: 1

Herbert Leuwer
Herbert Leuwer

Reputation: 11

I've updated LuaGRAPH a couple of weeks ago. It now supports the newest version of Graphviz based on the cgraph library instead of the old graph library. There is one drawback: I couldn't get luagraph to run on Windows using mingw because of some runtime library issues (compiler and dll compatibility probably). Please look at the README file for more details.

I personally never produced a rockspec for this module. This was created by someone else based on a fork of my luagraph library. Installation without Luarocks is simple. Download from https://github.com/hleuwer/luagraph and follow the instruction in the documentation and the README file. You need adopt a simple config file which is included by make.

Herbert

Upvotes: 1

Related Questions