0

I have been trying to build rocket chip ,i have followed all the steps as mentioned on the github repository https://github.com/chipsalliance/rocket-chip , while building the rocket chip tools , i am getting the following error.Did i export the path of the RISCV environment wrong how do i do that?How can i correct this error.I have also tried granting permissions using chmod like chmod +x ./build.sh i have also tried sudo while trying sudo i get the following error.The below is the error i get when i use sudo and ,next line is the path i have set.

Please set the RISCV environment variable to your preferred install path.

export RISCV=/opt/riscv/toolchain

overall error:

Starting RISC-V Toolchain build process
+ aclocal --warnings=all
+ libtoolize --automake --copy
+ autoconf --warnings=all
+ autoheader --warnings=all
+ automake --warnings=all --gnu --add-missing --copy
configure.ac:24: installing 'build-aux/compile'
configure.ac:42: installing 'build-aux/config.guess'
configure.ac:42: installing 'build-aux/config.sub'
configure.ac:19: installing 'build-aux/install-sh'
configure.ac:19: installing 'build-aux/missing'
Makefile.am: installing './INSTALL'
Makefile.am: installing 'build-aux/depcomp'
Makefile.am:26: installing 'build-aux/mdate-sh'
Makefile.am:26: installing 'build-aux/texinfo.tex'
Setting up submodules
Generating build system...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:44: installing 'build-aux/ar-lib'
configure.ac:37: installing 'build-aux/compile'
configure.ac:30: installing 'build-aux/missing'
libjaylink/Makefile.am: installing 'build-aux/depcomp'
Bootstrap complete. Quick build instructions:
./configure ....

Configuring project riscv-openocd
No installed jimsh or tclsh, building local bootstrap jimsh0
Building project riscv-openocd
Installing project riscv-openocd
/usr/bin/mkdir: cannot create directory ‘/opt/riscv’: Permission denied
/usr/bin/mkdir: cannot create directory ‘/opt/riscv’make[3]: *** [Makefile:4721: install-dist_ulinkDATA] Error 1
make[3]: *** Waiting for unfinished jobs....
: Permission denied
/usr/bin/mkdir: cannot create directory ‘/opt/riscv’: Permission denied
make[3]: *** [Makefile:4678: install-man1] Error 1
make[3]: *** [Makefile:4742: install-nobase_dist_pkgdataDATA] Error 1
/usr/bin/mkdir: cannot create directory ‘/opt/riscv’: Permission denied
/usr/bin/mkdir: cannot create directory ‘/opt/riscv’make[3]: *** [Makefile:2093: install-binPROGRAMS] Error 1
: Permission denied
make[3]: *** [Makefile:5554: install-info-am] Error 1
make[2]: *** [Makefile:5080: install-am] Error 2
make[1]: *** [Makefile:4772: install-recursive] Error 1
make: *** [Makefile:5074: install] Error 2
  • /opt is owned by root by default and the ability to create directories there is controlled. https://superuser.com/questions/1001294/why-opt-folder-is-detained-by-root-by-default – user16145658 Jul 07 '23 at 00:23
  • put sudo out in front of the command. and/or change it to build in your home dir somewhere. – old_timer Jul 07 '23 at 16:38

0 Answers0