chisel-testers
chisel-testers copied to clipboard
verilator `ld` error when test in macOS
I use verilator backend for test but meet link error
ar r VZeroWidthIOModule__ALL.a VZeroWidthIOModule__ALLcls.o VZeroWidthIOModule__ALLsup.o
ranlib VZeroWidthIOModule__ALL.a
clang++ ZeroWidthIOModule-harness.o verilated.o verilated_vcd_c.o VZeroWidthIOModule__ALL.a -o VZeroWidthIOModule -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
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [VZeroWidthIOModule] Error 1
I run the chsiel-testers's test and got this error
This error disappear when using Ubuntu with verilator 3.872
I try to replace clang++ with g++ but seems no effect
I see this same error with Verilator 3.922 2018-03-17 rev verilator_3_920-32-gdf3d1a4 on OS X. I used to have an old version pinned that worked, looks like Verilator 3.900 2017-01-15 rev verilator_3_890-15-ge6d7e7e.
(If you're looking to install the old version via homebrew, the SHA I used in homebrew-core is 16ebe5f1843e6cb54856311ff0f676be53007329. Don't forget to do brew install with HOMEBREW_NO_AUTO_UPDATE=1, which I always forget to do.)