It seems that if my protobuf file consists of a single service, and I link against the resulting .pb.h then the service descriptor is missing from the generated descriptor pool. For context, this is happening in Envoy (https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/cds_api_impl.cc#L40) using Bazel to generate protobuf files.
The workaround is to (1) add a dummy message to the service proto; (2) instantiate the dummy message from the resulting .pb.h file.
cc @htuch