Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dot called even when HAVE_DOT is NO #7273

Closed
cjo1958 opened this issue Sep 19, 2019 · 13 comments
Closed

dot called even when HAVE_DOT is NO #7273

cjo1958 opened this issue Sep 19, 2019 · 13 comments
Labels

Comments

@cjo1958
Copy link

cjo1958 commented Sep 19, 2019

I am trying to migrate from doxygen V1.7.6.1 to the latest version. We don't have Graphviz installed so we have HAVE_DOT set to NO. Despite this doxygen still attempts to call dot.
It seems in the HtmlDocVisitor::visit function if DocVerbatim is Dot then calls to dot are made without checking the HAVE_DOT value.
The error below is reported

sh: 1: dot: not found
error: Problems running dot: exit code=127, command='dot', arguments='"/home/dds/cj/OSPL-13187/ospli/ospl_docs/docs/cs_api/html/inline_dotgraph_1.dot" -Tpng -o "/home/dds/cj/OSPL-13187/ospli/ospl_docs/docs/cs_api/html/dot_inline_dotgraph_1.png"'

I have tested this by adding if (Config_GetBool (HAVE_DOT) ) and the error above does not occur

We did not have the problem with V1.7.6.1

@albert-github
Copy link
Collaborator

albert-github commented Sep 19, 2019

I assume you are talking about doxygen version 1.8.16 and the code line case DocVerbatim::Dot: in the routine void HtmlDocVisitor::visit(DocVerbatim *s) in htmldocvisitor.cpp.
The intention of HAVE_DOT is to signal whether certain diagrams (call graphs etc) can be generated.
In this case the user, probably, explicitly requests a dot graph.

I think similar problems might occur when using e.g. \msc or startuml without the appropriate packages installed.

With the \msccommand we see in the documentation:

You need to install the mscgen tool, if you want to use this command.

@doxygen what strategy to follow here?

To be sure about the setup and doxygen commands used:

  • Can you please attach a, small, self contained example (source+configuration file in a tar or zip) that allows us to reproduce the problem? Please don't add external links as they might not be persistent.

@albert-github albert-github added the needinfo reported bug is incomplete, please add additional info label Sep 19, 2019
@cjo1958
Copy link
Author

cjo1958 commented Sep 19, 2019

yes version 1.8.16

attached is a tar file containing a very small example which reproduces the problem. As I said before this worked fine with 1.7.6.1

test.zip

@doxygen
Copy link
Owner

doxygen commented Sep 24, 2019

@doxygen what strategy to follow here?

I would say that if the configuration file specifies that a certain tool is not available (e.g. HAVE_DOT=NO) then doxygen should assume it is not installed and not ever invoke it, even if the code has explicit commands for it. A warning should be given in case a graph cannot be produced (e.g. HAVE_DOT=NO in combination with \dot).

For other tools we may still need to introduce switches (e.g. bibtex comes to mind).

@albert-github albert-github removed the needinfo reported bug is incomplete, please add additional info label Sep 27, 2019
@tobylane
Copy link

Is there a fix or solution for this? It's still happening. https://github.com/tobylane/CorsixTH/runs/3039196330?check_suite_focus=true#step:12:17

@albert-github
Copy link
Collaborator

@tobylane

  • which version of doxygen are you using?
  • I don't think yet, it is not easy as it is not just that the graphs are not generated but also the texts in the documentation have to be adjusted. Furthermore there are also other parts (e.g. PlantUML that use GraphViz / dot internally)
  • what is the doxygen configuration file you use?
  • link to a build shows that an attempt is made to call dot but fails with collaboration / inheritance graphs and include graphs (maybe I missed some)
  • is there a special reason why you run without dot? GraphViz / dot is quite easy to install in GitHub Actions, see e.g. the workflow doxygen uses: https://github.com/doxygen/doxygen/blob/master/.github/workflows/build_cmake.yml

@tobylane
Copy link

1.8.17, the latest in that version of Ubuntu. I was hoping to run without 1.9 and dot for the sake of other users, though perhaps setting HAVE_DOT = YES in Actions may be acceptable if NO did work.

But this only started happening when I took out that section of the doxy config, despite the deleted sections matching the defaults in the description. I re-add the Dot related section in tobylane/CorsixTH@2ac6915 and still have the errors in https://github.com/tobylane/CorsixTH/runs/3039321681?check_suite_focus=true#step:12:17

