We are upgrading PB from 3.14 to 30.0, on Alma Linux 9, with g++ 11.5.0. We are using it in C++ as well as Java code.
protoc, shared libs, and include files all show the right release -- 30.0.
The new installs are in /usr/local/... where the old version is in /usr/ directly
When I try to compile our message library using gnu make, we are getting errors around use of Templates in C code and conflicting definitions of PB functions. Does this seem familiar to anyone? Below are detailed examples. We would appreciate any help at all!
Michelle
In file included from /usr/include/c++/11/utility:76,
from /usr/local/include/absl/base/optimization.h:37,
from /usr/local/include/absl/base/macros.h:36,
from /usr/local/include/google/protobuf/port_def.inc:35,
from /usr/local/include/google/protobuf/endian.h:20,
from /usr/include/sys/types.h:176,
from /usr/include/stdlib.h:394,
from /usr/include/c++/11/cstdlib:75,
from /usr/include/c++/11/bits/stl_algo.h:59,
from /usr/include/c++/11/string:52,
from AcLandProtobuf.pb.h:10,
from
AcLandProtobuf.pb.cc:6:
/usr/include/c++/11/initializer_list:99:3: error: template with C linkage
99 | template<class _Tp>
| ^~~~~~~~
/usr/local/include/google/protobuf/endian.h:161:17: error: conflicting declaration of C function ‘uint64_t google::protobuf::internal::big_endian::ToHost(uint64_t)’
161 | inline uint64_t ToHost(uint64_t value) {
| ^~~~~~
/usr/local/include/google/protobuf/endian.h:145:17: note: previous declaration ‘uint16_t google::protobuf::internal::big_endian::ToHost(uint16_t)’
145 | inline uint16_t ToHost(uint16_t value) {