The-OpenROAD-Project / megaboom

BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Rename bazel-<stage>.mk -> <stage>-bazel.mk #21

Closed lpawelcz closed 5 months ago

lpawelcz commented 5 months ago

This PR fixes issue we encountered when attempting to run hello_world example from the tutorial in README. After running

bazel build L1MetadataArray_test_generate_abstract

we got errors about missing rules for make targets, e.g:

make: *** No rule to make target 'bazel-synth_sdc'.

This is most probably caused by bazel itself which does not copy bazel-<stage>.mk files into the execution environment. It is also important to note that dependencies in bazel rules are described correctly as bazel creates symlinks for those files inside sandboxes. However, symlinks are broken because original files are not being copied to the execution environment in the first place.

This is a simple fix that allowed us to run the example from the tutorial. It doesn't fix all the issues when building all defined targets (through bazel build ...) hence the draft PR.

oharboe commented 5 months ago

A good and baffeling find... I'm able to reproduce the problem using the Docker image provide.

However, given Bazels' reptuation for reproducible builds, it is a mystery to me why this works on Ubuntu 23.10 and fails on 22.04.

While it would be interesting to get to the bottom of this, I'm merging and forgetting all about it. Until it bites us again. :scream: