[arch-general] [arch-dev-public] GCC 11 and new toolchain on [testing]

Genes Lists lists at sapience.com
Mon May 17 19:45:52 UTC 2021


On 5/15/21 1:40 PM, Genes Lists via arch-general wrote:
> On 5/15/21 6:33 AM, Lone_Wolf via arch-general wrote:

>>  > <memory> (for std::unique_ptr, std::shared_ptr etc.)
..You're correct that we need memory included to get configure to work.

There are 3 files in all which need to be changed - one for configure to 
succeed and 2 to add '#include <limits>'. This is in the upstream issue 
as well.

I can now configure and compile with gcc 11. testing still TBD.

For convenience I'll put the patch below since it's so short, do hope 
that's ok with folks. My testing is against git master but looks like 
this patch should work fine on the version in arch community as well.


Thanks

gcc 11 patch I used

---- patch for gcc 11 --------
diff -ur orig/m4macros/ax_cpp11.m4 new/m4macros/ax_cpp11.m4
--- orig/m4macros/ax_cpp11.m4   2021-05-17 13:54:18.052398478 -0400
+++ new/m4macros/ax_cpp11.m4    2021-05-17 13:56:06.587812447 -0400
@@ -182,6 +182,7 @@
          AC_COMPILE_IFELSE(
                  [AC_LANG_PROGRAM(
                          [#include <thread>
+                         #include <memory>
                           std::shared_ptr<std::thread> th;],
                          [th.reset(new std::thread([[]]() { return; }));
                           th->join();])],
diff -ur orig/src/lib/database/backend_selector.cc 
new/src/lib/database/backend_selector.cc
--- orig/src/lib/database/backend_selector.cc   2021-05-17 
13:42:56.072232019 -0400
+++ new/src/lib/database/backend_selector.cc    2021-05-17 
13:47:02.164704591 -0400
@@ -8,7 +8,7 @@

  #include <database/backend_selector.h>
  #include <exceptions/exceptions.h>
-#include <climits>
+#include <limits>
  #include <sstream>

  using namespace isc::data;
diff -ur orig/src/lib/dhcpsrv/subnet_id.h new/src/lib/dhcpsrv/subnet_id.h
--- orig/src/lib/dhcpsrv/subnet_id.h    2021-05-17 13:46:02.940387565 -0400
+++ new/src/lib/dhcpsrv/subnet_id.h     2021-05-17 15:22:58.146758560 -0400
@@ -10,6 +10,7 @@
  #include <exceptions/exceptions.h>
  #include <stdint.h>
  #include <typeinfo>
+#include <limits>

  namespace isc {
  namespace dhcp {


More information about the arch-general mailing list