libp2p / libp2p/test-plans

c-v0.0.1 Docker image build fails due to missing git submodules

Open
#754 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
65
Forks
82
PR merge metrics
No merged PRs in 30d

Description

## Problem

The `c-v0.0.1` implementation Docker build fails with the following error:

```
CMake Error at CMakeLists.txt:99 (message):
LIBP2P_VENDOR_PICOQUIC is ON, but the picoquic submodule is missing. Run
`git submodule update --init --recursive`.
```

## Root Cause

The build process in `transport/scripts/build-images.sh` downloads GitHub repositories as zip archives when `source.type: github`. However, GitHub zip archives do not include git submodules, and the c-libp2p repository requires the `picoquic` submodule for the build to succeed.

The `impls.yaml` already has a `requiresSubmodules: true` flag for c-v0.0.1, but the build script doesn't handle this flag.

## Solution

The build script should detect when `requiresSubmodules: true` is set and use `git clone` instead of downloading a zip archive. The fix should:

1. Check for `requiresSubmodules: true` flag in the implementation configuration
2. Use `git clone` instead of zip download when submodules are required
3. Checkout the specific commit
4. Run `git submodule update --init --recursive` to initialize submodules
5. Cache the cloned repository for future builds

## Steps to Reproduce

```bash
cd transport
./run_tests.sh --cache-dir ~/.cache/test-plans --test-select 'c-v0.0.1' --test-ignore '!c-v0.0.1' --force-image-rebuild --yes
```

## Expected Behavior

The Docker image should build successfully with all required submodules initialized.

## Actual Behavior

The build fails during CMake configuration because the picoquic submodule is missing.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with transport/scripts/build-images.sh and the requiresSubmodules setting for c-v0.0.1 in impls.yaml. Reproduce the failure with the provided transport/run_tests.sh command, then verify the Docker image builds after the repository is fetched at the requested commit with submodules initialized and cached for later builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, docker, git
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.