Compilation error with the cosimulation example when verilator >= 5.004
mbty opened this issue · 0 comments
mbty commented
I get the following error when I attempt to compile examples/cosimulation.v
:
/usr/bin/ld: blackbox.obj_dir.opt/verilated.o: in function `VerilatedContext::threadPoolp()':
verilated.cpp:(.text+0x3212): undefined reference to `VlThreadPool::VlThreadPool(VerilatedContext*, unsigned int)'
collect2: error: ld returned 1 exit status
It is caused by the changes made to Verilator in commit d6126c4b3.
From this version on, the VlThreadPool
constructor mentioned in the error message appears in examples/_objects/cosimulation.v/blackbox.obj_dir.opt/verilated.o
. The VlThreadPool
class is defined in verilated_threads.cpp
, and linking this file manually fixes the issue.
There is no mention of verilated_threads.cpp
in any of the dependency files. Maybe this is a Verilator issue ? I did not find signs of other people having similar issues.