Error when building riscv-gnu-toolchain

464 views
Skip to first unread message

mahsoom...@gmail.com

unread,
Feb 6, 2019, 3:30:28 AM2/6/19
to RISC-V SW Dev
I cloned the toolchain repository and also ran submodule update --init --recursive. When I ran the make command. I got an error saying configure file was not found in binutils. I checked the folder and found that the binutils folder was empty. I ran submodule update again with the same result.

I then went to the GitHub page and found the submodule was blacked out and that I cannot open the submodule. Any idea what's happening here?

Bruce Hoult

unread,
Feb 6, 2019, 4:49:52 AM2/6/19
to mahsoom...@gmail.com, RISC-V SW Dev
It's always a good idea to tell what your environment is and copy and
paste *exactly* the commands you ran (not their output, except
errors), rather than a vague description, so that people can attempt
to duplicate the problem -- or spot an obvious mistake.

These things do usually work. If it doesn't it's most likely your mistake.

Did you check you have the necessary prerequisites installed? e.g.

autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev
gawk build-essential bison flex texinfo gperf libtool patchutils bc
zlib1g-dev libexpat-dev

I just ran exactly these commands and it worked fine on Ubuntu 16.04.3 LTS.

git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
mkdir install
cd riscv-gnu-toolchain
./configure --prefix=`pwd`/../install
make

Note that the install directory must be writable, as there is no
separate "make install" step.

On Wed, Feb 6, 2019 at 12:30 AM <mahsoom...@gmail.com> wrote:
>
> I cloned the toolchain repository and also ran submodule update --init --recursive. When I ran the make command. I got an error saying configure file was not found in binutils. I checked the folder and found that the binutils folder was empty. I ran submodule update again with the same result.
>
> I then went to the GitHub page and found the submodule was blacked out and that I cannot open the submodule. Any idea what's happening here?
>
> --
> You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
> To post to this group, send email to sw-...@groups.riscv.org.
> Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
> To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/1b3950f9-064a-4745-85b7-8d13e2024971%40groups.riscv.org.

Tommy Murphy

unread,
Feb 6, 2019, 7:10:34 AM2/6/19
to mahsoom...@gmail.com, RISC-V SW Dev
You don't say which tools you're trying to build, bare metal/newlib or Linux, but if it's the former then why not use crosstool-NG or Liviu's GNU MCU Eclipse build scripts as they "just work" even for Canadian cross (build on Linux to run on Windows to target RISC-V)? CT-NG should be able to also build the Linux toolchain but I haven't tried that yet myself.



Nick Kossifidis

unread,
Feb 6, 2019, 10:28:04 AM2/6/19
to Tommy Murphy, mahsoom...@gmail.com, RISC-V SW Dev
Στις 2019-02-06 14:10, Tommy Murphy έγραψε:
> You don't say which tools you're trying to build, bare metal/newlib or
> Linux, but if it's the former then why not use crosstool-NG or Liviu's
> GNU MCU Eclipse build scripts as they "just work" even for Canadian
> cross (build on Linux to run on Windows to target RISC-V)? CT-NG
> should be able to also build the Linux toolchain but I haven't tried
> that yet myself.
>
> https://crosstool-ng.github.io [1]
>
> https://github.com/gnu-mcu-eclipse/riscv-none-gcc-build [2]
>
> --
> You received this message because you are subscribed to the Google
> Groups "RISC-V SW Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sw-dev+un...@groups.riscv.org.
> To post to this group, send email to sw-...@groups.riscv.org.
> Visit this group at
> https://groups.google.com/a/groups.riscv.org/group/sw-dev/ [3].
> To view this discussion on the web visit
> https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/DM5PR2201MB1036C8180BFA2B57858F265CF96F0%40DM5PR2201MB1036.namprd22.prod.outlook.com
> [4].
>
>
> Links:
> ------
> [1] https://crosstool-ng.github.io
> [2] https://github.com/gnu-mcu-eclipse/riscv-none-gcc-build
> [3] https://groups.google.com/a/groups.riscv.org/group/sw-dev/
> [4]
> https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/DM5PR2201MB1036C8180BFA2B57858F265CF96F0%40DM5PR2201MB1036.namprd22.prod.outlook.com?utm_medium=email&utm_source=footer

This may also be useful
https://riscv.ics.forth.gr/doku.php/developers/env_prepare

Jim Wilson

unread,
Feb 6, 2019, 12:06:02 PM2/6/19
to mahsoom...@gmail.com, RISC-V SW Dev
On Wed, Feb 6, 2019 at 12:30 AM <mahsoom...@gmail.com> wrote:
> I then went to the GitHub page and found the submodule was blacked out and that I cannot open the submodule. Any idea what's happening here?

Ignore that. It is a problem with the github web site, and not
relevant to your problem.

Jim
Reply all
Reply to author
Forward
0 new messages