fix fsl build - add require and bison/flex versions to cmakelists
build fix for aaron's issue #189
I have added checks to CMakeLists for Flex 2.6.4 and Bison 3.8.2. This is a likely cause but I can not duplicate the problem on my system. I have specified the versions I have tested with.
I have added guards for the macros in the Flex file (fsl.l), just in case
I have added werror and wall to fsl cmakefile
Checks have failed for MacOS.
CMake Error at /Users/runner/miniconda3/envs/riscv_perf_model/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find BISON: Found unsuitable version "2.3", but required is at least "3.8.2" (found /usr/bin/bison)
Does MacOS have support for bison 3.8.2 or later?
Does MacOS have support for bison 3.8.2 or later?
Yeah, it's supported: https://anaconda.org/conda-forge/bison, but not part of the .github/workflows/conda/macos_env.yml file.
For giggles, can you try adding this line to that file?
- bison=3.*
did not work. It's finding bison 2.3, which was released apparently 18 years ago.
I don't know anything about MacOs but is the image out of date ? Ubuntu image seems to find the package.
Supposedly Bison 3.8.3 was released nov/dec 2021. Not cutting edge.
We've got people that work on their Macs and can compile our model with FSL.
-- Found FLEX: /Users/runner/miniconda3/envs/riscv_perf_model/bin/flex (found suitable version "2.6.4", minimum required is "2.6.4")
CMake Error at /Users/runner/miniconda3/envs/riscv_perf_model/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find BISON: Found unsuitable version "3.8", but required is at
least "3.8.2" (found
Well bummer. For those that have Macs what is the path to bison? Is it in conda?
Well, let me retract my claim. I'm asking, but I might be wrong about the time frame. We only really support 22.04 ubuntu but people have been able to run on their Macs, as I said I might be wrong about when the last time someone did that. I am double checking.
There are a number of hits for problem w/ bison and macos and it putting it into an unexpected PATH.
What other options might there be if this is can not be solved?
Well bummer. For those that have Macs what is the path to bison? Is it in conda?
I don't see Bison in the Sparta conda env but it is installed on my Mac at /usr/bin/bison.
This is a particularly MacOs thing, seemingly broken, maybe something in the OS requires 2.3. I can't imagine.
The default bison location has 2.3. Installing a more modern version with brew places the new binary elsewhere but does not update the path. See the links below.
https://stackoverflow.com/questions/31805431/how-to-install-bison-on-mac-osx https://lists.gnu.org/archive/html/help-bison/2014-05/msg00004.html
"You haven’t set you environmental variable PATH, I gather: on OS X 10.9, the
default has /usr/bin before /usr/local/bin, so you see the system installation
/usr/bin/bison, which is 2.3, even if you make a new installation, which is
/usr/local/bin/bison. You can check this by typing ‘which bison’."