Can't create graphviz graph inside Doxygen html - doxygen-wizard

I've installed Graphviz, Doxygen on Windows 7. Now, I do have cygwin64 installed, but I don't care, I just want the doxyfiles to have graphs.
I use the CMD prompt or cygwin, it fails on both. everything is installed under Windows7
No matter what I do I cannot get Doxygen to generate docs with graphs embedded in them.
I did this...
How to use doxygen to create UML class diagrams from C++ source
No luck, It just does not work, so I set DOT_CLEANUP = NO. Still no luck.
I'm running inside c:\labs. I do a C:\Doxygen Doxfile
I get...
finalizing index lists...
Running dot...
Generating dot graphs using 5 parallel threads...
Running dot for graph 1/3
Running dot for graph 2/3
Running dot for graph 3/3
Error: dot: can't open /cygdrive/c/labs/html/classA__coll__graph.dot
error: Problems running dot: exit code=2, command='dot', arguments='"/cygdrive/c/labs/html/classA__coll__graph.dot" -Tpng -o "/cygdrive/c/labs/html/classA__coll__graph.png"'
Error: dot: can't open /cygdrive/c/labs/latex/classA__coll__graph.dot
error: Problems running dot: exit code=2, command='dot', arguments='"/cygdrive/c/labs/latex/classA__coll__graph.dot" -Tpdf -o "/cygdrive/c/labs/latex/classA__coll__graph.pdf"'
Error: dot: can't open /cygdrive/c/labs/html/graph_legend.dot
error: Problems running dot: exit code=2, command='dot', arguments='"/cygdrive/c/labs/html/graph_legend.dot" -Tpng -o "/cygdrive/c/labs/html/graph_legend.png"'
Patching output file 1/2
error: problems opening map file /cygdrive/c/labs/html/classA__coll__graph.map for inclusion in the docs!
If I run under cygwin, I get the same thing. I've tried using the Doxywizard also.
Why can't I generate the diagrams?
Thanks for help,

As #Albert suggested, this is caused by trying to mix Cygwin doxygen with Windows dot (graphviz). I ran into the same problem which led me here. I ran which doxygen and which dot to determine that my doxygen was coming from Cygwin but my dot was coming from a Windows installation of graphviz.
The solution for me was to run the Cygwin setup and add/install graphviz. After doing so, the errors went away.

Related

Getting 'Permission Denied' error trying to generate Doxygen documentation

