Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Fails to build on gcc 5.4.0 and libstdc++ 6 because bind is missing in TaskPool.h #32789

Closed Quuxplusone closed 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR33817
Status RESOLVED FIXED
Importance P normal
Reported by Josh Kergan (joshkergan@gmail.com)
Reported on 2017-07-17 07:44:32 -0700
Last modified on 2017-07-18 02:08:31 -0700
Version 4.0
Hardware PC Linux
CC labath@google.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments lldb-TaskPool.patch (7920 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 18805
Fixed header file

Error is return by ninja on gcc 5.4.0 on ArchLinux when linking against
libstdc++.

I attached the fix that allowed me to build lldb on my computer. I just added
<functional> to TaskPool.h

FAILED: tools/lldb/source/Utility/CMakeFiles/lldbUtility.dir/TaskPool.cpp.o
/usr/bin/c++  -DGTEST_HAS_RTTI=0 -DHAVE_PROCESS_VM_READV -DHAVE_ROUND -
DLIBXML2_DEFINED -DLLDB_USE_BUILTIN_DEMANGLER -D_DEBUG -D_GNU_SOURCE -
D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -
Itools/lldb/source/Utility -
I/home/jkergan/Development/llvm/tools/lldb/source/Utility -
I/home/jkergan/Development/llvm/tools/lldb/include -Itools/lldb/include -
Iinclude -I/home/jkergan/Development/llvm/include -I/usr/include/python2.7 -
I/home/jkergan/Development/llvm/tools/clang/include -
Itools/lldb/../clang/include -I/usr/include/libxml2 -
I/home/jkergan/Development/llvm/tools/lldb/source/. -
I/home/jkergan/Development/llvm/tools/lldb/source/Plugins/Process/Linux -
I/home/jkergan/Development/llvm/tools/lldb/source/Plugins/Process/POSIX -fPIC -
fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -
Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-
uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -
std=c++11 -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-
aliasing -Wno-deprecated-register -Wno-vla-extension -g    -fno-exceptions -fno-
rtti -MD -MT
tools/lldb/source/Utility/CMakeFiles/lldbUtility.dir/TaskPool.cpp.o -MF
tools/lldb/source/Utility/CMakeFiles/lldbUtility.dir/TaskPool.cpp.o.d -o
tools/lldb/source/Utility/CMakeFiles/lldbUtility.dir/TaskPool.cpp.o -c
/home/jkergan/Development/llvm/tools/lldb/source/Utility/TaskPool.cpp
In file included from
/home/jkergan/Development/llvm/tools/lldb/source/Utility/TaskPool.cpp:10:0:
/home/jkergan/Development/llvm/tools/lldb/include/lldb/Utility/TaskPool.h: In
static member function ‘static std::future<typename
std::result_of<_Functor(_ArgTypes ...)>::type> TaskPool::AddTask(F&&, Args&&
...)’:
/home/jkergan/Development/llvm/tools/lldb/include/lldb/Utility/TaskPool.h:122:12:
error: ‘bind’ is not a member of ‘std’
       std::bind(std::forward<F>(f), std::forward<Args>(args)...));
            ^~~~
/home/jkergan/Development/llvm/tools/lldb/include/lldb/Utility/TaskPool.h:122:12:
note: suggested alternative: ‘end’
       std::bind(std::forward<F>(f), std::forward<Args>(args)...));
            ^~~~
            end
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-vla-extension’
cc1plus: warning: unrecognized command line option ‘-Wno-deprecated-register’
Quuxplusone commented 7 years ago

Attached lldb-TaskPool.patch (7920 bytes, text/plain): Fixed header file

Quuxplusone commented 7 years ago

It looks like this has already been fixed with r299676.