Skip to content

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

@acul71

Description

@acul71

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions