meganz / MEGAsync

Easy automated syncing between your computers and your MEGA Cloud Drive
Other
1.64k stars 281 forks source link

Undefined references? #213

Open Metalhead33 opened 6 years ago

Metalhead33 commented 6 years ago

I swear I have Crypto installed on my system - Gentoo Linux - but I get this error while trying to build:

cryptopp.o: In function `CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::StringSinkTemplate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
cryptopp.o: In function `mega::SymmCipher::ccm_encrypt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, unsigned char const*, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/tmp/MEGAsync/src/MEGASync/mega/src/crypto/cryptopp.cpp:137: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/tmp/MEGAsync/src/MEGASync/mega/src/crypto/cryptopp.cpp:137: undefined reference to `CryptoPP::AuthenticatedEncryptionFilter::AuthenticatedEncryptionFilter(CryptoPP::AuthenticatedSymmetricCipher&, CryptoPP::BufferedTransformation*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CryptoPP::BlockPaddingSchemeDef::BlockPaddingScheme)'
cryptopp.o: In function `CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::StringSinkTemplate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
cryptopp.o: In function `mega::SymmCipher::ccm_encrypt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, unsigned char const*, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/tmp/MEGAsync/src/MEGASync/mega/src/crypto/cryptopp.cpp:143: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/tmp/MEGAsync/src/MEGASync/mega/src/crypto/cryptopp.cpp:143: undefined reference to `CryptoPP::AuthenticatedEncryptionFilter::AuthenticatedEncryptionFilter(CryptoPP::AuthenticatedSymmetricCipher&, CryptoPP::BufferedTransformation*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CryptoPP::BlockPaddingSchemeDef::BlockPaddingScheme)'
cryptopp.o: In function `CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::StringSinkTemplate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
cryptopp.o: In function `mega::SymmCipher::gcm_encrypt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, unsigned char const*, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/tmp/MEGAsync/src/MEGASync/mega/src/crypto/cryptopp.cpp:172: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/tmp/MEGAsync/src/MEGASync/mega/src/crypto/cryptopp.cpp:172: undefined reference to `CryptoPP::AuthenticatedEncryptionFilter::AuthenticatedEncryptionFilter(CryptoPP::AuthenticatedSymmetricCipher&, CryptoPP::BufferedTransformation*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CryptoPP::BlockPaddingSchemeDef::BlockPaddingScheme)'
cryptopp.o: In function `CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::StringSinkTemplate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/usr/include/cryptopp/filters.h:977: undefined reference to `vtable for CryptoPP::StringSinkTemplate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
cryptopp.o: In function `CryptoPP::SourceTemplate<CryptoPP::StringStore>::PumpAll2(bool)':
/usr/include/cryptopp/filters.h:1247: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/usr/include/cryptopp/filters.h:1247: undefined reference to `CryptoPP::BufferedTransformation::TransferAllTo2(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
cryptopp.o: In function `CryptoPP::SourceTemplate<CryptoPP::StringStore>::PumpMessages2(unsigned int&, bool)':
/usr/include/cryptopp/filters.h:1245: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/usr/include/cryptopp/filters.h:1245: undefined reference to `CryptoPP::BufferedTransformation::TransferMessagesTo2(CryptoPP::BufferedTransformation&, unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
cryptopp.o: In function `CryptoPP::SourceTemplate<CryptoPP::StringStore>::Pump2(unsigned long&, bool)':
/usr/include/cryptopp/filters.h:1243: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/usr/include/cryptopp/filters.h:1243: undefined reference to `CryptoPP::StringStore::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
cryptopp.o: In function `CryptoPP::SourceTemplate<CryptoPP::StringStore>::PumpAll2(bool)':
/usr/include/cryptopp/filters.h:1247: undefined reference to `CryptoPP::DEFAULT_CHANNEL[abi:cxx11]'
/usr/include/cryptopp/filters.h:1247: undefined reference to `CryptoPP::BufferedTransformation::TransferAllTo2(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x120): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x128): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x130): undefined reference to `CryptoPP::BufferedTransformation::ChannelCreatePutSpace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long&)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x140): undefined reference to `CryptoPP::BufferedTransformation::ChannelPutModifiable2(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned long, int, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x148): undefined reference to `CryptoPP::BufferedTransformation::ChannelFlush(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x158): undefined reference to `CryptoPP::BufferedTransformation::SetRetrievalChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x120): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x128): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x130): undefined reference to `CryptoPP::BufferedTransformation::ChannelCreatePutSpace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long&)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x140): undefined reference to `CryptoPP::BufferedTransformation::ChannelPutModifiable2(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned long, int, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x148): undefined reference to `CryptoPP::BufferedTransformation::ChannelFlush(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x158): undefined reference to `CryptoPP::BufferedTransformation::SetRetrievalChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
cryptopp.o:(.data.rel.ro._ZTVN8CryptoPP20AutoSeededRandomPoolE[_ZTVN8CryptoPP20AutoSeededRandomPoolE]+0x60): undefined reference to `CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)'
qt.o: In function `mega::GfxProcQT::GfxProcQT()':
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:367: undefined reference to `av_register_all'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:368: undefined reference to `avcodec_register_all'
qt.o: In function `mega::GfxProcQT::readbitmapFfmpeg(int&, int&, int&, QString)':
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:613: undefined reference to `avformat_alloc_context'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:614: undefined reference to `avformat_open_input'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:621: undefined reference to `avformat_find_stream_info'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:685: undefined reference to `avformat_close_input'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:670: undefined reference to `sws_getContext'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:680: undefined reference to `avcodec_find_decoder'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:698: undefined reference to `avcodec_open2'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:684: undefined reference to `sws_freeContext'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:707: undefined reference to `av_frame_alloc'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:708: undefined reference to `av_frame_alloc'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:728: undefined reference to `av_image_alloc'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:754: undefined reference to `av_seek_frame'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:767: undefined reference to `av_init_packet'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:877: undefined reference to `av_packet_unref'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:777: undefined reference to `av_read_frame'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:781: undefined reference to `avcodec_decode_video2'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:797: undefined reference to `sws_scale'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:714: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:885: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:757: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:758: undefined reference to `av_freep'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:759: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:760: undefined reference to `avcodec_close'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:731: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:732: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:733: undefined reference to `avcodec_close'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:881: undefined reference to `av_packet_unref'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:882: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:883: undefined reference to `avcodec_close'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:884: undefined reference to `av_freep'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:750: undefined reference to `av_get_time_base_q'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:750: undefined reference to `av_rescale_q'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:803: undefined reference to `avpicture_layout'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:807: undefined reference to `av_packet_unref'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:808: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:809: undefined reference to `avcodec_close'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:810: undefined reference to `av_freep'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:811: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:812: undefined reference to `sws_freeContext'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:813: undefined reference to `avformat_close_input'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:832: undefined reference to `av_stream_get_side_data'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:835: undefined reference to `av_display_rotation_get'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:863: undefined reference to `av_packet_unref'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:864: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:865: undefined reference to `avcodec_close'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:866: undefined reference to `av_freep'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:867: undefined reference to `av_frame_free'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:868: undefined reference to `sws_freeContext'
/tmp/MEGAsync/src/MEGASync/mega/src/gfx/qt.cpp:869: undefined reference to `avformat_close_input'
polmr commented 6 years ago

It seems as if the following flags are missing: -lcryptopp -lavcodec -lavformat -lavutil -lswscale Notice that it is not complaining about crypto but cryptopp What steps are you following to compile? What's the output of the following command: find /usr/ -name "libavcodec.*" 2>/dev/null

adatoshima commented 6 years ago

I'm installing megasync on archlinux with commmand makepkg -si and got those undefined reference to the av* things errors, how do I add the flags?

polmr commented 6 years ago

You can enforce

        LIBS += -lavcodec -lavformat -lavutil -lswscale

in sdk.pri.