Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google/protobuf/descriptor.proto: File not found #64

Closed
fananchong opened this issue Jun 12, 2021 · 3 comments
Closed

google/protobuf/descriptor.proto: File not found #64

fananchong opened this issue Jun 12, 2021 · 3 comments
Labels

Comments

@fananchong
Copy link

I make fail. output like this:

[  2%] Running cpp protocol buffer compiler on auth.proto
google/protobuf/descriptor.proto: File not found.
gogoproto/gogo.proto:32:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
gogoproto/gogo.proto:38:8: "google.protobuf.EnumOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.
gogoproto/gogo.proto:46:8: "google.protobuf.EnumValueOptions" is not defined.
gogoproto/gogo.proto:50:8: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FileOptions" is not defined.
gogoproto/gogo.proto:92:8: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.MessageOptions" is not defined.
gogoproto/gogo.proto:129:8: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.FieldOptions" is not defined.
auth.proto:4:1: Import "gogoproto/gogo.proto" was not found or had errors.
make[2]: *** [proto/gen/proto/auth.pb.h] Error 1
make[1]: *** [proto/CMakeFiles/protobuf_generates.dir/all] Error 2
make: *** [all] Error 2

and I build shell cmd like this:

pushd /tmp/
if [ ! -d /tmp/etcd-cpp-apiv3 ]; then
    git clone https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git
fi
cd etcd-cpp-apiv3
mkdir -p build
mkdir -p my_build_out
cd build
cmake -DCMAKE_INSTALL_PREFIX=$PWD/../my_build_out \
    -DCMAKE_BUILD_TYPE=Release \
    -DBOOST_INCLUDEDIR=/tmp/boost_1_76_0/my_build_out/include \
    -DBOOST_LIBRARYDIR=/tmp/boost_1_76_0/my_build_out/lib \
    -DProtobuf_INCLUDE_DIR=/tmp/grpc/third_party/protobuf/my_build_out/include \
    -DProtobuf_LIBRARIES=/tmp/grpc/third_party/protobuf/my_build_out/lib \
    -DGPR_LIBRARY=/tmp/grpc/cmake/build \
    -DGRPC_LIBRARY=/tmp/grpc/cmake/build \
    -DGRPC_INCLUDE_DIR=/tmp/grpc/include \
    -DGRPC_GRPC++_REFLECTION_LIBRARY=/tmp/grpc/cmake/build \
    -DGRPC_GRPC++_LIBRARY=/tmp/grpc/cmake/build \
    -DCPPREST_INCLUDE_DIR=/tmp/cpprestsdk/my_build_out/include \
    -DCPPREST_LIB=/tmp/cpprestsdk/my_build_out/lib \
    ..
make && make install
popd
@fananchong
Copy link
Author

$ find /tmp/grpc/third_party/protobuf/my_build_out/include -name "descriptor.proto"
/tmp/grpc/third_party/protobuf/my_build_out/include/google/protobuf/descriptor.proto

@fananchong
Copy link
Author

mkdir -p /tmp/etcd-cpp-apiv3/proto/google/protobuf/
cp -f /tmp/grpc/third_party/protobuf/my_build_out/include/google/protobuf/descriptor.proto /tmp/etcd-cpp-apiv3/proto/google/protobuf/

@sighingnow
Copy link
Member

mkdir -p /tmp/etcd-cpp-apiv3/proto/google/protobuf/
cp -f /tmp/grpc/third_party/protobuf/my_build_out/include/google/protobuf/descriptor.proto /tmp/etcd-cpp-apiv3/proto/google/protobuf/

@fananchong I think you need make install inside the grpc/protobuf directory, rather than such cp hacks. If you want to install grpc and protobuf to a customized directory, you could specify the CMAKE_INSTALL_PREFIX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants