build failure with Fedora 40 (gcc 14.1.1)

Aperta
#1,966 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
build-system

Direzione di ricerca

Start with include/ola/base/Macro.h and the DISALLOW_COPY_AND_ASSIGN uses in include/ola/thread/FuturePrivate.h. Reproduce the configure and build command on Fedora 40 with GCC 14.1.1, then update the affected declarations so the build no longer emits template-id-cdtor errors. Done means the project builds successfully with warnings treated as errors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug Language-C++ Maintainability

I'm packaging this for Fedora 40 and I hit the following build error:

In file included from ./include/ola/Clock.h:32:
./include/ola/base/Macro.h:45:11: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
   45 |   TypeName(const TypeName&);               \
      |           ^
./include/ola/thread/FuturePrivate.h:92:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN'
   92 |   DISALLOW_COPY_AND_ASSIGN(FutureImpl<T>);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
./include/ola/base/Macro.h:45:11: note: remove the '< >'
   45 |   TypeName(const TypeName&);               \
      |           ^
./include/ola/thread/FuturePrivate.h:92:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN'
   92 |   DISALLOW_COPY_AND_ASSIGN(FutureImpl<T>);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
./include/ola/base/Macro.h:45:11: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
   45 |   TypeName(const TypeName&);               \
      |           ^
./include/ola/thread/FuturePrivate.h:155:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN'
  155 |   DISALLOW_COPY_AND_ASSIGN(FutureImpl<void>);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
./include/ola/base/Macro.h:45:11: note: remove the '< >'
   45 |   TypeName(const TypeName&);               \
      |           ^
./include/ola/thread/FuturePrivate.h:155:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN'
  155 |   DISALLOW_COPY_AND_ASSIGN(FutureImpl<void>);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:11568: common/thread/libolacommon_la-ExecutorThread.lo] Error 1

Compiler was gcc-c++-14.1.1-7.fc40, configure line was:

+ ./configure --build=x86_64-redhat-linux --host=x86_64-redhat-linux --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --enable-python-libs --enable-tcmalloc

See https://clang.llvm.org/extra/clang-tidy/checks/modernize/replace-disallow-copy-and-assign-macro.html for a modern replacement for this macro.

Lingua principale
C++
Stelle
771
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenLightingProject/ola

Tutte le issue di OpenLightingProject/ola

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.