Skip to content
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

fix fsl build - add require and bison/flex versions to cmakelists #199

Conversation

jeffnye-gh
Copy link
Collaborator

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

guards for macros in flex files
add versions for bison/flex in cmakelists
add werror wall to cmake
@jeffnye-gh
Copy link
Collaborator Author

jeffnye-gh commented Aug 13, 2024

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?

@klingaard
Copy link
Collaborator

klingaard commented Aug 14, 2024

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.*                                                                                

@jeffnye-gh
Copy link
Collaborator Author

jeffnye-gh commented Aug 14, 2024

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

@klingaard
Copy link
Collaborator

Well bummer. For those that have Macs what is the path to bison? Is it in conda?

@jeffnye-gh
Copy link
Collaborator Author

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?

@kathlenemagnus
Copy link
Collaborator

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.

@jeffnye-gh
Copy link
Collaborator Author

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’."

Copy link
Collaborator

@klingaard klingaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yahoo!

@jeffnye-gh jeffnye-gh merged commit a290299 into riscv-software-src:master Aug 20, 2024
5 checks passed
@klingaard klingaard linked an issue Aug 21, 2024 that may be closed by this pull request
@jeffnye-gh jeffnye-gh deleted the jeffnye-gh/fsl_build_fix_2 branch September 6, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FSL Build Issue
3 participants