Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Error occurred while building mvfst #43

Open
Aolifuo opened this issue Apr 25, 2023 · 1 comment
Open

Error occurred while building mvfst #43

Aolifuo opened this issue Apr 25, 2023 · 1 comment

Comments

@Aolifuo
Copy link

Aolifuo commented Apr 25, 2023

Hello. I encountered the following error while building the fizz library. How can I solve it?
Enviroment: Ubuntu22.04, gcc-12, python3.8

In file included from /usr/include/c++/12/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/12/memory:78,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/Traits.h:23,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/Optional.h:68,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/aead/Aead.h:11,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/aead/OpenSSLEVPCipher.h:12,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/tool/FizzServerCommand.cpp:10:In member function ‘void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = long unsigned int]’,
    inlined from ‘static folly::fbstring_core<Char>::RefCounted* folly::fbstring_core<Char>::RefCounted::create(size_t*) [with Char = char]’ at /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:490:30,
    inlined from ‘static folly::fbstring_core<Char>::RefCounted* folly::fbstring_core<Char>::RefCounted::create(const Char*, size_t*) [with Char = char]’ at /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:497:27,
    inlined from ‘void folly::fbstring_core<Char>::initLarge(const Char*, size_t) [with Char = char]’ at /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:724:40:
/usr/include/c++/12/bits/atomic_base.h:464:25: warning: ‘void __atomic_store_8(volatile void*, long unsigned int, int)’ writing 8 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  464 |         __atomic_store_n(&_M_i, __i, int(__m));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:48,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/io/IOBuf.h:31,
                 from /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/aead/Aead.h:12:
In function ‘void* folly::checkedMalloc(size_t)’,
    inlined from ‘static folly::fbstring_core<Char>::RefCounted* folly::fbstring_core<Char>::RefCounted::create(size_t*) [with Char = char]’ at /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:489:59,
    inlined from ‘static folly::fbstring_core<Char>::RefCounted* folly::fbstring_core<Char>::RefCounted::create(const Char*, size_t*) [with Char = char]’ at /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:497:27,
    inlined from ‘void folly::fbstring_core<Char>::initLarge(const Char*, size_t) [with Char = char]’ at /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/FBString.h:724:40:
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/memory/Malloc.h:218:19: note: destination object of size 0 allocated by ‘malloc’
  218 |   void* p = malloc(size);
      |             ~~~~~~^~~~~~
/usr/bin/ld: CMakeFiles/BogoShim.dir/test/BogoShim.cpp.o: in function `readSelfCert()':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/test/BogoShim.cpp:294: undefined reference to `EVP_PKEY_id'
/usr/bin/ld: /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/test/BogoShim.cpp:296: undefined reference to `EVP_PKEY_id'
/usr/bin/ld: CMakeFiles/BogoShim.dir/test/BogoShim.cpp.o: in function `folly::ssl::OpenSSLHash::Hmac::hash_final(folly::Range<unsigned char*>)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/ssl/OpenSSLHash.h:120: undefined reference to `EVP_MD_size'
/usr/bin/ld: CMakeFiles/BogoShim.dir/test/BogoShim.cpp.o: in function `folly::ssl::OpenSSLHash::Digest::hash_final(folly::Range<unsigned char*>)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/ssl/OpenSSLHash.h:63: undefined reference to `EVP_MD_size'
/usr/bin/ld: /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/ssl/OpenSSLHash.h:63: undefined reference to `EVP_MD_size'
/usr/bin/ld: /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/ssl/OpenSSLHash.h:63: undefined reference to `EVP_MD_size'
/usr/bin/ld: /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/ssl/OpenSSLHash.h:63: undefined reference to `EVP_MD_size'
/usr/bin/ld: CMakeFiles/BogoShim.dir/test/BogoShim.cpp.o: in function `fizz::OpenSSLSignature<(fizz::KeyType)0>::setKey(std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> >)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/signature/Signature-inl.h:187: undefined reference to `EVP_PKEY_id'
/usr/bin/ld: lib/libfizz.a(Signature.cpp.o): in function `fizz::detail::ecSign(folly::Range<unsigned char const*>, std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> > const&, int)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/signature/Signature.cpp:49: undefined reference to `EVP_PKEY_size'
/usr/bin/ld: lib/libfizz.a(Signature.cpp.o): in function `fizz::detail::edSign(folly::Range<unsigned char const*>, std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> > const&)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/signature/Signature.cpp:97: undefined reference to `EVP_PKEY_size'
/usr/bin/ld: lib/libfizz.a(Signature.cpp.o): in function `fizz::detail::rsaPssSign(folly::Range<unsigned char const*>, std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> > const&, int)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/signature/Signature.cpp:172: undefined reference to `EVP_PKEY_size'
/usr/bin/ld: lib/libfizz.a(OpenSSLKeyUtils.cpp.o): in function `fizz::detail::validateEdKey(std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> > const&, int)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/openssl/OpenSSLKeyUtils.cpp:42: undefined reference to `EVP_PKEY_base_id'
/usr/bin/ld: lib/libfizz.a(Certificate.cpp.o): in function `fizz::CertUtils::getKeyType(std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> > const&)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/protocol/Certificate.cpp:213: undefined reference to `EVP_PKEY_id'
/usr/bin/ld: lib/libfizz.a(Certificate.cpp.o): in function `fizz::CertUtils::makePeerCert(std::unique_ptr<x509_st, folly::static_function_deleter<x509_st, &X509_free> >)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/protocol/Certificate.cpp:127: undefined reference to `EVP_PKEY_id'
/usr/bin/ld: lib/libfizz.a(Certificate.cpp.o): in function `fizz::OpenSSLSignature<(fizz::KeyType)0>::setKey(std::unique_ptr<evp_pkey_st, folly::static_function_deleter<evp_pkey_st, &EVP_PKEY_free> >)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/fizz/fizz/crypto/signature/Signature-inl.h:187: undefined reference to `EVP_PKEY_id'
/usr/bin/ld: lib/libfizz.a(Encryption.cpp.o): in function `folly::ssl::OpenSSLHash::Digest::hash_final(folly::Range<unsigned char*>)':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/include/folly/ssl/OpenSSLHash.h:63: undefined reference to `EVP_MD_size'
/usr/bin/ld: /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/lib/libfolly.a(AsyncSSLSocket.cpp.o): in function `folly::AsyncSSLSocket::getPeerCertificate() const':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/folly/folly/io/async/AsyncSSLSocket.cpp:1010: undefined reference to `SSL_get_peer_certificate'
/usr/bin/ld: /home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/lib/libfolly.a(AsyncSSLSocket.cpp.o): in function `folly::AsyncSSLSocket::getSSLCertSize() const':
/home/aolifuo/cpp/mvfst-rl/third-party/mvfst/_build/deps/folly/folly/io/async/AsyncSSLSocket.cpp:999: undefined reference to `EVP_PKEY_bits'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/BogoShim.dir/build.make:124: bin/BogoShim] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/BogoShim.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
@odelalleau
Copy link
Contributor

This project is not supported anymore, and as a result it's not really surprising that some build errors start popping up. I'm sorry but I'm afraid you'll need to figure it out yourself (note that I wouldn't be surprised if there are more problems down the line as well...)
Maybe you could first check out https://github.com/facebookincubator/mvfst to see if you can build mvfst, and if yes then you can try updating the mvfst dependency of this repo, but this may also cause other issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants