[llvm-dev] OT: Cloning llvm repo over low speed connection != fun

Konstantin Tokarev via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 19 08:30:32 PDT 2016



19.08.2016, 17:55, "C Bergström via llvm-dev" <llvm-dev at lists.llvm.org>:
> I remember reading all those examples about how a big repo isn't an
> issue and when sitting at some ${LOCATION} I have 1010101010Gbps and
> it takes like 30 seconds.. Well.. that may be true when I'm at home,
> but I'm not.. and this laptop doesn't have llvm sources installed..
>
> So real world feedback of the pita it can be..
> /* Side rant - I wish I didn't even need the llvm sources. I just want
> to build libcxxrt */
>
> /* Yes I'm about to do the smarter thing and fetch a shallow clone or
> try to get the tarball snapshot from github.. I did however want to
> show an example of how big repo on non-corporate infrastructure can be
> a challenge. I'd hate for some ambitious community dev to run into the
> same thing and turn away as a result */
> ------------
> CMake Error at CMakeLists.txt:53 (message):
>   llvm-config not found and LLVM_MAIN_SRC_DIR not defined. Reconfigure with
>   -DLLVM_CONFIG=path/to/llvm-config or -DLLVM_PATH=path/to/llvm-source-root.
>
> -- Configuring incomplete, errors occurred!
> See also "/usr/local/src/libcxxabi/build/CMakeFiles/CMakeOutput.log".
> asura at asura-X3:/usr/local/src/libcxxabi/build$ cd ../..
> asura at asura-X3:/usr/local/src$ git clone git at github.com:llvm-mirror/llvm.git
> Cloning into 'llvm'...
> remote: Counting objects: 1228082, done.
> remote: Compressing objects: 100% (245/245), done.
> Receiving objects: 13% (167280/1228082), 68.86 MiB | 20.00 KiB/s
>
> ^Cfatal: The remote end hung up unexpectedly
>
> asura at asura-X3:/usr/local/src$ rm -rf llv^C
> asura at asura-X3:/usr/local/src$ git clone git at github.com:llvm-mirror/llvm.git
> Cloning into 'llvm'...
> remote: Counting objects: 1228082, done.
> remote: Compressing objects: 100% (245/245), done.
> ^Cfatal: The remote end hung up unexpectedly1 KiB | 20.00 KiB/s
>
> asura at asura-X3:/usr/local/src$ git clone https://github.com/llvm-mirror/llvm.git
> Cloning into 'llvm'...
> remote: Counting objects: 1228082, done.
> remote: Compressing objects: 100% (245/245), done.
> error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
> fatal: The remote end hung up unexpectedly
> fatal: early EOF
> fatal: index-pack failed
> asura at asura-X3:/usr/local/src$ cd lib^C
> asura at asura-X3:/usr/local/src$ git clone https://github.com/llvm-mirror/llvm.git
> Cloning into 'llvm'...
> remote: Counting objects: 1228183, done.
> remote: Compressing objects: 100% (346/346), done.
> ^Cceiving objects: 0% (1069/1228183), 388.01 KiB | 1024 bytes/s
> asura at asura-X3:/usr/local/src$ git clone https://github.com/llvm-mirror/llvm.git
> Cloning into 'llvm'...
> remote: Counting objects: 1228183, done.
> error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
> fatal: The remote end hung up unexpectedly
> fatal: protocol error: bad pack header
> asura at asura-X3:/usr/local/src$ git clone https://github.com/llvm-mirror/llvm.git
> Cloning into 'llvm'...
> remote: Counting objects: 1228271, done.
> remote: Compressing objects: 100% (11/11), done.
> error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
> fatal: The remote end hung up unexpectedly
> fatal: early EOF
> fatal: index-pack failed

Please try following approach:

1. Clone with --depth 1
2. Run git fetch --unshallow

In this case you will split download into 2 parts, which can succeed independently from each other. If you cannot get unshallow step working, you can split it further by running git fetch --depth=<number> with increasing numbers.

-- 
Regards,
Konstantin


More information about the llvm-dev mailing list