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_PATH not expanded (Origin: bugzilla #766059) #5998

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity enhancement in component general for ---
Reported in version 1.8.11 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2016-05-06 12:44:11 +0000, Jannick wrote:

Win10/doxygen 1.8.11: DOT_PATH is not expanded in the following cases, although dot.exe is in PATH (and can be expanded by, e.g., 'where dot' on the command line):

  • is empty
  • = dot.exe
  • = C:/path/to/folder (without any blanks) where dot.exe resides.

Setting DOT_PATH = path/to/dot.exe works here.

Apologies for opening a new bug for this, but the other covering this issue are set to RESOLVED as far as I can see.

Many thanks,
J.

On 2016-08-30 10:06:13 +0000, albert wrote:

I've tried on Windows 7 with version 1.8.11 and I don't have any problems.

Is it possible that your script used to start doxygen the PATH is not set in one way or another or that on Windows 10 doxygen is started in a "sub shell" where the PATH is not set properly?

Strange that the version with "C:/path/to/folder" does not work, do you get any error messages?

Can you start doxygen with the option -d extcmd?

Can you please attach a self-contained example (source+config file in a tar or zip) that allows us to reproduce the problem?

On 2016-08-30 14:21:43 +0000, Jannick wrote:

Created attachment 334449
dot path test suite (incl. result logs)

Attached a series of test cases quickly hammered together. Run doxy.bat to create the doxygen output (run with '-d extcmd') incl. log files for each of the .Doxyfiles.

Results:

  • test with a simple .bat, i.e. no subshell involved
  • dot.exe can be found in PATH (see .log)
  • Does doxygen find dot.exe?
    [n] DotPathIsVoid
    [n] DotPathToDotExe
    [y] DotPathToDotFolderBackslash
    [y] DotPathToDotFolderBackslashPlusTrailingBackslash
    [y] DotPathToDotFolderSlash
    [y] DotPathToDotFolderSlashPlusTrailingSlash
    [y] DotPathToFullPathDotExe

Thus:
1 - You are absolutely right that the version with "C:/path/to/folder" does work. If I recall correctly, then I tested with a makefile where a different shell calls doxygen as you suspected. I will check this next.
2 - dot.exe is not found in case dot.exe exandable by PATH and DOT_PATH is void or dot.exe

On 2016-08-30 14:43:39 +0000, Jannick wrote:

With the following makefile (using cygwin's GnuMake 4.2.1) run against the test suite of the previous comment # 2 does find dot.exe for every test version.

DOXYFILES=$(wildcard *.Doxyfile)
LOG_EXT:=logg

.PHONY: all doxy tar clean

all: clean doxy tar
doxy: $(DOXYFILES:.Doxyfile=.$(LOG_EXT))
tar:
tar --no-recursion -cf doxyDotPath.tar *.Doxyfile *.$(LOG_EXT) *.diff *.md *.bat

clean:; rm -fr *.$(LOG_EXT) *.tar *.diff

%.$(LOG_EXT): %.Doxyfile
rm -fr $*
-diff -U 1 DotPathIsVoid.Doxyfile $< >> DoxyFile.diff
echo date +'%y.%m.%d %H:%M:%S' > $@
echo doxygen version:>> $@
doxygen -v >> $@
doxygen -d extcmd $< >> $@ 2>&1

On 2016-08-30 15:01:36 +0000, Jannick wrote:

Comment on attachment 334449
dot path test suite (incl. result logs)

source files missing in .tar for test

On 2016-08-30 15:03:47 +0000, Jannick wrote:

Created attachment 334450
dot path test suite (incl. result logs)

please see comment # 2 (.tar updated since source file was missing)

On 2016-08-30 17:18:29 +0000, albert wrote:

Do I understand it correctly that you have build your own 1.8.11 executable using Cygwin? In that case when you start from a Dos / Windows shell I also see problems as one uses an executable that is not build for that OS, which might lead to path problems. When running under Cygwin, as you have done with the Makefile, you run with the OS where the executable was build for.

Is there a special reason to build the 1.8.11 under Cygwin?

On 2016-08-30 17:39:35 +0000, Jannick wrote:

Nono - I always use the binary distribution for Windows (http://www.stack.nl/~dimitri/doxygen/download.html#srcbin) and never tried to build doxygen myself.

I referred to cygwin to make clear that - as far as I can understand this - the makefile which calls doxygen is run in a cygwin environment which itself uses its shell. This might impact how paths are treated.

On 2016-08-30 17:46:02 +0000, albert wrote:

OK I understand.

Do you have Cygwin installed and if so where is it it referenced in your PATH as Cygwin also has a doxygen version (currently also 1.8.11). Please try 'where doxygen.exe'

On 2016-08-30 17:56:55 +0000, Jannick wrote:

There is just one doxyen (1.8.11) installed. 'where doxygen' gives 'C:\Program Files\doxygen\bin\doxygen.exe'

On 2016-08-30 18:03:28 +0000, albert wrote:

Gets stranger.

Just trying something, what happens when you give the command:
"C:\Program Files\doxygen\bin\doxygen.exe" DotPathIsVoid.Doxyfile

(unanswered question remain "Do you have Cygwin installed")

On 2016-08-30 18:21:13 +0000, Jannick wrote:

Sorry - I missed your first question: Yes, cygwin is installed. But, again, doxygen exists only once, i.e. installed in "C:\Program Files\doxygen\bin", but not in "C:\cygwin32\bin" where it presumably should reside if it was installed by cygwin.

... and here the diff of the log after running "C:\Program Files\doxygen\bin\doxygen.exe" -d extcmd DotPathIsVoid.Doxyfile ... the .dot files are not converted by dot.exe.

--- C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid.log Tue Aug 30 16:58:23 2016
+++ C:/myDevel/myprogs/doxygen/sample1/log.txt Tue Aug 30 20:11:34 2016
@@ -1,6 +1 @@
-30.08.2016 16:58:20,17
-doxygen version:
-1.8.11
-find dot.exe in PATH using 'cmd /c where dot.exe':
-C:\myDevel\packages\graphviz\release\bin\dot.exe
Notice: Output directory DotPathIsVoid' does not exist. I have created it for you. @@ -103,2 +98,3 @@ Executing external command dot "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.pdf"+Executing external commanddot "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.png"Running dot for graph 1/7 @@ -108,3 +104,2 @@ Running dot for graph 5/7 -Executing external commanddot "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.png"Executing external commanddot "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.pdf"`
@@ -117,9 +112,9 @@
finished...
-error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c__incl.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c__incl.pdf"'
-error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.pdf"'
-error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.png"'
error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c__incl.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c__incl.png"'
+error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.png"'
error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.png"'
-error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.pdf"'
+error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c__incl.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c__incl.pdf"'
+error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_a840291bc02cba5474a4cb46a9b9566fe_cgraph.pdf"'
error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/graph_legend.dot" -Tpng -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/graph_legend.png"'
+error: Problems running dot: exit code=-1, command='dot', arguments='"C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.dot" -Tpdf -o "C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/latex/main_8c_ac045294a1a6af9ed9a8f4636de8a46a6_icgraph.pdf"'
error: problems opening map file C:/myDevel/myprogs/doxygen/sample1/DotPathIsVoid/html/main_8c__incl.map for inclusion in the docs!

On 2016-08-31 13:00:14 +0000, Jannick wrote:

Digging further into that with Albert's help here the results:

1 - Given a blank DOT_PATH doxygen expects a folder path in PATH to dot.exe with backslashes only (my issue was caused by slashes).
2 - Otherwise doxygen properly digests every version of a valid folder path or file path in DOT_PATH with slashes and/or backslashes.

Potential enhancement: Convert slashes in folder path to backslashes if read from PATH.

Thanks again for your help, Albert!
J.

On 2016-08-31 13:03:38 +0000, albert wrote:

I've just asked a question on stack exchange if there is a solution for this problem "Forward slashes in PATH and ShellExecuteExW" ( http://stackoverflow.com/questions/39250360/forward-slashes-in-path-and-shellexecuteexw)

On 2016-09-01 13:58:00 +0000, albert wrote:

I've just pushed a proposed patch to github (pull request 513)

On 2016-09-03 11:13:02 +0000, albert wrote:

Code has been integrated in master branch on github

On 2016-09-05 13:45:16 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.12. Please verify if this is indeed the case. Reopen the
bug 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 closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment