Skip to content

Commit e512970

Browse files
committed
issue #10987 Doxygen 1.11.0 for macOS reports 'sh: latex: command not found'
1 parent e9ec8d2 commit e512970

File tree

10 files changed

+61
-34
lines changed

10 files changed

+61
-34
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ endif ()
194194
find_program(DOT NAMES dot)
195195
find_package(Python REQUIRED)
196196
find_package(FLEX REQUIRED)
197-
if (FLEX_VERSION VERSION_LESS 2.6.3)
198-
message(SEND_ERROR "Doxygen requires at least flex version 2.6.3 (installed: ${FLEX_VERSION})")
197+
if (FLEX_VERSION VERSION_LESS 2.5.37)
198+
message(SEND_ERROR "Doxygen requires at least flex version 2.5.37 (installed: ${FLEX_VERSION})")
199199
endif()
200200
find_package(BISON REQUIRED)
201201
if (BISON_VERSION VERSION_LESS 2.7)

doc/changelog.dox

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,7 +2107,7 @@ and
21072107
<li>Simplify vhdldocgen code a bit [<a href="https://github.com/doxygen/doxygen/commit/a159f53f032b04064df0c9ad9d7d02f0622f0529">view</a>]</li>
21082108
<li>Modernize search index [<a href="https://github.com/doxygen/doxygen/commit/33a334ce77e6dd0c81e97edc4bfba1fe50d947fa">view</a>]</li>
21092109
<li>Update used links in test examples [<a href="https://github.com/doxygen/doxygen/commit/3c9eeae58ca98a000c75d75ed21bbe4a625cd2c8">view</a>]</li>
2110-
<li>Updated minimum MacOS requirements to version 10.14 [<a href="https://github.com/doxygen/doxygen/commit/4b997ee2519c1032da6f1a9caf2638d17202fea7">view</a>]</li>
2110+
<li>Updated minimum macOS requirements to version 10.14 [<a href="https://github.com/doxygen/doxygen/commit/4b997ee2519c1032da6f1a9caf2638d17202fea7">view</a>]</li>
21112111
<li>Updated test for enums based on recently fixed issues [<a href="https://github.com/doxygen/doxygen/commit/62b368644dec14d1d916c778461f6d4d32e2182e">view</a>]</li>
21122112
<li>Make layout parser use the new XML parser [<a href="https://github.com/doxygen/doxygen/commit/22f6dcc3cedf1bf4360c452db40949e3c156f41b">view</a>]</li>
21132113
<li>Make tagreader use the new XML parser [<a href="https://github.com/doxygen/doxygen/commit/714f89d30cf04ad972df84a6a398258b751d3553">view</a>]</li>
@@ -3948,8 +3948,8 @@ href="https://github.com/doxygen/doxygen/commit/a697caadf1912d0d74faa208f4cff887
39483948
<li>Fix typo in function name [<a href="https://github.com/doxygen/doxygen/commit/ace0af42e330a96ad691b2d9a08dd3ff4abb2629">view</a> and [<a href="https://github.com/doxygen/doxygen/commit/b890f40d195b9dc5db12aaa398707de138093c66">view</a>]</li>
39493949
<li>Fixed a couple of small memory leaks [<a href="https://github.com/doxygen/doxygen/commit/85ddfc814f33943199928447b4627d05b0920b99">view</a>]</li>
39503950
<li>Fixed a number of memory leaks in the template engine [<a href="https://github.com/doxygen/doxygen/commit/d14bcd1f8f5bd4a2034bae842000630f4e098eb6">view</a>]</li>
3951-
<li>Fixed compiler warning for MacOSX [<a href="https://github.com/doxygen/doxygen/commit/0aa27346b8728f6698dd2b363959e89d02e03ff6">view</a>]</li>
3952-
<li>Fixed link issue for MacOSX 10.11 [<a href="https://github.com/doxygen/doxygen/commit/0918a19225daedfbd5e23388124a5de3860d5420">view</a>]</li>
3951+
<li>Fixed compiler warning for macOS [<a href="https://github.com/doxygen/doxygen/commit/0aa27346b8728f6698dd2b363959e89d02e03ff6">view</a>]</li>
3952+
<li>Fixed link issue for macOS 10.11 [<a href="https://github.com/doxygen/doxygen/commit/0918a19225daedfbd5e23388124a5de3860d5420">view</a>]</li>
39533953
<li>Fixed minor typos in comments [<a href="https://github.com/doxygen/doxygen/commit/29c500434d30cd4d9c20f6b295475ed42dba2930">view</a>]</li>
39543954
<li>Fixed preprocessor macros for flex version check [<a href="https://github.com/doxygen/doxygen/commit/a8c73cdbe37cc53c398002d20e94037552a8fb55">view</a>]</li>
39553955
<li>Fixed problem with latex and PDF bookmarks [<a href="https://github.com/doxygen/doxygen/commit/499ecaedf1ee1222535be27f77050ee633595685">view</a>]</li>
@@ -4291,7 +4291,7 @@ href="https://github.com/doxygen/doxygen/commit/a697caadf1912d0d74faa208f4cff887
42914291
<li>Add source code possibility for RTF output [<a href="https://github.com/doxygen/doxygen/commit/05eb230757f6510d461bd14df3b190da46edd9dc">view</a>]</li>
42924292
<li>Added Coverity Scan Build Status to Readme [<a href="https://github.com/doxygen/doxygen/commit/394acb6a10dbef10cad3a0a3ff50a05d0efdea9e">view</a>]</li>
42934293
<li>Added clearer range checks for string class to help compiler [<a href="https://github.com/doxygen/doxygen/commit/869ff34828e20e3ec318384d7b0dbf91b6b2d24d">view</a>]</li>
4294-
<li>Added compilation support for MacOSX 10.10 (yosemite) [<a href="https://github.com/doxygen/doxygen/commit/151876a8321204bd2ec08ec6c4de38ba9fb2d034">view</a>]</li>
4294+
<li>Added compilation support for macOS 10.10 (yosemite) [<a href="https://github.com/doxygen/doxygen/commit/151876a8321204bd2ec08ec6c4de38ba9fb2d034">view</a>]</li>
42954295
<li>Added faster reference counted string implementation with short string optimization [<a href="https://github.com/doxygen/doxygen/commit/9323ae470ad514586706dc8647501361fe208f36">view</a>]</li>
42964296
<li>Added graphical hierarchy support to template engine [<a href="https://github.com/doxygen/doxygen/commit/fe818bf8e3a154788a4a180068cfdfbbadd66ff6">view</a>]</li>
42974297
<li>Added guard to prevent (theoretical) out of bound access [<a href="https://github.com/doxygen/doxygen/commit/060a5cc121be5fd177b5d5c834f2b810dc58b9ec">view</a>]</li>
@@ -4476,7 +4476,7 @@ href="https://github.com/doxygen/doxygen/commit/a697caadf1912d0d74faa208f4cff887
44764476
<li>Preparations for release 1.8.8 [<a href="https://github.com/doxygen/doxygen/commit/df2a9ea9df96f1e3f85c5c35978bc5bbfac6aa1d">view</a>]</li>
44774477
<li>Removed not implemented HTML commands from documentation [<a href="https://github.com/doxygen/doxygen/commit/8199b2d105313efd30367c7a03b57bf7a7d2180b">view</a>]</li>
44784478
<li>Removed unsupported HTML commands from the docs [<a href="https://github.com/doxygen/doxygen/commit/16ba4bd5744c2e5fbfabe95b27736b8ca8030390">view</a>]</li>
4479-
<li>Set deployment targets for MacOSX 10.5+ versions [<a href="https://github.com/doxygen/doxygen/commit/28f40b3aea1411488832205fae447f4652125cdc">view</a>]</li>
4479+
<li>Set deployment targets for macOS 10.5+ versions [<a href="https://github.com/doxygen/doxygen/commit/28f40b3aea1411488832205fae447f4652125cdc">view</a>]</li>
44804480
<li>Support multiple extra HTML stylesheets. [<a href="https://github.com/doxygen/doxygen/commit/595943c96860425f9086028b00e1e155e8ec434f">view</a>]</li>
44814481
<li>Tcl: add missing file that breaks test 057 [<a href="https://github.com/doxygen/doxygen/commit/73e7c340f555291d4264b2f83caacf59a5a3395f">view</a>]</li>
44824482
<li>Tcl: add test code for Bug <a href="https://github.com/doxygen/doxygen/issues/5463">5463</a> [<a href="https://github.com/doxygen/doxygen/commit/36ce0578065b95cf12b81e5a4edd95dea5707e22">view</a>]</li>
@@ -5355,7 +5355,7 @@ href="https://github.com/doxygen/doxygen/commit/a697caadf1912d0d74faa208f4cff887
53555355
<li> In the declaration section the separator line was in between the
53565356
member and its brief description.</li>
53575357
<li> Fixed a couple of compiler warning with the new XCode 4.4 compiler.</li>
5358-
<li> Added compilation support for Mountain Lion (Mac OS X 10.8).</li>
5358+
<li> Added compilation support for Mountain Lion (macOS 10.8).</li>
53595359
<li> id <a href="https://github.com/doxygen/doxygen/issues/4789">4789</a>: Nested namespaces did not appear in the namespace list if the
53605360
parent namespace was undocumented.</li>
53615361
<li> id <a href="https://github.com/doxygen/doxygen/issues/4809">4809</a>: Fixed some spelling errors in the code comments.</li>
@@ -6062,7 +6062,7 @@ make sure you add the following:
60626062
more then 9 parameters.</li>
60636063
<li> id <a href="https://github.com/doxygen/doxygen/issues/4268">4268</a>: For nested anonymous structs @xx markers could appear in
60646064
the output.</li>
6065-
<li> id <a href="https://github.com/doxygen/doxygen/issues/4270">4270</a>: Added compilation support for MacOSX 10.7 (aka Lion).</li>
6065+
<li> id <a href="https://github.com/doxygen/doxygen/issues/4270">4270</a>: Added compilation support for macOS 10.7 (aka Lion).</li>
60666066
<li> id <a href="https://github.com/doxygen/doxygen/issues/4278">4278</a>: Fixed issue printing HTML pages when the
60676067
GENERATE_TREEVIEW option is set to YES.</li>
60686068
<li> id <a href="https://github.com/doxygen/doxygen/issues/4281">4281</a>: Fixed broken link to an undocumented namespace.</li>
@@ -7012,7 +7012,7 @@ make sure you add the following:
70127012
<a name="1.5.7.1"></a>
70137013
<h3>Changes</h3>
70147014
<ul>
7015-
<li> The dot tool is no longer part of the doxygen package for MacOSX.
7015+
<li> The dot tool is no longer part of the doxygen package for macOS.
70167016
Please install GraphViz separately and set the dot path
70177017
to /usr/local/bin</li>
70187018
</ul>
@@ -7111,7 +7111,7 @@ make sure you add the following:
71117111
template arguments were no longer treated as different classes.</li>
71127112
<li> id 539712: Fixed code parser issue for parameter indices of procedures
71137113
and functions.</li>
7114-
<li> id 540058: Creator code was wrong in the MacOSX application bundle.</li>
7114+
<li> id 540058: Creator code was wrong in the macOS application bundle.</li>
71157115
<li> id 540372: Fixed problem parsing large table by increasing
71167116
YY_READ_BUF_SIZE in the generated parser files.</li>
71177117
<li> id 540247: Fixed potential memory corruption issue parsing VHDL.</li>
@@ -7314,7 +7314,7 @@ make sure you add the following:
73147314
<li> Added support for VHDL (.vhd or .vhdl extension) based on a patch by
73157315
Martin Kreis. Use OPTIMIZE_OUTPUT_VHDL when parsing VHDL code. </li>
73167316
<li> id 374699: Added support for Objective-C 2.0 properties.</li>
7317-
<li> Added compilation support for MacOSX 10.5 (Leopard) in combination with
7317+
<li> Added compilation support for macOS 10.5 (Leopard) in combination with
73187318
Xcode 3</li>
73197319
<li> Added support for docsets, which allow integration of doxygen generated
73207320
API documentation in Xcode 3. new options:
@@ -7872,7 +7872,7 @@ make sure you add the following:
78727872
</ul>
78737873
<h3>New features</h3>
78747874
<ul>
7875-
<li> Added support for universal binaries on MacOSX (only the non-GUI part).</li>
7875+
<li> Added support for universal binaries on macOS (only the non-GUI part).</li>
78767876
<li> Added CALLER_GRAPH config option and \callergraph command to add
78777877
a caller (or called-by) graph to a function or all functions.
78787878
(thanks to Daniel Sherwood for the patch)</li>
@@ -8693,7 +8693,7 @@ make sure you add the following:
86938693
<li> id 162517: A @ref command was not parsed properly if the argument
86948694
between quotes was found on the next line.</li>
86958695
<li> Dot would not run if doxygen was installed in a path which contained
8696-
spaces (Mac OS X).</li>
8696+
spaces (macOS).</li>
86978697
<li> Functions inside inline methods were not always cross-referenced anymore.</li>
86988698
<li> Latex output was broken in some cases where anonymous structs were used.</li>
86998699
<li> Fixed bug in doxywizard: if the wizard was used some settings
@@ -8730,9 +8730,9 @@ make sure you add the following:
87308730
<h3>Bug fixes</h3>(ids refer to the old bugzilla issue, just use it in the search box of the <a href="https://github.com/doxygen/doxygen/issues">issue tracker</a>)<br/>
87318731
<ul>
87328732
<li> Due to an error in the packaging script, an old version of doxywizard
8733-
was bundled with the Mac OS X version of doxygen.</li>
8733+
was bundled with the macOS version of doxygen.</li>
87348734
<li> Dot would not run if doxygen was installed in a path which contained
8735-
spaces (Mac OS X).</li>
8735+
spaces (macOS).</li>
87368736
<li> id 151012: &lt;td&gt; tag in HTML function documentation
87378737
missed 'class="md"'</li>
87388738
<li> id 154689: Wrong link to members of namespaces imported from tag
@@ -10294,7 +10294,7 @@ make sure you add the following:
1029410294
<li> Added a very simple metrics utility
1029510295
(see addon/doxmlparser/examples/metrics) which can compute some
1029610296
figures based on the XML output generated by doxygen.</li>
10297-
<li> Added autodetection for Darwin (MacOSX) to the configure script.</li>
10297+
<li> Added autodetection for Darwin (macOS) to the configure script.</li>
1029810298
<li> Added option EXCLUDE_SYMLINKS.
1029910299
The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
1030010300
directories that are symbolic links (a Unix filesystem feature) are
@@ -10645,7 +10645,7 @@ make sure you add the following:
1064510645
specified dot file as an image in the documentation. The new config
1064610646
option DOTFILE_DIRS should be used to specify directories in which
1064710647
doxygen should look for dot files (thanks to Samit Basu for the patch).</li>
10648-
<li> Added new build target macosx-c++ to build doxygen for Mac OS X
10648+
<li> Added new build target macosx-c++ to build doxygen for macOS
1064910649
(Thanks to Jason Harris for telling me what needed to be changed).</li>
1065010650
<li> Added --enable-langs option to the configure script which can be used
1065110651
to compile-in support for a specified set of languages (thanks to

doc/features.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
structured output HTML tags and/or some of Doxygen's special commands
2424
can be used.
2525
<li>Cross platform: works on Windows and many Unix flavors (including Linux and
26-
MacOSX).
26+
macOS).
2727
<li>Indexes, organizes and generates browsable and cross-referenced
2828
output even from undocumented code.
2929
<li>Generates structured XML output for parsed sources, which can be
@@ -35,7 +35,7 @@
3535
defines.
3636
<li>Javadoc (1.1), qdoc3 (partially), and ECMA-334 (C# spec.) compatible.
3737
<li>Comes with a GUI frontend (Doxywizard) to ease editing the options and
38-
run Doxygen. The GUI is available on Windows, Linux, and MacOSX.
38+
run Doxygen. The GUI is available on Windows, Linux, and macOS.
3939
<li>Automatically generates class and collaboration diagrams in HTML (as clickable
4040
image maps) and \LaTeX (as Encapsulated PostScript images).
4141
<li>Uses the `dot` tool of the Graphviz tool kit to generate

doc/index.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Doxygen can help you in three ways:
5252
for the Doxygen user manual and web-site).
5353
</ol>
5454

55-
Doxygen is developed under Mac OS X and Linux, but is set-up to be highly
55+
Doxygen is developed under macOS and Linux, but is set-up to be highly
5656
portable. As a result, it runs on most other Unix flavors as well.
5757
Furthermore, executables for Windows are available.
5858

doc/searching.dox

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ has its own advantages and disadvantages:
119119
by Microsoft. Although the tool works fine for most people, it can
120120
sometimes crash for no apparent reason (how typical).
121121

122-
<h2>5. Mac OS X Doc Sets</h2>
123-
If you are running Doxygen on Mac OS X 10.5 or higher,
122+
<h2>5. macOS Doc Sets</h2>
123+
If you are running Doxygen on macOS 10.5 or higher,
124124
then you can make a "doc set" out of the HTML files produced by Doxygen.
125125
A doc set consists of a single directory with a special structure
126126
containing the HTML files along with a precompiled search index.
@@ -140,7 +140,7 @@ has its own advantages and disadvantages:
140140
in the editor and jump to the corresponding section in the Doxygen
141141
documentation.
142142

143-
Disadvantage is that it only works in combination with Xcode on MacOSX.
143+
Disadvantage is that it only works in combination with Xcode on macOS.
144144

145145
<h2>6. Qt Compressed Help</h2>
146146
If you develop for or want to install the Qt application framework,

doc/starting.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ detailed usage information.
2424
Optionally, the executable \c doxywizard can be used, which is a
2525
\ref doxywizard_usage "graphical front-end" for editing the configuration file
2626
that is used by Doxygen and for running Doxygen in a graphical environment.
27-
For Mac OS X Doxywizard will be started by clicking on the Doxygen application
27+
For macOS Doxywizard will be started by clicking on the Doxygen application
2828
icon.
2929

3030
The following figure shows the relation between the tools and the flow
@@ -195,7 +195,7 @@ require a browser that supports Dynamic HTML and JavaScript enabled.
195195
\addindex LaTeX
196196
The generated \LaTeX documentation must first be compiled by
197197
a \LaTeX compiler (I use a recent teTeX distribution for Linux
198-
and MacOSX and MikTex for Windows).
198+
and macOS and MikTex for Windows).
199199
To simplify the process of compiling the generated
200200
documentation, \c doxygen writes a \c Makefile into the \c latex directory
201201
(on the Windows platform also a \c make.bat batch file is generated).

