Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

github - Failure to clone risc-v tools (failure with newlib-cygwin.git)

I have been attempting to clone the risc-v GNU toolchain on Linux but failing.

On:

 git clone --recursive https://github.com/riscv/riscv-gnu-toolchain

I get (fragment):

Checking connectivity... done.
Submodule path 'riscv-glibc': checked out '7395b0964db9cc4dd544926414960e9a16842180'
Cloning into 'riscv-newlib'...
fatal: unable to connect to sourceware.org:
sourceware.org[0: 8.43.85.97]: errno=Connection refused
sourceware.org[1: 2620:52:3:1:0:246e:9693:128c]: errno=Network is unreachable

I thought this might be a transient network problem but it has persisted for days now.

Subsequently trying:

git submodule update --init --recursive

Similarly fails:

Cloning into 'riscv-newlib'...
fatal: unable to connect to sourceware.org:
sourceware.org[0: 8.43.85.97]: errno=Connection refused
sourceware.org[1: 2620:52:3:1:0:246e:9693:128c]: errno=Network is unreachable

fatal: clone of 'git://sourceware.org/git/newlib-cygwin.git' into submodule path 'riscv-newlib' failed

I have tried this:

 git config --global url.https://github.com/.insteadOf git://github.com

But it makes no difference.

Anyone know of a way round this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The repo's CI tools report that the most recent patch is failing. so reversing that fixed this problem for me.

Specifically:

git clone https://github.com/riscv/riscv-gnu-toolchain

(ie don't start recursion at this point)

cd riscv-gnu-toolchain

Edit .gitmodules to reverse this:

@@ -12,7 +12,7 @@
    url = ../riscv-dejagnu.git
[submodule "riscv-newlib"]
    path = riscv-newlib
   -  url = ../riscv-newlib.git
   +  url = git://sourceware.org/git/newlib-cygwin.git
[submodule "riscv-gdb"]
    path = riscv-gdb
    url = ../riscv-binutils-gdb.git

Then:

git submodule update --init --recursive

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...