Newer protobuf requires at least C++14, abseil may need C++17

Abierto
#1,879 15 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
build-system

Línea de trabajo

Start with the configure check shown in the issue and review the attempted 0.10-c14-compat branch, alongside the protobuf version-check fix from #1875. Reproduce the header check with newer protobuf and Abseil versions, then verify that the configure tests compile successfully and that the resulting build remains compatible with supported dependencies.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug Language-C++ Maintainability OpSys-All Protobuf
          Additionally. unfortunately, protobuf also requires at least C++14 but the configure only set `-std=gnu++11`, making the compilation of the test programs, which check for the protobuf headers, fail.

(This is after applying the fix for the protobuf version check in #1875.)

configure:25968: checking for google/protobuf/compiler/command_line_interface.h
configure:25968: g++ -c -g -O2 -std=gnu++11   conftest.cpp >&5
In file included from /usr/include/absl/base/config.h:86,
                 from /usr/include/absl/base/attributes.h:37,
                 from /usr/include/absl/base/internal/raw_logging.h:24,
                 from /usr/include/absl/container/internal/btree.h:61,
                 from /usr/include/absl/container/btree_map.h:56,
                 from /usr/include/google/protobuf/compiler/command_line_interface.h:48,
                 from conftest.cpp:178:
/usr/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."
      |  ^~~~~

Originally posted by @SpotlightKid in https://github.com/OpenLightingProject/ola/issues/1867#issuecomment-1630487399

          This says that protobuf supported C++11 until just before version 22.0:

https://protobuf.dev/news/2022-08-03/
Likewise this release of Abseil should work with C++11:
https://github.com/abseil/abseil-cpp/tree/20220623.1

Originally posted by @peternewman in https://github.com/OpenLightingProject/ola/issues/1867#issuecomment-1631621302

          Alas, that doesn't help when compiling ola for packages of Linux distributions, which ship newer protobuf versions.

Originally posted by @SpotlightKid in https://github.com/OpenLightingProject/ola/issues/1867#issuecomment-1631625825

          You can also try this branch where I've made some very rudimentary attempts:

https://github.com/peternewman/ola/tree/0.10-c14-compat

More generally if someone can either do us a GitHub Action which compiles against Arch or can run a Buildbot or something we should catch these issues a lot sooner and be able to react to them better. Otherwise it's likely to be a case of pull requests welcome unfortunately...

Originally posted by @peternewman in https://github.com/OpenLightingProject/ola/issues/1867#issuecomment-1631629938

Lenguaje dominante
C++
Estrellas
773
Forks
233
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenLightingProject/ola

Todos los issues de OpenLightingProject/ola

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.