src/config.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ Go to the <a href="commands.html">next</a> section or return to the
10421042
one named \c CLASS and the other named \c Class, and to also support references to files without
10431043
having to specify the exact matching casing.
10441044
1045-
On Windows (including Cygwin) and MacOS, users should typically set this option to \c NO,
1045+
On Windows (including Cygwin) and macOS, users should typically set this option to \c NO,
10461046
whereas on Linux or other Unix flavors it should typically be set to \c YES.
10471047
]]>
10481048
</docs>
@@ -1340,6 +1340,20 @@ FILE_VERSION_FILTER = "cleartool desc -fmt \%Vn"
13401340
using \ref cfg_latex_bib_style "LATEX_BIB_STYLE".
13411341
To use this feature you need \c bibtex and \c perl available in the search path.
13421342
See also \ref cmdcite "\\cite" for info how to create references.
1343+
]]>
1344+
</docs>
1345+
</option>
1346+
<option type='list' id='EXTERNAL_TOOL_PATHS' format='dir' defval=''>
1347+
<docs>
1348+
<![CDATA[
1349+
The \c EXTERNAL_TOOL_PATHS tag can be used to extend the search path (PATH environment variable)
1350+
so that external tools such as \c latex and \c gs can be found.
1351+
\note This option is particularly useful for macOS version 14 (Sonoma) and higher,
1352+
when running Doxygen from Doxywizard, because in this case any user-defined changes to the PATH
1353+
are ignored. A typical example on macOS is to set
1354+
\verbatim
1355+
EXTERNAL_TOOL_PATHS = /Library/TeX/texbin /usr/local/bin
1356+
\endverbatim
13431357
]]>
13441358
</docs>
13451359
</option>

