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

build failure with Fedora 40 (gcc 14.1.1) #1966

Open
ktdreyer opened this issue Jul 5, 2024 · 1 comment
Open

build failure with Fedora 40 (gcc 14.1.1) #1966

ktdreyer opened this issue Jul 5, 2024 · 1 comment

Comments

@ktdreyer
Copy link

ktdreyer commented Jul 5, 2024

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.

@kiilerix
Copy link

kiilerix commented Sep 7, 2024

This is fixed by d9b9c78

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

No branches or pull requests

2 participants