Re: [cxx-gtk-utils-general] Build failure on armv5tl
Brought to you by:
cvine
From: Chris V. <ch...@cv...> - 2016-05-12 14:33:22
|
On Thu, 12 May 2016 13:14:22 +0100 Chris Vine <ch...@cv...> wrote: > On Thu, 12 May 2016 12:09:26 +0100 > Barry Jackson <zen...@ze...> wrote: > > Ah - seems I attached the wrong file - this is correct. > > > > Barry > > > > It looks like a compiler bug. The error is first reported in line > 522 of tests/test_task_manager.cpp, and says that std::future<int> > is an incomplete type, when clearly it is complete. It looks as if > the compiler cannot find the 'future' class in the std namespace. It > should be able to do so, because the <future> header is included. > > You could try including a 'using namespace std;' statement after the > 'using namespace Cgu;' in the file test_task_manager.cpp. If that > fixes it then it is definitely a compiler bug. > > The build seems to be using gcc-5.3.1, which should be new enough but > is not actually a gnu release, I think (gnu has only released > gcc-5.3.0 in the 5.3 series). On looking at it further, it seems that std::future was not supported by gcc-4.8 on armv5 because of the lack of an appropriate atomic instruction: the debian error report at https://gcc.gnu.org/ml/gcc/2014-07/msg00001.html is very similar to yours. So it looks as if that may remain the case with gcc-5.3 (bummer). If so it looks like a big miss and you are going to find an increasing number of C++ packages failing to build for this reason, if that is the reason: std::future is hardly ground-breaking. amd64 seems to be OK. You may have better luck with clang and their libc++, I don't know. You could also look and see if it is fixed in gcc-6.1 (probably not). Alternatively, if you want a distributable package, you could just omit the tests by not having your build system call 'make check' or 'make tests'. Happily the code in question in c++-gtk-utils is templated and so not actually instantiated unless it is used (as it is by the test suite). Of course if users actually try calling a function returning a std::future object they would then get a compile-time error similar to yours, but that is a separate issue, and one which they are probably aware of if using armv5. Chris |