ZW007 opened a new issue #14673: URL: https://github.com/apache/pulsar/issues/14673
**Describe the bug** Could not get c++ client built on my Ubuntu 18.04 **To Reproduce** Follwed steps from [official tutorial](https://pulsar.apache.org/docs/en/next/client-libraries-cpp/#compilation) 1. `git clone https://github.com/apache/pulsar` 2. `apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \ libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev` 3. `# libgtest-dev version is 1.18.0 or above` `cd /usr/src/googletest` `sudo cmake .` `sudo make` `sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/` 4. `cd /usr/src/gmock` ` sudo cmake .` ` sudo make` ` sudo cp libgmock.a /usr/lib` 5. `cd pulsar-client-cpp` `cmake .` **make** Could not **make**, it says: ` error: ‘class google::protobuf::FileDescriptorSet’ has no member named ‘ByteSizeLong’; did you mean ‘ByteSize’?` ` lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/build.make:1605: recipe for target 'lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/ProtobufNativeSchema.cc.o' failed ` **Error** ![image](https://user-images.githubusercontent.com/45562036/158116655-64bca360-ef7a-4ac2-b875-1b3ad056bc2c.png) **Try to fix the error** As suggsted, changed `ByteSizeLong` to `ByteSize` in ./pulsar-client-cpp/lib/ProtobufNativeSchema.cc code, then got new error: `PaddingDemo.proto:25:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default. tests/CMakeFiles/main.dir/build.make:68: recipe for target 'generated/tests/PaddingDemo.pb.cc' failed` ![image](https://user-images.githubusercontent.com/45562036/158116519-0e925814-3836-4157-ba91-2113763b27d0.png) **Desktop (please complete the following information):** - OS: [Ubuntu 18.04] **Additional context** I guess it has to do with protobuf version, but could not find any more information. Thank you! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org