Skip to content

Shallow clones can't find submodule commits #1681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
palmer-dabbelt opened this issue Feb 25, 2025 · 1 comment
Closed

Shallow clones can't find submodule commits #1681

palmer-dabbelt opened this issue Feb 25, 2025 · 1 comment

Comments

@palmer-dabbelt
Copy link
Contributor

I'm trying to build this, and I'm getting a bunch of failures along the lines of

$ make -j1
cd /scratch/work/20250224-large_fpic/riscv-gnu-toolchain/build/.. && \
flock `git rev-parse --git-dir`/config git submodule init /scratch/work/20250224-large_fpic/riscv-gnu-toolchain/build/../gcc/ && \
flock `git rev-parse --git-dir`/config git submodule update --progress --depth 1 /scratch/work/20250224-large_fpic/riscv-gnu-toolchain/build/../gcc/
Cloning into '/scratch/work/20250224-large_fpic/riscv-gnu-toolchain/gcc'...
remote: Enumerating objects: 146250, done.        
remote: Counting objects: 100% (146250/146250), done.        
remote: Compressing objects: 100% (112597/112597), done.        
Receiving objects: 100% (146250/146250), 175.64 MiB | 12.53 MiB/s, done.
remote: Total 146250 (delta 37683), reused 90982 (delta 31625), pack-reused 0        
Resolving deltas: 100% (37683/37683), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
error: Server does not allow request for unadvertised object 04696df09633baf97cdbbdd6e9929b9d472161d3
fatal: Fetched in submodule path 'gcc', but it did not contain 04696df09633baf97cdbbdd6e9929b9d472161d3. Direct fetching of that commit failed.
fatal: 
make: *** [Makefile:348: /scratch/work/20250224-large_fpic/riscv-gnu-toolchain/build/../gcc/.git] Error 128

(I get similar results from just a git submodule update --init --recursive, and in binutils). As far as I can tell it's because the target servers don't support fetching by hash, and the shallow clones don't end up pulling in the submodule commits via a dependency.

@TommyMurphyTM1234
Copy link
Collaborator

Duplicate issue - see here:

Please use the workaround described here for now:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants