'Doxgen uses outdated version of bison OSX Big Sir

I am trying to use Doxygen to create documentation for my code. Following the Doxygen documentation, when I run cmake -G "Unix Makefiles" .. the compiler tells me

CMake Error at CMakeLists.txt:112 (message):
  Doxygen requires at least bison version 2.7 (installed: 2.3)

However, when I run bison -V, I see:

bison (GNU Bison) 3.8.2
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bison is included in my path by adding export PATH="/usr/local/opt/bison/bin:$PATH" to my ~/.zshrc. Why might the doxygen cmake command be referencing the old bison 2.3?



Solution 1:[1]

I encountered this today and actually found a relatively simple solution. Funnily enough the message export PATH="/usr/local/opt/bison/bin:$PATH" is tell you exactly what to do. Unfortunately the message doesn't tell you the order in which you need it to be. I added the line to my ~/.zshrc at line 3 or 4 before it started to run anything like ohmyzsh which I have installed. After that problem solved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matthew Earley