multiple definition of `bitbang_swd' when building rocket-chip tools

228 views Asked by At

I am trying to build rocket-chip tools according to instructions here: https://github.com/chipsalliance/rocket-tools/blob/master/README.md

I face the following error:

/usr/bin/ld: src/.libs/libopenocd.a(libocdjtagdrivers_la-bitbang.o):/home/mats/src/rocket-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:61: multiple definition of `bitbang_swd'; src/.libs/libopenocd.a(libocdjtagdrivers_la-remote_bitbang.o):/home/mats/src/rocket-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:61: first defined here

I do not understand how the same include file can get included twice.

Any support overcoming this issue is appreciated.

1

There are 1 answers

1
Ming On

Add an extern before the bitbang_swd variable references to make it compile.

Not sure why the source code doesn't have it already.