MusicPlayerDaemon / ncmpc

curses client for MPD
GNU General Public License v2.0
108 stars 22 forks source link

failed to build 0.50 release on ventura #150

Open chenrui333 opened 3 days ago

chenrui333 commented 3 days ago

seeing the following build failure while building for ventura

  In file included from ../src/event/TimerList.cxx:5:
  ../src/event/TimerList.hxx:22:5: error: constraints not satisfied for class template 'IntrusiveTreeSetOperators' [with T = FineTimerEvent, GetKey = TimerList::GetDue, Compare = std::compare_three_way]
                           IntrusiveTreeSetOperators<FineTimerEvent, GetDue>> timers;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../src/util/IntrusiveTreeSet.hxx:139:3: note: because 'std::regular_invocable<std::compare_three_way, std::invoke_result_t<GetDue, const FineTimerEvent &>, std::invoke_result_t<GetDue, const FineTimerEvent &> >' evaluated to false
           std::regular_invocable<std::invoke_result_t<GetKey, const T &>,
           ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/invocable.h:35:29: note: because 'invocable<std::compare_three_way, std::chrono::time_point<std::chrono::steady_clock, std::chrono::duration<long long, std::ratio<1, 1000000000> > >, std::chrono::time_point<std::chrono::steady_clock, std::chrono::duration<long long, std::ratio<1, 1000000000> > > >' evaluated to false
  concept regular_invocable = invocable<_Fn, _Args...>;
                              ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/invocable.h:29:3: note: because 'std::invoke(std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)' would be invalid: no matching function for call to 'invoke'
    _VSTD::invoke(_VSTD::forward<_Fn>(__fn), _VSTD::forward<_Args>(__args)...); // not required to be equality preserving
    ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:695:17: note: expanded from macro '_VSTD'
  #  define _VSTD std
                  ^
  1 error generated.

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10909929153/job/30279464670?pr=190979 relates to https://github.com/Homebrew/homebrew-core/pull/190979

chenrui333 commented 14 hours ago

cc @MaxKellermann

MaxKellermann commented 13 hours ago

This looks like a bug in your C++ standard library implementation. Old clang/libc++ are known to be buggy. What are you using?

chenrui333 commented 12 hours ago

it is using clang 1500/xcode 15.2

MaxKellermann commented 2 hours ago

But what upstream clang/libc++ version is that?

ncmpc builds fine on GH actions, macos-latest, clang 15.0.0, e.g.: https://github.com/MusicPlayerDaemon/ncmpc/actions/runs/10871972077/job/30166446936 - is that the same version you're using? You said clang 1500, but do you really mean 15.0.0? What's the relevant difference between your setup and the one on GH actions?

I believe ncmpc's code is correct, and your toolchain is buggy. If that turns out to be true (and nobody has challenged that), there's nothing I can do to help. I do not support buggy toolchains.