facebookincubator / fizz

C++14 implementation of the TLS-1.3 standard
Other
1.13k stars 158 forks source link

Proxygen on Linux compilation failing due to fizz #107

Closed moderation closed 8 months ago

moderation commented 8 months ago

Since December 14 2023 compiling Proxygen on Linux has been broken with the following error. Compiling with gcc 13.2.0:

/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:625:31: error: ‘X25519KeyExchange’ was not declared in this scope; did you mean ‘KeyExchange’?
  625 |   auto kex = std::make_unique<X25519KeyExchange>();
      |                               ^~~~~~~~~~~~~~~~~
      |                               KeyExchange
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:625:49: error: no matching function for call to ‘make_unique<<expression error> >()’
  625 |   auto kex = std::make_unique<X25519KeyExchange>();
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/memory:78,
                 from /home/moderation/Library/proxygen/proxygen/_build/deps/include/folly/Traits.h:24,
                 from /home/moderation/Library/proxygen/proxygen/_build/deps/include/folly/Optional.h:74,
                 from /home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/crypto/aead/Aead.h:11,
                 from /home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/crypto/aead/OpenSSLEVPCipher.h:12:
/usr/include/c++/13/bits/unique_ptr.h:1069:5: note: candidate: ‘template<class _Tp, class ... _Args> std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...)’
 1069 |     make_unique(_Args&&... __args)
      |     ^~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:1069:5: note:   template argument deduction/substitution failed:
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:625:49: error: template argument 1 is invalid
  625 |   auto kex = std::make_unique<X25519KeyExchange>();
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/13/bits/unique_ptr.h:1084:5: note: candidate: ‘template<class _Tp> std::__detail::__unique_ptr_array_t<_Tp> std::make_unique(size_t)’
 1084 |     make_unique(size_t __num)
      |     ^~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:1084:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/13/bits/unique_ptr.h:1094:5: note: candidate: ‘template<class _Tp, class ... _Args> std::__detail::__invalid_make_unique_t<_Tp> std::make_unique(_Args&& ...)’ (deleted)
 1094 |     make_unique(_Args&&...) = delete;
      |     ^~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:1094:5: note:   template argument deduction/substitution failed:
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:625:49: error: template argument 1 is invalid
  625 |   auto kex = std::make_unique<X25519KeyExchange>();
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp: In function ‘int fizz::tool::fizzServerCommand(const std::vector<std::__cxx11::basic_string<char> >&)’:
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:886:24: error: ‘OpenSSLFactory’ was not declared in this scope
  886 |       std::make_shared<OpenSSLFactory>(), std::make_shared<CertManager>());
      |                        ^~~~~~~~~~~~~~
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:886:39: error: no matching function for call to ‘make_shared<<expression error> >()’
  886 |       std::make_shared<OpenSSLFactory>(), std::make_shared<CertManager>());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/memory:80:
/usr/include/c++/13/bits/shared_ptr.h:1005:5: note: candidate: ‘template<class _Tp, class ... _Args> std::shared_ptr<typename std::enable_if<(! std::is_array< <template-parameter-1-1> >::value), _Tp>::type> std::make_shared(_Args&& ...)’
 1005 |     make_shared(_Args&&... __args)
      |     ^~~~~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:1005:5: note:   template argument deduction/substitution failed:
/home/moderation/Library/proxygen/proxygen/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:886:39: error: template argument 1 is invalid
  886 |       std::make_shared<OpenSSLFactory>(), std::make_shared<CertManager>());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/FizzTool.dir/build.make:160: CMakeFiles/FizzTool.dir/tool/FizzServerCommand.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/FizzTool.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
moderation commented 8 months ago

Confirmed the same on a different Linux box with gcc 12.3.0

mhlakhani commented 8 months ago

came here to report the same thing - I think https://github.com/facebookincubator/fizz/commit/9dd9a388f79dd43f28145733329a2788a39ececd might have broken it

cc @zalecodez @mingtaoy

zalecodez commented 8 months ago

indeed https://github.com/facebookincubator/fizz/commit/9dd9a388f79dd43f28145733329a2788a39ececd is what broke this. We'll need to make sure the correct dependencies are explicitly included in the build. I will take a look.

mhlakhani commented 8 months ago

@zalecodez I see https://github.com/facebookincubator/fizz/pull/105 which might fix this?

moderation commented 8 months ago

This is fixed for me with https://github.com/facebook/proxygen/commit/09e1ca006bdce17f1339ee0f81302a07c5ee3496. Thanks!