Compatible Protobuf 27.x
CMake Warning at /usr/share/cmake-3.22/Modules/FindProtobuf.cmake:524 (message):
Protobuf compiler version 27.1 doesn't match library version 5.27.1
Call Stack (most recent call first):
src/CMakeLists.txt:7 (find_package)
@ovalgee1 Could you try to change
find_package(Protobuf REQUIRED)
to
find_package(Protobuf CONFIG REQUIRED)
in file src/CMakeLists.txt
and give a feedback for me ?
I add the 'CONFIG' in CMakeLists.txt, and then got this error ` -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE CMake Error at src/CMakeLists.txt:169 (protobuf_generate_cpp): Unknown CMake command "protobuf_generate_cpp".
-- Configuring incomplete, errors occurred! make: *** No targets specified and no makefile found. Stop. Build failed. Exiting `
I modify something and got this error
cc1plus: note: unrecognized command-line option ‘-Wno-nested-anon-types’ may have been intended to silence earlier diagnostics cc1plus: note: unrecognized command-line option ‘-Wno-unused-local-typedef’ may have been intended to silence earlier diagnostics
If I compile continue, and will be got the Protobuf compatible error, the Protobuf 3.5.x had deprecated a long time
@ovalgee1 i'm trying to help a bit blindly but could you add set(protobuf_MODULE_COMPATIBLE ON CACHE BOOL "") just before find_package(Protobuf CONFIG REQUIRED) ?
I mean
set(protobuf_MODULE_COMPATIBLE ON CACHE BOOL "")
find_package(Protobuf CONFIG REQUIRED)
@usta Thanks for help, Is okey now after patched you suggestion code.
@usta Thanks for help, Is okey now after patched you suggestion code.
you mean is it comiling without problem or not, after the suggested patch ?
if everthing is ok , i will prepare an PR and point that to this issue report @ovalgee1
Sure. no other issues not found.
@ovalgee1 could you retry without related patch ? if you still need this modification please reopen this issue
Yeah, without this patch I can't complie pass, you will submit an PR for this?