OpenROAD
OpenROAD copied to clipboard
Fixing Bison and Flex detection on MacOS
By default CMake cannot use the brew installed flex and bison. This change prefrences user installed bison and flex over the system provided libs.
Signed-off-by: Ethan Mahintorabi [email protected]
@maliberty The self hosted mac seems a bit weird with the self hosted mac at least compared to mine. By default my machine is picking up the XCode Bison. Do you know how the machine is configured?
It isn't that cmake "cannot use the brew installed flex and bison", it "does not" because the typical PATH does not include it. I have worked around this since openroad's inception by setting PATH in .bashrc export PATH="/opt/homebrew/opt/bison/bin:$PATH" export PATH="/opt/hbomebrew/opt/flex/bin:$PATH" Just setting the BISON/FLEX executable vars would be a lot simpler and more consistent with the rest of the build, which uses etc/DependencyInstaller.sh to install dependencies instead of cmake and already supports darwin.
Vitor setup the mac host (he is not around right now). I believe it is some docker based approximation of a mac so the config is not very realistic.
Vitor setup the mac host (he is not around right now). I believe it is some docker based approximation of a mac so the config is not very realistic.
I believe we purchased a real mac and it is not a docker image.
@maliberty The self hosted mac seems a bit weird with the self hosted mac at least compared to mine. By default my machine is picking up the XCode Bison. Do you know how the machine is configured?
@QuantamHD, there are two mutually exclusive jobs in this action.
- The "build" which you are modifying is a GitHub-hosted machine -- we are locked with the image provided by GitHub. This machine is also ephemeral, so changes to bashrc and other configs are not propagated between builds. Thus, the best way I could find is to just export PATH and other variables in the action before building the binary.
- The "build-self-hosted" is a physical machine we own and control. In this machine, I have setup the environment (similar to what Cherry described above) and the only commands needed are the
cmake -B build && cmake --build build
@QuantamHD is there any next step here?
Don't really remember. I can close it.