fizz icon indicating copy to clipboard operation
fizz copied to clipboard

Revert missing includes that break build from commit 9dd9a38

Open earies opened this issue 1 year ago • 1 comments

Commit https://github.com/facebookincubator/fizz/commit/9dd9a388f79dd43f28145733329a2788a39ececd refactored OpenSSLFactory however in the process removed includes that currently break the build. While the PR temporarily patches the issue, it is unlikely to be merged as-is but needs addressing as part of this work.

/tmp/facebookincubator/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
/tmp/facebookincubator/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.2.0/memory:78,
                 from /usr/include/folly/Traits.h:24,
                 from /usr/include/folly/Optional.h:74,
                 from /tmp/facebookincubator/fizz/fizz/crypto/aead/Aead.h:11,
                 from /tmp/facebookincubator/fizz/fizz/crypto/aead/OpenSSLEVPCipher.h:12:
/usr/include/c++/13.2.0/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.2.0/bits/unique_ptr.h:1069:5: note:   template argument deduction/substitution failed:
/tmp/facebookincubator/fizz/fizz/tool/FizzServerCommand.cpp:625:49: error: template argument 1 is invalid
  625 |   auto kex = std::make_unique<X25519KeyExchange>();
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/13.2.0/bits/unique_ptr.h:1084:5: note: candidate: ‘template<class _Tp> std::__detail::__unique_ptr_array_t<_Tp> std::make_uniqu (size_t)’
 1084 |     make_unique(size_t __num)
      |     ^~~~~~~~~~~
/usr/include/c++/13.2.0/bits/unique_ptr.h:1084:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/13.2.0/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.2.0/bits/unique_ptr.h:1094:5: note:   template argument deduction/substitution failed:
/tmp/facebookincubator/fizz/fizz/tool/FizzServerCommand.cpp:625:49: error: template argument 1 is invalid
  625 |   auto kex = std::make_unique<X25519KeyExchange>();
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/facebookincubator/fizz/fizz/tool/FizzServerCommand.cpp: In function ‘int fizz::tool::fizzServerCommand(const std::vector<std::__cxx11::basic_string<char> >&)’:
/tmp/facebookincubator/fizz/fizz/tool/FizzServerCommand.cpp:886:24: error: ‘OpenSSLFactory’ was not declared in this scope
  886 |       std::make_shared<OpenSSLFactory>(), std::make_shared<CertManager>());
      |                        ^~~~~~~~~~~~~~
/tmp/facebookincubator/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.2.0/memory:80:
/usr/include/c++/13.2.0/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.2.0/bits/shared_ptr.h:1005:5: note:   template argument deduction/substitution failed:
/tmp/facebookincubator/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

earies avatar Dec 22 '23 16:12 earies

Should already be fixed in master

AjanthanAsogamoorthy avatar May 22 '24 18:05 AjanthanAsogamoorthy