I am trying to run the doxygen command (I'm using Windows 10 with Cygwin and the packages Doxygen, Graphviz and the g++ compiler installed with it) and, at the end of the execution, I get the following error:
Error: Could not open "/cygdrive/c/Users/alexl/Desktop/src/DOC/html/graph_legend.png" for writing: Permission denied
error: Problems running dot: exit code=1, command='dot', arguments='"/cygdrive/c/Users/alexl/Desktop/src/DOC/html/graph_legend.png" -Tpng -o "/cygdrive/c/Users/alexl/Desktop/src/DOC/html/graph_legend.png"'
I also get sixteen other warnings with the following structure:
Warning: Cannot open file <filename>.png for writing
I've been searching for hours why this may occurr. I've tried running command prompt as an administrator, but the error still persists. Any help would be greatly appreciated.

Where do I add Graphviz's Executable on a Mac

I'm trying to use Graphviz but am getting the error message:
graphviz.backend.ExecutableNotFound: failed to execute ['dot', '-Tpdf', '-O', 'test-output/aoc.gv.pdf'], make sure the Graphviz executables are on your systems' PATH
The code I am running is cut and pasted from the documentation:
from graphviz import Digraph, Graph
dot = Digraph(comment='The Round Table')
dot.node('A', 'King Arthur')
dot.node('B', 'Sir Bedevere the Wise')
dot.node('L', 'Sir Lancelot the Brave')
dot.edges(['AB', 'AL'])
dot.edge('B', 'L', constraint='false')
dot.render('test-output/aoc.gv.pdf')
The file will output to the correct folder and the file is there and it has 170 bytes but it will not open. I have tried other extensions such as just 'gv' and they do not work either. I'm using the latest version of Graphviz which is 0.10.1 and I have tried opening this file on a PC and it does not work on PC either (I have a Mac). This problem is similar to
Graphviz's executables are not found (Python 3.4)
and
Why is pydot unable to find GraphViz's executables in Windows 8?
However, there are major stumbling blocks to my understanding these posts. Number one, I have very little understanding of how Python is executed on a computer, so I really don't even know what an environment variable is. Second, when they refer to computer's PATH I can only assume that they're talking about the directory of the file which is executing the Graphviz module, but I'm not sure about that. So I've added this line of code:
import sys
str1 = "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/graphviz/"
sys.path.append(str1)
But that is not working. Third, if I were to implement this step:
Add this string to the end of your Variable value list (including semicolon): ;C:\Program Files (x86)\Graphviz2.34\bin
Then I would have to translate that into its Mac counterpart and I'm not able to. Any help would be appreciated.
The diagnostic is saying that dot is not in your $PATH, it does not appear in any of the directories mentioned by that env var. You want to get to a point where trying the following command reports some version number:
$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
$
$ which dot
/usr/local/bin/dot
$
$ echo $PATH | tr : ' ' | fmt -w1 | grep local
/usr/local/bin
If you are not yet using Brew, you should. It's the easiest way to get this and many other programs onto your Mac. Visit https://brew.sh/ and follow the instructions. Then type:
$ brew install graphviz
...
$ /usr/local/bin/dot -V
That should work just fine. If dot -V says "not found" then simply append the proper directory to your PATH:
$ export PATH="${PATH}:/usr/local/bin"
If your bash shell can run it, then your python program should be able to, as well.
I tried these commands to help me locate the DOT file path on my mac. It was not: "/usr/local/bin/dot" on my system.
dot -V
dot - graphviz version 2.49.2
which dot
/opt/homebrew/bin/dot
I had installed Graphviz, but I was still running into trouble finding the right path. I am using Protege, and I had to modify the path for OwlViz since it was displaying the entire hierarchy at (0,0). I copied the path that I got by running the which dot command to the OWLViz tab on the preference dialog, and restarted protege and it worked perfectly! Good luck!
Problem solved. It took me a while to figure out that I had to download some non-pythonic software before I could get the pythonic software to work.
brew install graphviz
Was step 1 and I had done that before but I was getting an error message. It told me to change ownership of some files so I did that. Then tried
brew install graphviz
again and that did the trick.

difficulty installing ocamlfind under cygwin4

I have installed ocaml under cygwin64 (a Windows 10 computer). Ocaml, ocamlc seem to run fine, but I need packages. So I've tried opam, and it complained that ocamlfind was missing. I have tried to install ocamlfind it two ways - using opam and from the findlib repository on gitlab.camlcity.org - and in both cases, it failed on not finding dllunix.so . I noticde that the environment variable OCAMLLIB was C:\Ocaml (ie outside the cygwin directory tree), but that in /usr/lib/ocaml/stublibs there was such a file. Having modified OCAMLLIB to point there, I received the following error.
Cannot load required shared library dllunix. Reason: /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate RELOC_REL32, target is too far: 0xfffffffc02c37112 0x2c37112.
I have a similar message on another library as well:
Error: Error on dynamically loaded library: /usr/lib/ocaml/stublibs/dllcamlstr.so: flexdll error: cannot relocate RELOC_REL32, target is too far: 0xfffffffc02b6a92a 0x2b6a92a
First:
this is not a programming question, it is a support requirement and the right place is the cygwin mailing list. You can follow guidelines on:
https://cygwin.com/problems.html
Second:
you can try the following approach, execute
/usr/bin/rebase-trigger fullrebase
than close all the cygwin programs and services, and run setup-x86_64 again.
Further info on document
/usr/share/doc/Cygwin/_autorebase.README
If number two fails, follow one. Really.

Installing Image Magick with Ghostscript

Hello fellow Stackers,
Currently I am working on a website which requires the ability to handle, manipulate, create and save PostScript encoded files. Research on the topic pointed me towards two PHP classes called Imagick and MagickWand – both of which use Image Magick, which in turn depends on Ghostscript. Unfortunately the GD PHP class is not up to the task.
I am performing the installation processes on a server running GNU/Linux via SSH from my Mac with OS X 10.9.1. Any help would be much appreciated. If any other details are needed, please inform me and I will do my absolute best to provide them.
Thus far, I have managed to make Image Magick and Ghostscript function independently – while simultaneously installed on the same system. However I was not able to install Ghostscript accordingly for it to function as an Image Magick delegate. From Terminal I was able to run the convert and gs commands successfully. At the time I was able to use the Imagick PHP class to perform the required tasks – such as detecting Color Space – on rasterised images.
As it stands Image Magick has been uninstalled from the server. I was not able to uninstall Ghostscript correctly. So my first question is: how on earth do I uninstall Ghostscript 9.10? It seems Ghostscript does not include an uninstall in its Makefile, ie: make uninstall returns make: *** No rule to make target 'uninstall'. Stop..
I have done some research and it seems that I should have compiled the Ghostscript shared library first: http://www.linuxfromscratch.org/blfs/view/svn/pst/gs.html
Naturally I attempted to perform the steps in the article on Linux from Scratch. I have removed expat, freetype, lcms2, jpeg and libpng. I have performed ./configure with the suggested commands. I have also performed make and make so, both of which fail and exit, returning:
pngrutil.c:(.text+0x3cb): undefined reference to 'inflateReset2'
collect2: ld returned 1 exit status
make: *** [bin/gs] Error 1.
edit: I have since narrowed this down to be related to Zlib.
I am looking for either an alternative to Imagick and MagickWand (which I was not able to find), insights into what is going wrong during the installation process or what might be done to resolve the current error.
Thank you all in advance.
A manual process to uninstall may be required if there is no uninstall defined for the makefile.
This has been discussed in the question What's the opposite of 'make install', ie. how do you uninstall a library in Linux?.
I ditched the idea of using Ghostscript as an Image Magick Delegate, not only because the installation process was not working out for but, but also due to the fact that my research taught me that Image Magick rasterises all input files.
Instead I used the PHP exec() function to directly execute Ghostscript.

Remove warning about ansicon from "rake cucumber"

When you run any rake task with cucumber installed on a machine that doesn't have ANSICON installed, you get the following message:
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
When running locally I like using ANSICON, but when used within the build server I don't care about that - and I don't want to see that warning there. Is there a way to get rid of it?
You can actually remove the warning itself. I do not like installing a bunch of garbage just for the sake of having a green word. So, to remove the warning:
1. Locate the Cucumber installation in gems directory (it's in the Ruby installation directory). For me it was: lib\ruby\gems\1.9.1\gems\cucumber-1.2.0
2. In the cucumber-1.2.0\lib\cucumber\formatter directory of the Cucumber installation find the file ansicolor.rb
3. Locate the line:
STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
and add # in front of it to comment it out:
# STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
The line number was 14 for my version of Cucumber.
4. Save the file and you're done
Download and unzip the file from http://adoxa.altervista.org/ansicon/
open cmd and navigate to the unzipped folder
Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
Type ansicon.exe -h and you will get help of this command
Execute 'ansicon.exe -i' to install and add ansicon to your Windows
Run your cucumber 0.10.0 test and you should
get the coloured output result on Windows
Can you add an exception to you spec_helper.rb? Or perhaps try adding a tag which you filter on when using rake?

Resources