src/doxygen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10792,8 +10792,6 @@ void initDoxygen()
1079210792

1079310793
Doxygen::symbolMap = new SymbolMap<Definition>;
1079410794

10795-
Portable::correct_path();
10796-
1079710795
Debug::startTimer();
1079810796
Doxygen::parserManager = new ParserManager( make_parser_factory<NullOutlineParser>(),
1079910797
make_parser_factory<FileCodeParser>());
@@ -11786,6 +11784,8 @@ void parseInput()
1178611784
AUTO_TRACE();
1178711785
std::atexit(exitDoxygen);
1178811786

11787+
Portable::correctPath(Config_getList(EXTERNAL_TOOL_PATHS));
11788+
1178911789
#if USE_LIBCLANG
1179011790
Doxygen::clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
1179111791
#endif

src/portable.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ void Portable::setenv(const QCString &name,const QCString &value)
311311
}
312312

313313
proc_env[name.str()] = value.str(); // create or replace existing value
314+
::setenv(name.data(),value.data(),1);
314315
#endif
315316
}
316317

@@ -329,6 +330,7 @@ void Portable::unsetenv(const QCString &variable)
329330
if (it != proc_env.end())
330331
{
331332
proc_env.erase(it);
333+
::unsetenv(variable.data());
332334
}
333335
#endif
334336
}
@@ -521,14 +523,24 @@ bool Portable::isAbsolutePath(const QCString &fileName)
521523
*
522524
* This routine was inspired by the cause for bug 766059 was that in the Windows path there were forward slashes.
523525
*/
524-
void Portable::correct_path()
526+
void Portable::correctPath(const StringVector &extraPaths)
525527
{
526-
#if defined(_WIN32) && !defined(__CYGWIN__)
527528
QCString p = Portable::getenv("PATH");
528-
if (p.isEmpty()) return; // no path nothing to correct
529+
#if defined(_WIN32) && !defined(__CYGWIN__)
529530
QCString result = substitute(p,"/","\\");
530-
if (result!=p) Portable::setenv("PATH",result.data());
531+
for (const auto &path : extraPaths)
532+
{
533+
result+=";\""+substitute(QCString(path),"/","\\")+"\"";
534+
}
535+
#else
536+
QCString result=p;
537+
for (const auto &path : extraPaths)
538+
{
539+
result+=":"+QCString(path);
540+
}
531541
#endif
542+
if (result!=p) Portable::setenv("PATH",result.data());
543+
//printf("settingPath(%s) #extraPaths=%zu\n",Portable::getenv("PATH").data(),extraPaths.size());
532544
}
533545

534546
void Portable::unlink(const QCString &fileName)

src/portable.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <fstream>
99

10+
#include "containers.h"
1011
#include "qcstring.h"
1112

1213
class Buf;
@@ -34,7 +35,7 @@ namespace Portable
3435
int pclose(FILE *stream);
3536
double getSysElapsedTime();
3637
bool isAbsolutePath(const QCString &fileName);
37-
void correct_path();
38+
void correctPath(const StringVector &list);
3839
void setShortDir();
3940
const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
4041
const char * devNull();

0 commit comments

Comments
 (0)