facebook / fboss

Facebook Open Switching System Software for controlling network switches.
Other
860 stars 295 forks source link

Linker errors with fboss #32

Closed smbay closed 8 years ago

smbay commented 8 years ago

libfboss_agent.a(BcmTxPacket.cpp.o): In function folly::threadlocal_detail::PthreadKeyUnregister::registerKey(unsigned int)': BcmTxPacket.cpp:(.text._ZN5folly18threadlocal_detail20PthreadKeyUnregister11registerKeyEj[_ZN5folly18threadlocal_detail20PthreadKeyUnregister11registerKeyEj]+0x11): undefined reference tofolly::threadlocaldetail::PthreadKeyUnregister::instance' libfboss_agent.a(PktCaptureManager.cpp.o): In function folly::detail::qfind_first_byte_of_nosse(folly::detail::StringPieceLite, folly::detail::StringPieceLite)': PktCaptureManager.cpp:(.text._ZN5folly6detail25qfind_first_byte_of_nosseENS0_15StringPieceLiteES1_[_ZN5folly6detail25qfind_first_byte_of_nosseENS0_15StringPieceLiteES1_]+0xed): undefined reference tofolly::detail::qfind_first_byte_of_byteset(folly::detail::StringPieceLite, folly::detail::StringPieceLite)' libfboss_agent.a(PktCaptureManager.cpp.o): In function folly::detail::qfind_first_byte_of(folly::Range<char const*>, folly::Range<char const*>)': PktCaptureManager.cpp:(.text._ZN5folly6detail19qfind_first_byte_ofENS_5RangeIPKcEES4_[_ZN5folly6detail19qfind_first_byte_ofENS_5RangeIPKcEES4_]+0x64): undefined reference tofolly::detail::qfind_first_byte_of_sse42(folly::detail::StringPieceLite, folly::detail::StringPieceLite)' libfboss_agent.a(Address_types.cpp.o): In function apache::thrift::JSONProtocolWriterCommon::writeJSONChar(unsigned char)': Address_types.cpp:(.text._ZN6apache6thrift24JSONProtocolWriterCommon13writeJSONCharEh[_ZN6apache6thrift24JSONProtocolWriterCommon13writeJSONCharEh]+0x7f): undefined reference toapache::thrift::JSONProtocolWriterCommon::kJSONCharTable' libfboss_agent.a(Address_types.cpp.o): In function unsigned int apache::thrift::JSONProtocolReaderCommon::readJSONString<std::string>(std::string&)': Address_types.cpp:(.text._ZN6apache6thrift24JSONProtocolReaderCommon14readJSONStringISsEEjRT_[_ZN6apache6thrift24JSONProtocolReaderCommon14readJSONStringISsEEjRT_]+0x17b): undefined reference toapache::thrift::JSONProtocolReaderCommon::kEscapeChars' Address_types.cpp:(.text.ZN6apache6thrift24JSONProtocolReaderCommon14readJSONStringISsEEjRT[ZN6apache6thrift24JSONProtocolReaderCommon14readJSONStringISsEEjRT]+0x28b): undefined reference to apache::thrift::JSONProtocolReaderCommon::kEscapeChars' Address_types.cpp:(.text._ZN6apache6thrift24JSONProtocolReaderCommon14readJSONStringISsEEjRT_[_ZN6apache6thrift24JSONProtocolReaderCommon14readJSONStringISsEEjRT_]+0x2b3): undefined reference toapache::thrift::JSONProtocolReaderCommon::kEscapeCharVals' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::handleRead()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSocket::~AsyncSocket()' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::getRawBytesReceived() const' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::shutdownWriteNow()' /usr/local/lib/libthrift.so: undefined reference to folly::AsyncSocket::setReadCB(folly::AsyncReader::ReadCallback*)' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::connect(folly::AsyncSocket::ConnectCallback_, folly::SocketAddress const&, int, std::map<folly::AsyncSocket::OptionKey, int, std::less, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&)' /usr/local/lib/libthrift.so: undefined reference to folly::AsyncSSLSocket::getApplicationProtocol()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::setEorTracking(bool)' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::shutdownWrite()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::getRawBytesWritten() const' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::performRead(void__, unsigned long_, unsigned long_)' /usr/local/lib/libthrift.so: undefined reference tofolly::AsyncSocket::writeChain(folly::AsyncWriter::WriteCallback_, std::unique_ptr<folly::IOBuf, std::defaultdelete >&&, folly::WriteFlags)' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::closeNow()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSocket::write(folly::AsyncWriter::WriteCallback, void const, unsigned long, folly::WriteFlags)' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSocket::~AsyncSocket()' /usr/local/lib/libthrift.so: undefined reference tofolly::AsyncSSLSocket::getSelectedNextProtocolNoThrow(unsigned char const**, unsigned int, folly::SSLContext::NextProtocolType) const' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::~AsyncSSLSocket()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::handleConnect()' /usr/local/lib/libthrift.so: undefined reference to folly::AsyncSocket::writev(folly::AsyncWriter::WriteCallback*, iovec const*, unsigned long, folly::WriteFlags)' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::performWrite(iovec const, unsigned int, folly::WriteFlags, unsigned int, unsigned int)' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSocket::writeChain(folly::AsyncWriter::WriteCallback_, std::unique_ptr<folly::IOBuf, std::default_delete<folly::IOBuf> >&&, folly::WriteFlags)' /usr/local/lib/libthriftcpp2.so: undefined reference tofolly::AsyncSSLSocket::getSSLCertSigAlgName() const' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::getApplicationProtocol()' /usr/local/lib/libthrift.so: undefined reference tofolly::AsyncSocket::write(folly::AsyncWriter::WriteCallback, void const, unsigned long, folly::WriteFlags)' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::setReadCB(folly::AsyncReader::ReadCallback*)' /usr/local/lib/libthriftcpp2.so: undefined reference tofolly::EventBase::runAfterDrain(std::function<void ()>&&)' /usr/local/lib/libthrift.so: undefined reference tofolly::detail::LifoSemRawNodestd::atomic::pool()' /usr/local/lib/libthrift.so: undefined reference tofolly::AsyncSSLSocket::getSelectedNextProtocol(unsigned char const, unsigned int, folly::SSLContext::NextProtocolType) const' /usr/local/lib/libthriftcpp2.so: undefined reference to folly::SSLContext::setRandomizedAdvertisedNextProtocols(std::list<folly::SSLContext::NextProtocolsItem, std::allocator<folly::SSLContext::NextProtocolsItem> > const&, folly::SSLContext::NextProtocolType)' /usr/local/lib/libthrift.so: undefined reference tofolly::AsyncSSLSocket::setReadCB(folly::AsyncReader::ReadCallback_)' /usr/local/lib/libthrift.so: undefined reference to virtual thunk to folly::AsyncSSLSocket::prepareReadBuffer(void__, unsigned long_)' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::good() const' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::connecting() const' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::~AsyncSSLSocket()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSocket::writev(folly::AsyncWriter::WriteCallback_, iovec const_, unsigned long, folly::WriteFlags)' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::handleWrite()' /usr/local/lib/libthrift.so: undefined reference tovirtual thunk to folly::AsyncSSLSocket::checkForImmediateRead()' /usr/local/lib/libthriftcpp2.so: undefined reference tofolly::EventBase::tryRunAfterDelay(std::function<void ()> const&, unsigned int, folly::TimeoutManager::InternalEnum)' /usr/local/lib/libthrift.so: undefined reference to`virtual thunk to folly::AsyncSSLSocket::isEorTrackingEnabled() const' collect2: error: ld returned 1 exit status make[2]: * [wedge_agent] Error 1 make[1]: * [CMakeFiles/wedge_agent.dir/all] Error 2 make: * [all] Error 2 osboxes@osboxes:~/git/fboss/buiild$

oridb commented 8 years ago

Can you list all of the versions that are being used to build? I'm currently building it successfully.

Also, try rerunning getdeps.sh to make sure that everything is up to date.

smbay commented 8 years ago

Doing a clean build ( rm -rf external , getdeps.sh , cmake .. , make ) also didn't help Still getting same errors .

osboxes@osboxes:~/git/fboss/external/fbthrift$ git rev-parse HEAD 13fdfeecf98b215a00c85f10fb9fc2ed5a7b852e osboxes@osboxes:~/git/fboss/external$ cd iproute2/ osboxes@osboxes:~/git/fboss/external/iproute2$ git rev-parse HEAD 46d364fe8fa9fd6f5ca3989b572a2548d9caf56a osboxes@osboxes:~/git/fboss/external/folly$ git rev-parse HEAD 138b7236d534088c9c437e2249d65a7aadea1c11 osboxes@osboxes:~/git/fboss/external/folly$ cd .. osboxes@osboxes:~/git/fboss/external/wangle$ git rev-parse HEAD d821132a484d71178db81f71c857a681c9ac7b05

oridb commented 8 years ago

I just noticed that you are linking /usr/local/lib/libthrift.so, instead of the one we're building in external/

Once you fix that, it should work.

smbay commented 8 years ago

Thanks . It worked