Re: [arch-general] [arch-dev-public] GCC 11 and new toolchain on [testing]
On 5/13/21 9:29 PM, Giancarlo Razzolini via arch-dev-public wrote:
Hi,
...
Also, if you guys notice any issues, let me know.
Regards, Giancarlo Razzolini
Hi FYI, I've come across one issue which was triggered after updating to gcc 11. Building kea (from git) worked fine using gcc 10, I am now seeing fail : checking thread support... no configure: WARNING: unsupported C++11 feature configure: retrying by adding --std=c++1x to g++ --std=c++0x checking --std=c++1x support... no configure: error: thread (a C++11 feature) is not supported gene
On 14-05-2021 23:06, Genes Lists via arch-general wrote:
On 5/13/21 9:29 PM, Giancarlo Razzolini via arch-dev-public wrote:
Hi,
...
Also, if you guys notice any issues, let me know.
Regards, Giancarlo Razzolini
Hi
FYI, I've come across one issue which was triggered after updating to gcc 11.
Building kea (from git) worked fine using gcc 10, I am now seeing fail :
checking thread support... no configure: WARNING: unsupported C++11 feature configure: retrying by adding --std=c++1x to g++ --std=c++0x checking --std=c++1x support... no configure: error: thread (a C++11 feature) is not supported
gene
It seems gcc11 in C++11 mode has only partial support for thread safety and the thread class[1] . Does it work if you build with -std=c++11||||or -std=gnu++11 ? LW [1] https://gcc.gnu.org/onlinedocs/gcc-11.1.0/libstdc++/manual/manual/status.htm...
On 15-05-2021 12:25, Lone_Wolf via arch-general wrote:
On 14-05-2021 23:06, Genes Lists via arch-general wrote:
On 5/13/21 9:29 PM, Giancarlo Razzolini via arch-dev-public wrote:
Hi,
...
Also, if you guys notice any issues, let me know.
Regards, Giancarlo Razzolini
Hi
FYI, I've come across one issue which was triggered after updating to gcc 11.
Building kea (from git) worked fine using gcc 10, I am now seeing fail :
checking thread support... no configure: WARNING: unsupported C++11 feature configure: retrying by adding --std=c++1x to g++ --std=c++0x checking --std=c++1x support... no configure: error: thread (a C++11 feature) is not supported
gene
It seems gcc11 in C++11 mode has only partial support for thread safety and the thread class[1] .
Does it work if you build with -std=c++11 or -std=gnu++11 ?
LW
[1] https://gcc.gnu.org/onlinedocs/gcc-11.1.0/libstdc++/manual/manual/status.htm...
found another possible cause in https://gcc.gnu.org/gcc-11/porting_to.html .
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiled with GCC 11:
<limits> (for std::numeric_limits) <memory> (for std::unique_ptr, std::shared_ptr etc.) <utility> (for std::pair, std::tuple_size, std::index_sequence etc.) <thread> (for members of namespace std::this_thread.)
P.S. sorry for the bad formatting in previous message. LW
On 5/15/21 6:33 AM, Lone_Wolf via arch-general wrote:
On 15-05-2021 12:25, Lone_Wolf via arch-general wrote:
...
It seems gcc11 in C++11 mode has only partial support for thread safety and the thread class[1] .
Does it work if you build with -std=c++11 or -std=gnu++11 ?
LW
[1] https://gcc.gnu.org/onlinedocs/gcc-11.1.0/libstdc++/manual/manual/status.htm...
found another possible cause in https://gcc.gnu.org/gcc-11/porting_to.html .
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiled with GCC 11:
<limits> (for std::numeric_limits) <memory> (for std::unique_ptr, std::shared_ptr etc.) <utility> (for std::pair, std::tuple_size, std::index_sequence etc.) <thread> (for members of namespace std::this_thread.)
Thanks LM - perhaps you can offer your thoughts upstream by adding to the issue: https://gitlab.isc.org/isc-projects/kea/-/issues/1871 This problem exists with the released version in community as well as git master, fyi.
On 5/15/21 6:33 AM, Lone_Wolf via arch-general wrote:
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiled with GCC 11:
<limits> (for std::numeric_limits) <memory> (for std::unique_ptr, std::shared_ptr etc.) <utility> (for std::pair, std::tuple_size, std::index_sequence etc.) <thread> (for members of namespace std::this_thread.)
Since the failure occurs in configure itself - does this suggest a bug with autocoonf?
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 {
participants (2)
-
Genes Lists
-
Lone_Wolf