riscv-software-src / riscv-isa-sim

Spike, a RISC-V ISA Simulator
Other
2.46k stars 861 forks source link

riscv-gdb/gdb/source-cache.c:216: undefined reference to `srchilite::SourceHighlight::SourceHighlight(... #359

Open blastwave opened 5 years ago

blastwave commented 5 years ago

Essentially trying to build on a FreeBSD amd64 system while using the native gcc 9.2.0 pkgs I see :

CXXLD gdb /usr/local/bin/ld: source-cache.o: in function source_cache::get_source_lines(symtab*, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /opt/rv64/tool_build/riscv-gnu-toolchain/riscv-gdb/gdb/source-cache.c:216: undefined reference tosrchilite::SourceHighlight::SourceHighlight(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/local/bin/ld: /opt/rv64/tool_build/riscv-gnu-toolchain/riscv-gdb/gdb/source-cache.c:220: undefined reference to `srchilite::SourceHighlight::highlight(std::istream&, std::ostream&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' collect2: error: ld returned 1 exit status gmake[3]: [Makefile:1889: gdb] Error 1 gmake[3]: Leaving directory '/opt/rv64/tool_build/riscv-gnu-toolchain/build-gdb-newlib/gdb' gmake[2]: [Makefile:9126: all-gdb] Error 2 gmake[2]: Leaving directory '/opt/rv64/tool_build/riscv-gnu-toolchain/build-gdb-newlib' gmake[1]: [Makefile:849: all] Error 2 gmake[1]: Leaving directory '/opt/rv64/tool_build/riscv-gnu-toolchain/build-gdb-newlib' gmake: [Makefile:410: stamps/build-gdb-newlib] Error 2 vesta#

Perhaps I need to specify the C++ compiler in an env var CXX ?

MengshiLi commented 4 years ago

Hit the same issue, did you find a solution to it? Thanks