Can't build clang yesterday & today

Hi all,

I have a little script that I use to build clang trunk every once in a while. It's worked for months. I last used it to build r223115. I'm on OS X 10.8.5 using Xcode 5.0.2's clang and cmake 3.1 to build. I tried to build yesterday morning, but it failed. I thought I maybe just hit a bad svn revision but it still won't build this morning. The error is below. Any hints what's going wrong? Thanks. Sean

Scanning dependencies of target clangBasic
In file included from /Users/builder/llvm/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp:15:
In file included from /Users/builder/llvm/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h:20:
In file included from /usr/bin/../lib/c++/v1/functional:465:
In file included from /usr/bin/../lib/c++/v1/memory:599:
/usr/bin/../lib/c++/v1/tuple:234:73: error: no matching constructor for initialization of 'std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > > (const std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::placeholders::__ph<1> &>'
             _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : value()
                                                                        ^
/usr/bin/../lib/c++/v1/tuple:447:23: note: in instantiation of member function 'std::__1::__tuple_leaf<0,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &>, false>::__tuple_leaf'
      requested here
    _LIBCPP_CONSTEXPR __tuple_impl()
                      ^
/usr/bin/../lib/c++/v1/tuple:550:23: note: in instantiation of member function 'std::__1::__tuple_impl<std::__1::__tuple_indices<0>,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> >::__tuple_impl' requested here
    _LIBCPP_CONSTEXPR tuple()
                      ^
/usr/bin/../lib/c++/v1/functional:1744:11: note: in instantiation of member function
      'std::__1::tuple<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> >::tuple' requested here
          __bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
          ^
/usr/bin/../lib/c++/v1/memory:2243:15: note: in instantiation of function template specialization
      'std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &>
      >::__bind<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> >, , void>' requested here
              __first_(_VSTD::forward<_Args1>(get<_I1>(__first_args))...)
              ^
/usr/bin/../lib/c++/v1/memory:2421:15: note: in instantiation of function template specialization
      'std::__1::__libcpp_compressed_pair_imp<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> >
      > (const std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> >,
      std::__1::allocator<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> > >,
      2>::__libcpp_compressed_pair_imp<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >
      (const std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> > &&, , 0, >' requested here
            : base(__pc, _VSTD::move(__first_args), _VSTD::move(__second_args),
              ^
/usr/bin/../lib/c++/v1/functional:992:11: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> >,
      std::__1::allocator<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> > >
      >::__compressed_pair<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> > &&, >' requested here
        : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
          ^
/usr/bin/../lib/c++/v1/functional:1277:26: note: in instantiation of member function
      'std::__1::__function::__func<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> >,
      std::__1::allocator<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> > >,
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const std::__1::vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > > &)>::__func' requested here
            ::new (__f_) _FF(_VSTD::move(__f));
                         ^
/Users/builder/llvm/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp:81:10: note: in instantiation of function template specialization
      'std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const std::__1::vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > > &)>::function<std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > > (const std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &,
      std::__1::__bind<std::__1::function<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > (const
      std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &)> &, std::__1::placeholders::__ph<1> &> > >' requested here
  return std::bind(Second, std::bind(First, std::placeholders::_1));
         ^
/usr/bin/../lib/c++/v1/functional:1742:16: note: candidate constructor template not viable: requires at least argument '__f', but no arguments were provided
      explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
               ^
/usr/bin/../lib/c++/v1/functional:1694:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class __bind
      ^

So I still can't build today. :frowning:

I manually bisected, and found:
I can build r223247
I cannot build r223248

The log was:

You can find the email for the patch author in the cfe-commits archive, usually.

I suspect that there is some bad interaction with this particular version of libc++.

It’s my commit and it looks like a problem with the compiler or the standard library. Is updating XCode an option for you?

Breaking builds with existing libc++s isn’t great. Is there a way to tweak your change so that this doesn’t happen? If not, how important is your change?

I'm using Xcode 5.0.2 on that machine because it's the last to support Cocoa garbage collection, which I need. But as a test I updated to Xcode 5.1.1, which is the newest for OS X 10.8, and the problem persists. So unless you fix this, bootstrapping clang 3.6 on 10.8 will I guess be impossible (well, hard). I've seen discussion on-list about the oldest version of Visual Studio support clang needs. What's the oldest version of Xcode it needs?

Cheers,

>It's my commit and it looks like a problem with the compiler or the
>standard library. Is updating XCode an option for you?

I'm using Xcode 5.0.2 on that machine because it's the last to support
Cocoa garbage collection, which I need. But as a test I updated to Xcode
5.1.1, which is the newest for OS X 10.8, and the problem persists. So
unless you fix this, bootstrapping clang 3.6 on 10.8 will I guess be
impossible (well, hard).

I see. Could you try to build clang with the provided patch?

ArgumentAdjusters.patch (606 Bytes)

>It's my commit and it looks like a problem with the compiler or the
>standard library. Is updating XCode an option for you?

I'm using Xcode 5.0.2 on that machine because it's the last to support
Cocoa garbage collection, which I need. But as a test I updated to Xcode
5.1.1, which is the newest for OS X 10.8, and the problem persists. So
unless you fix this, bootstrapping clang 3.6 on 10.8 will I guess be
impossible (well, hard).

I see. Could you try to build clang with the provided patch?

I believe this change should fix the error as it removes the usage of
std::bind. Committed as r226282.

Please confirm that this fixes the problem for you.

Confirmed fixed. Thanks muchly. Can you merge to the 3.5 branch please?

Cheers,

>I believe this change should fix the error as it removes the usage of
>std::bind. Committed as r226282.
>
>Please confirm that this fixes the problem for you.

Confirmed fixed. Thanks muchly. Can you merge to the 3.5 branch please?

You mean 3.6, right?

Sorry, yes.

Cheers,

It would be nice if someone familiar with the release process did this.

Hans, can you merge r226282 to the 3.6 branch please?

Hans, can you merge r226282 to the 3.6 branch please?

Merged in r226293.

Thanks,
Hans