Skip to content

Conversation

@MrAMS
Copy link
Contributor

@MrAMS MrAMS commented Nov 19, 2025

fix(verilator): Add verilatedos.h includes to Bazel build for C++ library

The Bazel build for the Verilated C++ library was failing to compile verilator_cc_library rules due to missing dependency declarations for verilatedos.h. Specifically, the following error occurred:

Compiling hdl/chisel/src/demo/counter_cc_library_cc_cpp/VCounter___024root__DepSet_hd4904501__0.cpp failed: undeclared inclusion(s) in rule '//hdl/chisel/src/demo:counter_cc_library_cc':

this rule is missing dependency declarations for the following files included by 'hdl/chisel/src/demo/counter_cc_library_cc_cpp/VCounter___024root__DepSet_hd4904501__0.cpp':

  'bazel-out/k8-fastbuild/bin/external/verilator/_virtual_includes/verilator/verilatedos.h'

@mikesinouye
Copy link
Collaborator

/gcbrun

@MrAMS
Copy link
Contributor Author

MrAMS commented Nov 20, 2025

To reproduce this error, replace my forked http_archive with the original in MrAMS/bazel-chisel-demo/rules/repo.bzl#L98 and run make run

@mikesinouye
Copy link
Collaborator

Thanks!

@mikesinouye mikesinouye merged commit a7e8da3 into hdl:main Nov 20, 2025
4 checks passed
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.

2 participants