[protobuf] protoc binary is missing in package
See original GitHub issuePackage and Environment Details (include every applicable attribute)
- Package Name/Version: protobuf/3.9.1
- Operating System+version: Debian 9 (stretch) amd64
- Compiler+version: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
- Conan version: conan 1.18.5
- Python version: Python 3.5.3
Steps to reproduce (Include if Applicable)
conan install protobuf/3.9.1@ -o protobuf:shared=True -o protobuf:lite=False
$ find ~/.conan/data/protobuf/3.9.1/_/_/package/b956615a2d7a652db3d8c889cd2ba264be9600c7/ -name protoc
$
Looks like recipe setups building of binaries:
Though final package does not have them.
Discovered while attempting to package Google ortools, and it seems it needs protoc
in build step:
https://github.com/google/or-tools/blob/1da80508ba813ab44c1ebdedc1b37f301615df53/cmake/cpp.cmake#L157
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
protoc: command not found (Linux) - Stack Overflow
I downloaded the pre-compiled from github. When I try to compile my .proto file or just check the protobuf version, it says. protoc:...
Read more >Installing protoc | proto-lens - Google - GitHub Pages
In order to build Haskell packages with proto-lens , the Google protobuf compiler (which is a standalone binary named protoc ) needs to...
Read more >Protocol Buffer Compiler Installation - gRPC
How to install the protocol buffer compiler. Contents. Install using a package manager; Install pre-compiled binaries (any OS); Other installation options ...
Read more >Language Guide (proto3) | Protocol Buffers - Google Developers
These field numbers are used to identify your fields in the message binary format, and should not be changed once your message type...
Read more >google-protobuf - Protocol Buffers - npm
proto files into .js files. The compiler is not currently available via npm, but you can download a pre-built binary on GitHub (look...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Talkless !
As you know protobuf is not only a lib, but a union of .proto files parse, cmake macros and library. If you are building your project for the same architecture (host and target), so there is no problem keeping both artifacts at same package. However, if you need to cross-compile protobuf the things are different:
But how could deal with we need different binaries on same package? We can’t, so we have 2 packages for protobuf:
So, if your project needs the protoc, you need to include the package
protoc/3.9.1
asbuild_requires
. It will process your proto files, and will be installed following your host arch.Now about the CMake macros … Here we have a trick, because we can’t distribute Findprotobuf.cmake twice since CMake won’t load on the second time. So the protoc package has the Cmake file Findprotoc.cmake, this one is responsible by that magic macros for cmake.
Thanks @uilianries