Opened 6 years ago

Closed 6 years ago

#56529 closed defect (fixed)

znc @1.7.0: buid failed on OS X 10.6 - 10.8

Reported by: l2dy (Zero King) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: znc

Description

With the cxx11 PortGroup, build failed with the following error:

Linking znc...
Undefined symbols for architecture x86_64:
  "std::ctype<char>::_M_widen_init() const", referenced from:
      _main in main.o
      __Perror(CString const&, char const*, unsigned int) in Csocket.o
      Csock::ReachedMaxBuffer() in Csocket.o
      CZNC::WriteNewConfig(CString const&) in znc.o
      CTable::GetLine(unsigned int, CString&) const in Utils.o
      CHTTPSock::GetDate(long) in HTTPSock.o
      CDebugStream::~CDebugStream() in ZNCDebug.o
      ...
  "std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const", referenced from:
      std::_Hashtable<CString, std::pair<CString const, int>, std::allocator<std::pair<CString const, int> >, std::__detail::_Select1st, std::equal_to<CString>, std::hash<CString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<CString const, int>, false>*) in Translation.o
  "std::random_device::_M_fini()", referenced from:
      CSockManager::SetTDNSThreadFinished(CSockManager::TDNSTask*, bool, addrinfo*) in Socket.o
  "std::random_device::_M_init(std::string const&)", referenced from:
      CSockManager::SetTDNSThreadFinished(CSockManager::TDNSTask*, bool, addrinfo*) in Socket.o
  "std::random_device::_M_getval()", referenced from:
      CSockManager::SetTDNSThreadFinished(CSockManager::TDNSTask*, bool, addrinfo*) in Socket.o
  "std::condition_variable::notify_all()", referenced from:
      CThreadPool::~CThreadPool() in Threads.o
  "std::condition_variable::notify_one()", referenced from:
      CThreadPool::jobDone(CJob*) in Threads.o
      CThreadPool::threadFunc() in Threads.o
      CThreadPool::addJob(CJob*) in Threads.o
  "std::condition_variable::wait(std::unique_lock<std::mutex>&)", referenced from:
      void std::_V2::condition_variable_any::wait<std::mutex>(std::mutex&) in Threads.o
  "std::condition_variable::condition_variable()", referenced from:
      CThreadPool::CThreadPool() in Threads.o
  "std::condition_variable::~condition_variable()", referenced from:
      CThreadPool::CThreadPool() in Threads.o
      std::_V2::condition_variable_any::~condition_variable_any() in Threads.o
      CThreadPool::~CThreadPool() in Threads.o
  "std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())", referenced from:
      CSignalHandler::CSignalHandler(CZNC*) in main.o
      CThreadPool::addJob(CJob*) in Threads.o
  "std::thread::join()", referenced from:
      _main in main.o
  "std::thread::_State::~_State()", referenced from:
      std::thread::_State_impl<std::thread::_Invoker<std::tuple<CSignalHandler::CSignalHandler(CZNC*)::'lambda'()> > >::~_State_impl() in main.o
      std::thread::_State_impl<std::thread::_Invoker<std::tuple<CSignalHandler::CSignalHandler(CZNC*)::'lambda'()> > >::~_State_impl() in main.o
      std::thread::_State_impl<std::thread::_Invoker<std::tuple<CThreadPool::addJob(CJob*)::$_0> > >::~_State_impl() in Threads.o
      std::thread::_State_impl<std::thread::_Invoker<std::tuple<CThreadPool::addJob(CJob*)::$_0> > >::~_State_impl() in Threads.o
  "std::thread::detach()", referenced from:
      CThreadPool::addJob(CJob*) in Threads.o
  "std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)", referenced from:
      CConnectQueueTimer::RunJob() in znc.o
  "std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)", referenced from:
      CConnectQueueTimer::RunJob() in znc.o
  "std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)", referenced from:
      CGetAddrInfo::Finish() in Csocket.o
      CZNC::AddNetworkToQueue(CIRCNetwork*) in znc.o
      CTemplate::AppendPath(CString const&, bool) in Template.o
      CTemplate::PrependPath(CString const&, bool) in Template.o
      CThreadPool::addJob(CJob*) in Threads.o
  "std::__detail::_List_node_base::_M_unhook()", referenced from:
      CConnectQueueTimer::RunJob() in znc.o
      CIRCNetwork::~CIRCNetwork() in IRCNetwork.o
      std::list<std::pair<CString, bool>, std::allocator<std::pair<CString, bool> > >::remove(std::pair<CString, bool> const&) in Template.o
      CThreadPool::threadFunc() in Threads.o
      CThreadPool::cancelJobs(std::set<CJob*, std::less<CJob*>, std::allocator<CJob*> > const&) in Threads.o
  "std::_Hash_bytes(void const*, unsigned long, unsigned long)", referenced from:
      CTranslation::DelReference(CString const&) in Translation.o
      std::__detail::_Map_base<CString, std::pair<CString const, int>, std::allocator<std::pair<CString const, int> >, std::__detail::_Select1st, std::equal_to<CString>, std::hash<CString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](CString const&) in Translation.o
      std::_Hashtable<CString, std::pair<CString const, int>, std::allocator<std::pair<CString const, int> >, std::__detail::_Select1st, std::equal_to<CString>, std::hash<CString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<CString const, int>, false>*) in Translation.o
      std::_Hashtable<CString, std::pair<CString const, int>, std::allocator<std::pair<CString const, int> >, std::__detail::_Select1st, std::equal_to<CString>, std::hash<CString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) in Translation.o
      std::_Hashtable<CString, std::pair<CString const, std::unordered_map<CString, std::locale, std::hash<CString>, std::equal_to<CString>, std::allocator<std::pair<CString const, std::locale> > > >, std::allocator<std::pair<CString const, std::unordered_map<CString, std::locale, std::hash<CString>, std::equal_to<CString>, std::allocator<std::pair<CString const, std::locale> > > > >, std::__detail::_Select1st, std::equal_to<CString>, std::hash<CString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_erase(unsigned long, std::__detail::_Hash_node_base*, std::__detail::_Hash_node<std::pair<CString const, std::unordered_map<CString, std::locale, std::hash<CString>, std::equal_to<CString>, std::allocator<std::pair<CString const, std::locale> > > >, false>*) in Translation.o
  "std::__throw_system_error(int)", referenced from:
      locking_callback(int, int, char const*, int) in main.o
      dyn_lock_callback(int, CRYPTO_dynlock_value*, char const*, int) in main.o
      CSignalHandler::HandleSignals(CZNC*) in main.o
      CZNC::Loop() in znc.o
      CConfigWriteTimer::RunJob() in znc.o
      CChan::SetKey(CString const&) in Chan.o
      CChan::SetInConfig(bool) in Chan.o
      ...
  "std::__throw_out_of_range_fmt(char const*, ...)", referenced from:
      CString::TrimRight(CString const&) in ZNCString.o
      CString::Token(unsigned long, bool, CString const&, bool) const in ZNCString.o
      CString::Right(unsigned long) const in ZNCString.o
      CSocketManager::FindSockByRemotePort(unsigned short) in Csocket.o
      CSocketManager::FindSockByLocalPort(unsigned short) in Csocket.o
      CSocketManager::SwapSockByIdx(Csock*, unsigned long) in Csocket.o
      CClient::ParsePass(CString const&) in Client.o
      ...
  "std::__throw_bad_function_call()", referenced from:
      CIRCSock::OnCapabilityMessage(CMessage&) in IRCSock.o
      CClient::HandleCap(CMessage const&) in Client.o
      CClient::ClearServerDependentCaps() in Client.o
      CModule::HandleCommand(CString const&) in Modules.o
  "typeinfo for __cxxabiv1::__forced_unwind", referenced from:
      GCC_except_table25 in Threads.o
  "typeinfo for std::thread::_State", referenced from:
      typeinfo for std::thread::_State_impl<std::thread::_Invoker<std::tuple<CSignalHandler::CSignalHandler(CZNC*)::'lambda'()> > > in main.o
      typeinfo for std::thread::_State_impl<std::thread::_Invoker<std::tuple<CThreadPool::addJob(CJob*)::$_0> > > in Threads.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

With the old compiler.*list:

DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_irc_znc/znc/work/znc-1.7.0" && ./configure --prefix=/opt/local --enable-perl --enable-tcl --with-tcl=/opt/local/lib --disable-python 
checking whether the C++ compiler works... no
configure: error: in `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_irc_znc/znc/work/znc-1.7.0':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_irc_znc/znc/work/znc-1.7.0" && ./configure --prefix=/opt/local --enable-perl --enable-tcl --with-tcl=/opt/local/lib --disable-python

Change History (2)

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 00a92b9b7464009171bb475f52ac9a4a4a779117/macports-ports (master):

znc: Add -stdlib= flag to LDFLAGS

Closes: #56529

Note: See TracTickets for help on using tickets.