protocolbuffers / protocolbuffers/protobuf

pkg-config can not resolve dependencies

Open
#24,610 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cmake help wanted
Dominant language
C++
Stars
72k
Forks
16.3k
Avg merge
1d 17h
Merged PRs (30d)
140

Description

What version of protobuf and what language are you using?
33.0
Language: C++

What operating system (Linux, Windows, ...) and version?
Linux (Ubunut)

What runtime / compiler are you using (e.g., python version or gcc version)
clang 21

What did you do?

  1. build from source using CMake and install to any DIR
  2. set PKG_CONFIG_PATH to the DIR/lib/pkgconfig
  3. execute pkg-config protobuf --cflags or pkgconf protobuf --cflags
  4. Additional step is to execute pkgconf protobuf --digraph

What did you expect to see
The output should be there within seconds
The dependencies graphs should have a sane size

What did you see instead?
pkg-config/pkgconf got stuck for minutes (I've been waiting for around 15)
The graph is insanely large (>2 millions nodes)

I'm honestly not an expert with any of pkg-config or pkgconf, but to me it looks like some kind of cyclic dependencies somewhere in CMake files

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 by reproducing the source build and install with CMake, then run the reported pkg-config and pkgconf commands with PKG_CONFIG_PATH set to the installed lib/pkgconfig directory. Inspect the generated package metadata and dependency graph to identify why resolution expands to millions of nodes. Done means the commands complete promptly and the graph has a sane size.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.