ola
ola copied to clipboard
build failure with Fedora 40 (gcc 14.1.1)
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.
This is fixed by https://github.com/OpenLightingProject/ola/pull/1975/commits/d9b9c78645c578adb7c07b692842e841c48310be