The-OpenROAD-Project / OpenROAD-flow-scripts

OpenROAD's scripts implementing an RTL-to-GDS Flow. Documentation at https://openroad-flow-scripts.readthedocs.io/en/latest/
https://theopenroadproject.org/
Other
320 stars 275 forks source link

Fix building Docker image with local dependencies #2015

Closed eszpotanski closed 4 months ago

eszpotanski commented 4 months ago

When local dependencies are prepared with setup.sh script, dependencies/ folder is created, which is automatically copied into Docker image and sourced by dev_env.sh. This results in missing SWIG error:

$ sudo setup.sh
[...]
$ ./build_openroad --latest
[...]
> [4/4] RUN ./build_openroad.sh --no_init --local --threads 16:
139.8   "4.0")
139.8 Call Stack (most recent call first):
139.8   /OpenROAD-flow-scripts/dependencies/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
139.8   /OpenROAD-flow-scripts/dependencies/share/cmake-3.24/Modules/FindSWIG.cmake:153 (find_package_handle_standard_args)
139.8   src/CMakeLists.txt:169 (find_package)
139.8
139.8
139.8 -- Configuring incomplete, errors occurred!
139.8 See also "/OpenROAD-flow-scripts/tools/OpenROAD/build/CMakeFiles/CMakeOutput.log".
139.8 See also "/OpenROAD-flow-scripts/tools/OpenROAD/build/CMakeFiles/CMakeError.log".
------
Dockerfile.builder:16
--------------------
  14 |     RUN cat tools/yosys/Makefile | grep ABCREV
  15 |     RUN cd tools/yosys/abc; git status; cd -
  16 | >>> RUN ./build_openroad.sh --no_init --local --threads ${numThreads}
  17 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ./build_openroad.sh --no_init --local --threads ${numThreads}" did not complete successfully: exit code: 1

This PR fixes it by ignoring dependencies/ directory during Docker build.

oharboe commented 4 months ago

@eszpotanski Missing 'y' is a driveby fix, no? Should be in separate PR. fix and force push this one to make it single concern?

oharboe commented 4 months ago

@eszpotanski Accidentally mentioned Matt above. Fixed.

eszpotanski commented 4 months ago

Done, missing -y has separate PR https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/2016

oharboe commented 4 months ago

@maliberty LGTM