Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ version update #2604

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Deepan-Shiva
Copy link

In Yocto 5.0 protobuf version as been updated and requires to link the absl which requires minimum C++14.

/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported." | 79 | #error "C++ versions less than C++14 are not supported." | | ^~~~~ | compilation terminated due to -Wfatal-errors.

and absl uses strings/string_view which is supported from c++17

include/absl/strings/string_view.h:53:26: error: 'string_view' in namespace 'std' does not name a type | 53 | using string_view = std::string_view; | | ^~~~~~~~~~~ | compilation terminated due to -Wfatal-errors.

@@ -52,7 +52,7 @@ if(NOT CMAKE_C_STANDARD)
endif()

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thoughts:

  • Could this be limited to yocto? I think we're targeting to make OTBR work on C++11.
  • Could we specify an older version of protobuf version so it doesn't have to depend on std::string_view? cc @morningboata

Copy link
Contributor

@morningboata morningboata Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the protobuf is install by the system's libprotobuf-dev and protobuf-compiler library. It's hard to config the custom proto generator & library, and change the CMAKER's default proto generator & library MACROs. I don't know what is the proper way yet. It's better that the OS can install an older version of libprotobuf-dev and protobuf-compiler library, and CMAKER detects that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants