Giter VIP home page Giter VIP logo

Comments (16)

rolftimmermans avatar rolftimmermans commented on May 18, 2024 3

Hi! Thanks for posting this issue. The problem appears that Graphviz was compiled without PDF support. This happens automatically when it is installed when Cairo/Pango were not available. The order of installing Cairo, Pango and Graphviz actually is important...

You can try the following:

  • Uninstall Cairo, Pango and Graphviz (brew uninstall cairo pango graphviz)
  • Install Cairo, Pango and Graphviz, exactly in this order (brew install cairo pango graphviz)

This should give you support for PDF files in Graphviz. Hope this helps!

from rails-erd.

jipiboily avatar jipiboily commented on May 18, 2024 2

This did it for me (with prior uninstall if needed):

brew install cairo pango
brew install graphviz --with-pangocairo

from rails-erd.

microspino avatar microspino commented on May 18, 2024

Many many thanks. It worked.

from rails-erd.

acds avatar acds commented on May 18, 2024

I have 10.7.4 and have followed these instructions but it still does not work ?

brew install graphviz --with-pangocairo

in the Making install in pango section:

CC     gvloadimage_pango.lo
/bin/sh ../../libtool --silent --tag=CC   --mode=compile /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../lib/common -I../../lib/pathplan -I../../lib/gvc -I../../lib/graph -I../../lib/cdt  -I/usr/X11/include/freetype2 -I/usr/X11/include -I/include  -I/usr/local/Cellar/cairo/1.12.2/include -I/usr/local/Cellar/pixman/0.26.2/include -I/usr/local/Cellar/libffi/3.0.11/include -I/usr/local/Cellar/gettext/0.18.1.1/include -isystem /usr/local/include -I/usr/local/Cellar/graphviz/2.28.0/include  -Os -w -pipe   -mmacosx-version-min=10.7 -march=core2 -msse4 -fno-common -Wall -c -o gvloadimage_pango.lo gvloadimage_pango.c
gvtextlayout_pango.c:23:30: error: pango/pangocairo.h: No such file or directory
In file included from gvtextlayout_pango.c:24:

from rails-erd.

bmishkin avatar bmishkin commented on May 18, 2024

It appears that the latest OS X Lion has an old version of Cairo:

This formula is keg-only, so it was not symlinked into /usr/local.

Mac OS X already provides this program and installing another version in
parallel can cause all kinds of trouble.

The Cairo provided by Leopard is too old for newer software to link against.

Generally there are no consequences of this for you.
If you build your own software and it requires this formula, you'll need
to add its lib & include paths to your build variables:

    LDFLAGS  -L/usr/local/Cellar/cairo/1.12.2/lib
    CPPFLAGS -I/usr/local/Cellar/cairo/1.12.2/include

I was able to install graphviz with pangocairo (pdf support) via brew on OS X on 10.7.4:

brew install cairo pango
(...)
LDFLAGS=-L/usr/local/Cellar/cairo/1.12.2/lib CPPFLAGS=-I/usr/local/Cellar/cairo/1.12.2/include brew install graphviz --with-pangocairo

from rails-erd.

acds avatar acds commented on May 18, 2024

I tried you command and still get the same error

from rails-erd.

bmishkin avatar bmishkin commented on May 18, 2024

also make sure you uninstall everything before trying (brew uninstall cairo pango graphviz)

from rails-erd.

poc7667 avatar poc7667 commented on May 18, 2024

@jipiboily your solution works~ thanks

from rails-erd.

tinynumbers avatar tinynumbers commented on May 18, 2024

FYI when I try to run brew install graphviz --with-pangocairo (per @jipiboily's suggestion) with the latest homebrew updates (after making sure cairo, pango, and graphviz have all been uninstalled), it issues a warning:

Warning: graphviz: --with-pangocairo was deprecated; using --with-pango instead!

The compilation/installation completes successfully but the end result is still a Graphviz that can't handle PDFs:

rake aborted!
Saving diagram failed!
Graphviz produced errors. Verify it has support for filetype=pdf, or use filetype=dot.
Original error: Error: in routesplines, cannot find NORMAL edge
.../gems/rails-erd-1.3.0/lib/rails_erd/diagram/graphviz.rb:202:in `rescue in block in <class:Graphviz>'
.../gems/rails-erd-1.3.0/lib/rails_erd/diagram/graphviz.rb:197:in `block in <class:Graphviz>'
.../gems/rails-erd-1.3.0/lib/rails_erd/diagram.rb:142:in `instance_eval'
.../gems/rails-erd-1.3.0/lib/rails_erd/diagram.rb:142:in `save'
.../gems/rails-erd-1.3.0/lib/rails_erd/diagram.rb:120:in `create'
.../gems/rails-erd-1.3.0/lib/rails_erd/diagram.rb:74:in `create'
.../gems/rails-erd-1.3.0/lib/rails_erd/tasks.rake:41:in `block (2 levels) in <top (required)>'
.../bin/ruby_executable_hooks:15:in `eval'
.../bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => erd => erd:generate

from rails-erd.

smenon8 avatar smenon8 commented on May 18, 2024

I have been facing the same issue. I am unable to create png or pdf of the dot files. I tried all the above solutions and none of them worked for me.

from rails-erd.

kerrizor avatar kerrizor commented on May 18, 2024

@smenon8 what errors are you getting? Can you give us more information, please?

from rails-erd.

midwire avatar midwire commented on May 18, 2024

I'm on Yosemite (10.10.5), and this worked for me...

brew uninstall pango cairo graphviz
brew install cairo pango
brew install graphviz --with-pango --with-cairo

from rails-erd.

rsutaria avatar rsutaria commented on May 18, 2024

I'm on MacOS Sierra (10.12.4) and the only way I could get past this error was by building from the sources.
Downloaded the source tarball from here:
http://www.graphviz.org/pub/graphviz/CURRENT/graphviz-working.tar.gz

Then, the usual:
./configure
make
make install

from rails-erd.

parautenbach avatar parautenbach commented on May 18, 2024

I can confirm @rsutaria's method: Building from sources is the only one that works for me on macOS Sierra 10.12.4.

from rails-erd.

maryam-k avatar maryam-k commented on May 18, 2024

@rsutaria's solution is the only one that worked for me on macOS Sierra 10.12.6.

from rails-erd.

michaelbrawn avatar michaelbrawn commented on May 18, 2024

Running High Sierra 10.13.5
The source file has moved
This worked for me.

curl "https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz" | tar xz
cd graphviz-2.40.1
./configure
make
make install

from rails-erd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.