riscv-software-src / riscv-tools

RISC-V Tools (ISA Simulator and Tests)
1.13k stars 446 forks source link

riscv-tools build.sh failed #347

Open athurwo opened 2 years ago

athurwo commented 2 years ago

Hi, failed log like blow:

/usr/bin/ld: src/.libs/libopenocd.a(libocdjtagdrivers_la-bitbang.o):/home/fso/riscv-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:60: multiple definition of `bitbang_swd'; src/.libs/libopenocd.a(libocdjtagdrivers_la-remote_bitbang.o):/home/fso/riscv-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:60: first defined here collect2: error: ld returned 1 exit status gmake[2]: [Makefile:2897: src/openocd] Error 1 gmake[1]: [Makefile:4181: all-recursive] Error 1 gmake: *** [Makefile:1953: all] Error 2

Thanks

jim-wilson commented 2 years ago

riscv-tools is unmaintained and stopped building a while ago. You might want to avoid using it. If you do want to use it, you should update the submodules as they are all 2+ years old. Just cd into each subdir, git checkout master, and then git pull, to get recent copies of them. If you want to double check, you can use git log -1 before and after to see the last commit.

athurwo commented 2 years ago

riscv-tools is unmaintained and stopped building a while ago. You might want to avoid using it. If you do want to use it, you should update the submodules as they are all 2+ years old. Just cd into each subdir, git checkout master, and then git pull, to get recent copies of them. If you want to double check, you can use git log -1 before and after to see the last commit.

thanks, I should download riscv-gnu-toolchain.

yooyoopanda commented 2 years ago

Hi,I have installed riscv-gnu-toolchain, and the path of $RISCV have checked ,and already update the submodule and checked each file name.But the build.sh failed:

Starting RISC-V Toolchain build process

Removing existing riscv-openocd/build directory Configuring project riscv-openocd Building project riscv-openocd gmake[2]: No rule to make target 'all'. Stop. gmake[1]: [Makefile:4832: all-recursive] Error 1 gmake: *** [Makefile:2007: all] Error 2

what should I do to build tools ?

jim-wilson commented 2 years ago

There is a build log in the riscv-openocd dir you can try looking at. But in general, riscv-tools isn't expected to build anymore because it has been unmaintained for too long.

yooyoopanda commented 2 years ago

Thanks a lots for your suggestion ! I would like to try for I want to simulate the RISCV environment and try disassembling the RISCV code to find some ROP-Gadgets for my graduate research. Thank you again.