GameNetworkingSockets icon indicating copy to clipboard operation
GameNetworkingSockets copied to clipboard

Compatible Protobuf 27.x

Open ovalgee1 opened this issue 6 months ago • 9 comments

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 avatar Jun 09 '25 10:06 ovalgee1

@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 ?

usta avatar Jun 09 '25 12:06 usta

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 avatar Jun 10 '25 10:06 ovalgee1

@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 avatar Jun 10 '25 13:06 usta

@usta Thanks for help, Is okey now after patched you suggestion code.

ovalgee1 avatar Jun 20 '25 10:06 ovalgee1

@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 ?

usta avatar Jun 20 '25 12:06 usta

if everthing is ok , i will prepare an PR and point that to this issue report @ovalgee1

usta avatar Jun 20 '25 13:06 usta

Sure. no other issues not found.

ovalgee1 avatar Jun 24 '25 08:06 ovalgee1

@ovalgee1 could you retry without related patch ? if you still need this modification please reopen this issue

usta avatar Jun 30 '25 13:06 usta

Yeah, without this patch I can't complie pass, you will submit an PR for this?

ovalgee1 avatar Jul 01 '25 07:07 ovalgee1