@albert-github
Copy link
Collaborator

Taking out sections of the Doxyfile means just that the defaults are used.

@tobylane
Copy link

That diff shows that nothing should have changed, as all the settings match the default. Is the answer that 1.8 doesn't fully respect have_dot = no, and I need 1.9?

@albert-github
Copy link
Collaborator

  • always use the full version (so 1.8.17 and 1.9.1 and other information from doxygen -v) as just 1.8 can mean 1.8.1 but also 1.8.20 and they are significantly different.

  • the original problem is for using with the \dot command, your problem looks a a bit a more general problem, so:

    • Can you please attach a, small, self contained example (source+configuration file in a tar or zip) that allows us to reproduce the problem? Please don't add external links as they might not be persistent.

@tobylane
Copy link

I fixed it by adding HAVE_DOT = NO to the right file.

I don't understand the error messages enough to pick out a small portion. Thanks for your prompt help, sorry I can't identify it down.

albert-github added a commit to albert-github/doxygen that referenced this issue Jul 11, 2021
Guarded the `\dot` and `\dotfile` in case `HAVE_DOT` is not set.

(PlantUML was already guarded by means of `PLANTUML_JAR_PATH`)
@albert-github
Copy link
Collaborator

Regarding the commands \dot and \dotfile I've just pushed a proposed patch, pull request #8663

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 17, 2021
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@doxygen
Copy link
Owner

doxygen commented Aug 18, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.2.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 18, 2021
@doxygen doxygen closed this as completed Aug 18, 2021
albert-github added a commit to albert-github/doxygen that referenced this issue Aug 20, 2021
Since  the issue doxygen#7273  and pull request doxygen#8663 the setting `HAVE_DOT` was required when one wants to incorporate a "dot" type of graph, though this interferes with the Inheritance usage, especially when one wants to have a textual" list.
There were a number of settings etc. involved:
- `CLASS_GRAPH`
- `CLASS_DIAGRAMS`
- `HAVE_DOT`

and the layout setting
- `<inheritancegraph visible="$CLASS_GRAPH"/>`

With this patch the following scheme has been implemented:
```
HAVE_DOT, CLASS_GRAPH,   class diagram output
================================================================
NO,       NO             nothing shown (expected)
NO,       YES            built-in diagram
NO,       TEXT           text link
NO,       GRAPH          built-in diagram (same as YES)
YES,      NO             nothing shown (expected, HAVE_DOT can be used for other diagrams and \dot)
YES,      YES            dot generated diagram
YES,      TEXT           text link
YES,      GRAPH          dot generated diagram (same as YES)
```
The setting `CLASS_DIAGRAMS` is not necessary and has been declared obsolete.
albert-github added a commit to albert-github/cgal that referenced this issue Aug 24, 2021
In the BGL package we get a warning like:
```
/home/cgal-testsuite/cgal_doc_build/CGAL-5.4-Ic-33/doc/BGL/PackageDescription.txt:29: warning: ignoring \dot command because HAVE_DOT is not set
```
The BGL package uses the `\dot` and has now to use the setting `HAVE_DOT=YES` to see the dot image.
Till now this went OK as the `\dot` command didn't look at the setting of the `HAVE_DOT` setting in the Doxyfile, though by the issue doxygen/doxygen#7273 and the pull request doxygen/doxygen#8663 it is now required that `HAVE_DOT` is set.
The idea of setting `HAVE_DOT` for the BGL project removed the warning (and shows the figure again) though has also as side effect that the inheritance graphs are shown. Until now CGAL shows for the inheritance just the text version.

Doxygen now has for the `CLASS_GRAPH` setting the possibility `TEXT` that does exactly what is required.

Due to the general setting of `HAVE_DOT` also the not needed `graph_legend` was generated and some `INCLUDE_GRAPH`s, by setting this to `NO ` these are no suppressed as well.
vlc-mirrorer pushed a commit to videolan/dav1d that referenced this issue May 7, 2022
* Doxygen had a longstanding bug [0] where it would use `dot` even if
  not configured to do so. Due to this behaviour our config magically
  worked.
  This bug is fixed in 1.9.2 therefore we need to explicitly enable
  `dot` support in order to keep existing functionality.

* Enables WARN_AS_ERROR to catch mistakes.

* Adds a version string to the header to easily identify which commit
  the docs are built from.

[0] doxygen/doxygen#7273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants