Error linking verilator on OSX
See original GitHub issueHi,
I got the following error while running “sbt test” on my OSX system
clang++ TLP_sender-harness.o verilated.o verilated_vcd_c.o VTLP_sender__ALL.a -o VTLP_sender -lm -lstdc++ clang++ Adder-harness.o verilated.o verilated_vcd_c.o VAdder__ALL.a -o VAdder -lm -lstdc++ Undefined symbols for architecture x86_64: "vl_finish(char const*, int, char const*)", referenced from: VL_FINISH_MT(char const*, int, char const*) in verilated.o Undefined symbols for architecture x86_64: "vl_finish(char const*, int, char const*)", referenced from: VL_FINISH_MT(char const*, int, char const*) in verilated.o ld: symbol(s) not found for architecture x86_64 ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [VTLP_sender] Error 1 make: *** [VAdder] Error 1
My workaround consisted in modifying the following line in the verilator.cpp file:
#ifndef VL_USER_FINISH
with this:
#ifdef VL_USER_FINISH
And everything worked well, but it’s just a workaround.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (11 by maintainers)
Top GitHub Comments
I actually ran into this issue recently as well on my new Macbook Pro but haven’t had time to debug.
Possibly related, chisel3 implements
vl_finish
insrc/main/resources/chisel3/top.cpp
and FIRRTL implementsvl_finish
insrc/test/resources/firrtl/testTop.cpp
. chisel-testers does not implement it which suggests it’s either supposed to be using the default implementation in verilator or is using the one in chisel3.3.900 works not 3.922 as recommended in README.md