After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766059 - DOT_PATH not expanded
DOT_PATH not expanded
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.11
Other Windows
: Normal enhancement
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2016-05-06 12:44 UTC by Jannick
Modified: 2016-09-05 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dot path test suite (incl. result logs) (800.00 KB, application/x-compressed-tar)
2016-08-30 14:21 UTC, Jannick
Details
dot path test suite (incl. result logs) (795.50 KB, application/x-compressed-tar)
2016-08-30 15:03 UTC, Jannick
Details

Description Jannick 2016-05-06 12:44:11 UTC
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.
Comment 1 albert 2016-08-30 10:06:13 UTC
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?
Comment 2 Jannick 2016-08-30 14:21:43 UTC
Created attachment 334449 [details]
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
Comment 3 Jannick 2016-08-30 14:43:39 UTC
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
Comment 4 Jannick 2016-08-30 15:01:36 UTC
Comment on attachment 334449 [details]
dot path test suite (incl. result logs)

source files missing in .tar for test
Comment 5 Jannick 2016-08-30 15:03:47 UTC
Created attachment 334450 [details]
dot path test suite (incl. result logs)

please see comment #2 (.tar updated since source file was missing)
Comment 6 albert 2016-08-30 17:18:29 UTC
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?
Comment 7 Jannick 2016-08-30 17:39:35 UTC
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.
Comment 8 albert 2016-08-30 17:46:02 UTC
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'
Comment 9 Jannick 2016-08-30 17:56:55 UTC
There is just one doxyen (1.8.11) installed. 'where doxygen' gives 'C:\Program Files\doxygen\bin\doxygen.exe'
Comment 10 albert 2016-08-30 18:03:28 UTC
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")
Comment 11 Jannick 2016-08-30 18:21:13 UTC
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 command `dot "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 command `dot "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 command `dot "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!
Comment 12 Jannick 2016-08-31 13:00:14 UTC
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.
Comment 13 albert 2016-08-31 13:03:38 UTC
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)
Comment 14 albert 2016-09-01 13:58:00 UTC
I've just pushed a proposed patch to github (pull request 513)
Comment 15 albert 2016-09-03 11:13:02 UTC
Code has been integrated in master branch on github
Comment 16 Dimitri van Heesch 2016-09-05 13:45:16 UTC
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).