facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.19k stars 3k forks source link

Disable mcrouter when building HHVM with libc++ #9209

Closed Atry closed 2 years ago

Atry commented 2 years ago

mcrouter is using folly/concurrency/AtomicSharedPtr.h, which does not support Clang according the comment at https://github.com/facebook/hhvm/blob/156a77d5a301033200601ddefb4dcaf26eb1ff9c/third-party/folly/src/folly/concurrency/detail/AtomicSharedPtr-detail.h#L28-L34

Test Plan:

Without this PR

Without this PR, mcrouter will fail:

hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/AsyncLog.cpp:28:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/CarbonRouterInstance.h:22:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/CarbonRouterClient.h:247:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/CarbonRouterClient-inl.h:11:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/ForEachPossibleClient.h:13:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/Proxy.h:30:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/ProxyBase.h:203:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/ProxyBase-inl.h:15:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/ProxyDestinationMap.h:160:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/ProxyDestinationMap-inl.h:15:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/third-party/mcrouter/src/mcrouter/ProxyDestinationBase.h:15:
hhvm> In file included from /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/AtomicSharedPtr.h:23:
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:78:13: error: unknown type name '_Atomic_word'
hhvm>     typedef _Atomic_word counted_base::*type;
hhvm>             ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:78:26: error: 'folly::detail::shared_ptr_internals::counted_base' (aka 'int') is not a class, namespace, or enumeration
hhvm>     typedef _Atomic_word counted_base::*type;
hhvm>                          ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:83:13: error: unknown type name '_Atomic_word'
hhvm>     typedef _Atomic_word counted_base::*type;
hhvm>             ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:83:26: error: 'folly::detail::shared_ptr_internals::counted_base' (aka 'int') is not a class, namespace, or enumeration
hhvm>     typedef _Atomic_word counted_base::*type;
hhvm>                          ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:88:30: error: non-friend class member '_Sp_counted_ptr' cannot have a qualified name
hhvm>     typedef const void* std::_Sp_counted_ptr<const void*, std::_S_atomic>::*
hhvm>                         ~~~~~^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:88:30: error: typedef declarator cannot be qualified
hhvm>     typedef const void* std::_Sp_counted_ptr<const void*, std::_S_atomic>::*
hhvm>                         ~~~~~^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:88:45: error: expected ';' at end of declaration list
hhvm>     typedef const void* std::_Sp_counted_ptr<const void*, std::_S_atomic>::*
hhvm>                                             ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:90:12: error: unknown type name 'type'; did you mean 'access_base::type'?
hhvm>     friend type fieldPtr(access_counted_ptr_ptr);
hhvm>            ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:73:42: note: 'access_base::type' declared here
hhvm>     typedef counted_base* shared_count::*type;
hhvm>                                          ^
hhvm> /tmp/nix-build-hhvm-4.169.0-dev20220916200639.drv-0/l661q71kgip2l3ia32zrqxlh017by7a0-source/build/third-party/folly/bundled_folly-prefix/include/folly/concurrency/detail/AtomicSharedPtr-detail.h:94:30: error: non-friend class member '__shared_ptr' cannot have a qualified name
hhvm>     typedef const void* std::__shared_ptr<const void, std::_S_atomic>::*type;
hhvm>                         ~~~~~^

With this PR

With this PR, there will be no error about mcrouter in the build log

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.