Closed toystorynova closed 4 months ago
Probably the Protobuf runtime needs to be updated as well in addition to the Java gencode? Note that we removed GeneratedMessageV3 in the v26.0 release, so that might be what parseFrom
expected.
Probably the Protobuf runtime needs to be updated as well in addition to the Java gencode? Note that we removed GeneratedMessageV3 in the v26.0 release, so that might be what
parseFrom
expected.
I believe I have updated the Protobuf runtime on both, though?
CMake points to this on the C++ project side:
Protobuf_DIR:PATH=/usr/local/lib/cmake/protobuf
and running cat protobuf-config-version.cmake
in that directory shows
set(PACKAGE_VERSION "26.1.0")
so that's updated to 26.1.
and on the macOS Java side:
Decompiling the Java jar shows the 4.26.1 dependency in the "shaded" package.
so I'm not sure what else to check
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive
because the last activity was over 90 days ago.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.
This issue was closed and archived because there has been no new activity in the 14 days since the inactive
label was added.
Migrating my project from 3.26.3 to 4.26.1
What version of protobuf and what language are you using?
C++ - Ubuntu 22.04
5.26.1 libprotoc 26.1
~/Desktop$ protoc --version libprotoc 26.1
Sending protobuf message to:
Java - macOS Java 4.26.1 libprotoc 26.1
Desktop % protoc --version libprotoc 26.1
What operating system (Linux, Windows, ...) and version? Linux - C++ macOS - Java
What runtime / compiler are you using (e.g., python version or gcc version) g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 CMake?
brew protobuf 26.1
What did you do? Sending a message from C++ to Java that contains a timestamp? causes the following error in Java console
What did you expect to see It works correctly
What did you see instead? The error above
Anything else we should know about your project / environment I found this following issue (https://github.com/googleapis/google-cloud-java/issues/1239) which led me to believe it was a runtime/compiler mismatch. However, I cannot find anything on either systems that makes me believe that. The two created files that are in the C++ project has
Protobuf C++ Version: 5.26.1
in the heading. On the Java side, the generated class has Protobuf Java Version: 4.26.1 in the heading. Both C++/Java are compiled with libprotoc 26.1.Further verification: Decompiling the Java jar shows the 4.26.1 dependency in the "shaded" package Viewing the CMakeCache.txt on the C++ project shows
//The directory containing a CMake configuration file for Protobuf. Protobuf_DIR:PATH=/usr/local/lib/cmake/protobuf
and running
cat protobuf-config-version.cmake
in that directory shows set(PACKAGE_VERSION "26.1.0")and echo'ing Protobuf_VERSION in cmake
message(STATUS "Using protobuf version: ${Protobuf_VERSION}")
Prints this:Using protobuf version: 26.1.0
Printing the protobuf version inside the program at runtime:
std::cout << "Protocol Buffers version: " << GOOGLE_PROTOBUF_VERSION << std::endl;
prints Protocol Buffers version: 5026001