protocolbuffers / protocolbuffers/protobuf
BUG: pkg-config metadata is incorrect on windows
@mkruskal-google is already working on this.
Since Feb 28, 2025.
- 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?
Version: v29.1 (but problem remains on main)
Language: C++
What operating system (Linux, Windows, ...) and version?
windows
What runtime / compiler are you using (e.g., python version or gcc version)
VS2019
What did you do?
Build protobuf, try to use pkg-config metadata in dependent project
What did you expect to see
Build succeeds
What did you see instead?
LINK : fatal error LNK1181: cannot open input file 'upb.lib'
This is because the windows builds here have a non-default prefix (e.g. libprotobuf.lib instead of protobuf.lib), and so the linker invocation here
is actually looking for the wrong library (upb.lib instead of the libupb.lib that gets installed). Since %INSTALL_PREFIX%\lib\pkgconfig\upb.pc gets installed by default, it should be correct.
Anything else we should know about your project / environment
The error does not appear with CMake, but there's several more pkg-config files that have the same problem AFAICT.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.