0

I am new to Rocket chip and trying to install rocket chip and execute simulation but while Creating rocket tool dir in Rocket chip setup as per README.md file, I am getting following error:


ar: illegal option combination for -r
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make: *** [libfesvr.a] Error 1

This error comes while executing ./build.sh command.

I am using Mac OS sierra 10.12.06.

mac-vsanjay:rocket-tools vsanjay$ which ar /usr/bin/ar

I open build.sh and found that this error is coming during execution of

build_project riscv-isa-sim --prefix=$RISCV command.

I also tried to modify Makefile which calls "ar" command:

  ## Heading ##
    `$(AR) rcs -o $$@ $$^`

but this cmd <build_project riscv-isa-sim --prefix=$RISCV> generates and overwrites makefile.

Please suggest how to overcome with AR error.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • The `ar` command is so old that it partially predates the "use a dash before the options" convention (`tar` does too). That means you can use `ar rcs library …`. However, the options reported do not list `-o` with the `ar -r` (`ar r`) option. So, you need to ensure that you don't provide `-o` as well as the `rcs` options. I'm not clear whether the back-ticks in the section marked `## Heading ##` are genuine or an artefact of attempting to use MarkDown to format the information. It is unlikely that they should be part of a command line as shown, though. – Jonathan Leffler Jul 10 '19 at 06:52
  • Thanks Jonathan for your suggestion. But I can't modify Makefile which has ar command. build_project* command automatic generates makefile which has -o and rcs options. Any idea how to modify build_project* command which generate Makefile wo -o and rcs options. – Sanjay Verma Jul 10 '19 at 06:55
  • Nope; I've not worked with the software. You'll have to track down the code in the build project command that generates the incorrect invocation of `ar`. – Jonathan Leffler Jul 10 '19 at 15:05
  • Right Jonathan !. I am approaching the same way. – Sanjay Verma Jul 11 '19 at 05:47
  • Friends, Can you help here who worked on Rocket-Chip? – Sanjay Verma Jul 11 '19 at 05:48

0 Answers0