Link Error Ubuntu 16.04 LTS
Closed this issue · 1 comments
djmmoss commented
Hi there,
Thanks for the project, this looks to be exactly what I am looking for. I am having some issues building your example, this is a fresh system with Ubuntu 16.04 LTS.
Steps:
cd test/alu
bazel run //:alu_bin
Error
INFO: Analyzed target //:alu_bin (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: ~/rules_verilator/test/alu/BUILD:9:1: Linking of rule '//:alu_bin' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-fastbuild/bin/alu_bin-2.params
Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::Valu(char const*): error: undefined reference to 'VerilatedModule::VerilatedModule(char const*)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::Valu(char const*): error: undefined reference to 'VerilatedModule::~VerilatedModule()'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::~Valu(): error: undefined reference to 'VerilatedModule::~VerilatedModule()'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::eval(): error: undefined reference to 'Verilated::debug(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::eval(): error: undefined reference to 'Verilated::debug(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::eval(): error: undefined reference to 'VL_FATAL_MT(char const*, int, char const*, char const*)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::_eval_initial_loop(Valu__Syms*): error: undefined reference to 'Verilated::debug(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::_eval_initial_loop(Valu__Syms*): error: undefined reference to 'Verilated::debug(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::_eval_initial_loop(Valu__Syms*): error: undefined reference to 'VL_FATAL_MT(char const*, int, char const*, char const*)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::_ctor_var_reset(): error: undefined reference to 'VL_RAND_RESET_I(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::_ctor_var_reset(): error: undefined reference to 'VL_RAND_RESET_I(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu::_ctor_var_reset(): error: undefined reference to 'VL_RAND_RESET_I(int)'
bazel-out/k8-fastbuild/bin/libalu.a(Valu.o):Valu.cpp:function Valu__Syms::~Valu__Syms(): error: undefined reference to 'VerilatedSyms::~VerilatedSyms()'
bazel-out/k8-fastbuild/bin/libalu.a(Valu__Syms.o):Valu__Syms.cpp:function Valu__Syms::Valu__Syms(Valu*, char const*): error: undefined reference to 'VerilatedSyms::VerilatedSyms()'
bazel-out/k8-fastbuild/bin/libalu.a(Valu__Syms.o):Valu__Syms.cpp:function Valu__Syms::Valu__Syms(Valu*, char const*): error: undefined reference to 'VerilatedSyms::~VerilatedSyms()'
collect2: error: ld returned 1 exit status
Target //:alu_bin failed to build
Use --verbose_failures to see the command lines of failed build steps.
kkiningh commented
Hi, unfortunately I only build on OSX so I can't reproduce. Any chance you figured out what the issue was?