Bug 157382 - Build failure with clang on Linux
Summary: Build failure with clang on Linux
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-05 12:59 PDT by Armin K.
Modified: 2016-05-09 08:28 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Armin K. 2016-05-05 12:59:51 PDT
When building webkitgtk-2.12.2 with clang 3.9.0 (trunk 268575) and using libc++ as the default C++ library, webkitgtk build fails with the following error:

In file included from <built-in>:1:
In file included from /sources/webkitgtk-2.12.2/Source/WebKit2/WebKit2Prefix.h:69:
In file included from /usr/bin/../include/c++/v1/algorithm:631:
/usr/bin/../include/c++/v1/type_traits:1331:59: error: incomplete type 'WebCore::IDBRequestData' used in type trait expression
    : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
                                                          ^
/usr/bin/../include/c++/v1/type_traits:543:37: note: in instantiation of template class 'std::__1::is_base_of<std::__1::allocator_arg_t, WebCore::IDBRequestData>' requested
      here
struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {};
                                    ^
/usr/bin/../include/c++/v1/tuple:664:9: note: in instantiation of template class 'std::__1::__lazy_and<std::__1::is_base_of<std::__1::allocator_arg_t, WebCore::IDBRequestData>,
      std::__1::__lazy_all<std::__1::__dependent_type<std::__1::is_default_constructible<const WebCore::IDBRequestData &>, true>,
      std::__1::__dependent_type<std::__1::is_default_constructible<const WebCore::IDBObjectStoreInfo &>, true> > >' requested here
        __lazy_and<
        ^
/usr/bin/../include/c++/v1/tuple:670:5: note: in instantiation of default argument for 'tuple<WebCore::IDBRequestData, WebCore::IDBObjectStoreInfo, true>' required here
    tuple(_AllocArgT, _Alloc const& __a)
    ^~~~~
/sources/webkitgtk-build/DerivedSources/WebKit2/WebIDBConnectionToClientMessages.h:180:11: note: while substituting deduced template arguments into function template 'tuple'
      [with _AllocArgT = WebCore::IDBRequestData, _Alloc = WebCore::IDBObjectStoreInfo, _Dummy = (no value), $3 = (no value)]
        : m_arguments(requestData, info)
          ^
/sources/webkitgtk-2.12.2/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:40:7: note: forward declaration of 'WebCore::IDBRequestData'
class IDBRequestData;
      ^
1 error generated.
Comment 1 Armin K. 2016-05-05 13:00:38 PDT
As a side note, it built just fine with clang 3.8.0 / libc++ 3.8.0.
Comment 2 Carlos Alberto Lopez Perez 2016-05-05 13:23:18 PDT
libc++ (the one from LLVM) or libstdc++ (the one from GNU/GCC) ??

Which operating system or distro are you using?
Comment 3 Armin K. 2016-05-05 13:25:30 PDT
It's libc++ from LLVM, as noted.

It's not a regular distro. It's a custom Linux distro compiled by me using Linux From Scratch as a base. LLVM was also built by myself from svn.
Comment 4 Armin K. 2016-05-09 07:51:17 PDT
Since the code works with clang/libc++ 3.8.0 and gcc 6.1.0, I've filled a bug for libc++ since this seems like an API break.

https://llvm.org/bugs/show_bug.cgi?id=27684