hdl / conda-eda

Conda recipes for FPGA EDA tools for simulation, synthesis, place and route and bitstream generation.
https://anaconda.org/LiteX-Hub
Apache License 2.0
95 stars 26 forks source link

pnr/openroad: add osx build #297

Closed xobs closed 1 year ago

xobs commented 1 year ago

This simple patch gets openroad building on arm64:

sean in 🌐 Garlemald in conda-eda on  openroad-osx-arm64 [$?] via 🅒 eda  took 17s
❯ openroad -version                                                                                                                                            (eda)
5c85b36f8d50975d4e57af6678a0bbfe62046f0e

sean in 🌐 Garlemald in conda-eda on  openroad-osx-arm64 [$?] via 🅒 eda
❯ uname -a                                                                                                                                                     (eda)
Darwin Garlemald.local 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:35 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8103 arm64

sean in 🌐 Garlemald in conda-eda on  openroad-osx-arm64 [$?] via 🅒 eda
❯                                                                                                                                                              (eda) 
xobs commented 1 year ago

cc @proppy

xobs commented 1 year ago

Note that there is a separate entry under run for spdlog. Before that line was added, the package built with spdlog 1.9.2 but installed with 1.11.0, which is incompatible.

xobs commented 1 year ago

The relevant issue on spdlog: https://github.com/The-OpenROAD-Project/OpenROAD/issues/2220

proppy commented 1 year ago

@xobs do you want to add a job for -osx similar to https://github.com/hdl/conda-eda/blob/master/.github/workflows/Build.yml#L371-L379 ?

xobs commented 1 year ago

Sure. I'm guessing these runners don't actually have the ability to execute software, which is why things with tests have --no-test? Should I also skip tests on openroad?

proppy commented 1 year ago

Sure. I'm guessing these runners don't actually have the ability to execute software, which is why things with tests have --no-test? Should I also skip tests on openroad?

I think they do, but they would build the x64 version (not arm64).

xobs commented 1 year ago

Alright, I think that adds a Build step that works.

proppy commented 1 year ago

Some build error on macosx x64:

2023-02-17T14:06:23.9687350Z /Users/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/openroad_1676639035640/work/src/drt/src/dr/FlexDR_graphics.cpp:69:20: error: 'any_cast<fr::GridGraphDescriptor::Data>' is unavailable: introduced in macOS 10.13 - see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
2023-02-17T14:06:23.9789260Z   auto data = std::any_cast<Data>(object);
2023-02-17T14:06:23.9794460Z                    ^
2023-02-17T14:06:23.9896180Z /Users/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/openroad_1676639035640/_build_env/bin/../include/c++/v1/any:611:12: note: 'any_cast<fr::GridGraphDescriptor::Data>' has been explicitly marked unavailable here
proppy commented 1 year ago

https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk seems to imply that this is safe to disable with CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" but I wonder if it also apply to non-conda forge c++ toolchain (I guess yes, since it mentions that url in the error message).

for the record github runner environment include the following MacOSX SDKs: https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#installed-sdks

xobs commented 1 year ago

@proppy I believe I added D_LIBCPP_DISABLE_AVAILABILITY to the build. Would you mind trying the build again?

xobs commented 1 year ago

Looks like openroad-osx built this time