Skip to content

Compilation error with the cosimulation example when verilator >= 5.004 #23

@mbty

Description

@mbty

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions