qualcomm / qualcomm/qbox

fatal: invalid reference: master

Open
#2 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
103
Forks
47
Avg merge
2d 21m
Merged PRs (30d)
6

Description

Encountered an error when running cmake -B build:

Scanning dependencies of target gs-cmake-populate
[ 11%] Creating directories for 'gs-cmake-populate'
[ 22%] Performing download step (git clone) for 'gs-cmake-populate'
Cloning into 'gs-cmake-src'...
warning: You appear to have cloned an empty repository.
fatal: invalid reference: master
CMake Error at gs-cmake-subbuild/gs-cmake-populate-prefix/tmp/gs-cmake-populate-gitclone.cmake:40 (message):
Failed to checkout tag: 'master'

make[2]: *** [CMakeFiles/gs-cmake-populate.dir/build.make:92: gs-cmake-populate-prefix/src/gs-cmake-populate-stamp/gs-cmake-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/gs-cmake-populate.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:915 (message):
Build step for gs-cmake failed: 2
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
/usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)

-- Configuring incomplete, errors occurred!

Cause of the error is upon cloning the "cmake-boilerplate" repository by running the follow code, an empty directory was obtained.

  execute_process(
    COMMAND "/usr/bin/git"  clone --no-checkout "https://gitclone.com/github.com/quic/cmake-boilerplate.git" "gs-cmake-src"
    WORKING_DIRECTORY "/home/fjwei/git_repo/qbox/build/_deps"
    RESULT_VARIABLE error_code
    )

Could you please advise on how to resolve this problem?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at CMakeLists.txt:27 and inspect the FetchContent configuration for the cmake-boilerplate repository and its requested master reference. Re-run cmake -B build while checking whether the clone produces an empty gs-cmake-src directory; done means dependency fetching completes and configuration proceeds without the invalid-reference error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, git
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.