facebookincubator/fizz

Proxygen on Linux compilation failing due to fizz

moderation opened this issue · 5 comments

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

Confirmed the same on a different Linux box with gcc 12.3.0

came here to report the same thing - I think 9dd9a38 might have broken it

cc @zalecodez @mingtaoy

indeed 9dd9a38 is what broke this. We'll need to make sure the correct dependencies are explicitly included in the build. I will take a look.

@zalecodez I see #105 which might fix this?

This is fixed for me with facebook/proxygen@09e1ca0. Thanks!