Qihoo360 / QConf

Qihoo Distributed Configuration Management System
Other
1.87k stars 536 forks source link

mac 上交叉编译go驱动报错 #95

Open jianjungki opened 6 years ago

jianjungki commented 6 years ago

Undefined symbols for architecture x86_64: "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::compare(unsigned long, unsigned long, char const, unsigned long) const", referenced from: LRU::visitKey(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >) in libqconf.a(qconf_shm.cc.o) "std::1::basic_string_common::__throw_length_error() const", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) std::1::basic_string<char, std::__1::char_traits, std::1::allocator > std::1::operator+<char, std::1::char_traits, std::1::allocator >(std::1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const) in libqconf.a(driver_api.cc.o) "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::append(char const, unsigned long)", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) std::1::basic_string<char, std::__1::char_traits, std::1::allocator > std::1::operator+<char, std::1::char_traits, std::1::allocator >(std::1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const) in libqconf.a(driver_api.cc.o) hash_tbl_set(qhasharr_s, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in libqconf.a(qconf_shm.cc.o) serialize_to_tblkey(char, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) ... "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::assign(char const)", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_print_log(char const, int, int, char const, ...) in libqconf.a(qconf_log.cc.o) "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::assign(char const, unsigned long)", referenced from: hash_tbl_get(qhasharr_s, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_shm.cc.o) hash_tbl_set(qhasharr_s, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in libqconf.a(qconf_shm.cc.o) qconf_verify(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_shm.cc.o) hash_tbl_getnext(qhasharr_s, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, int&) in libqconf.a(qconf_shm.cc.o) receive_msg(int, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_msg.cc.o) "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::assign(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, unsigned long, unsigned long)", referenced from: deserialize_from_tblkey(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, char&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) tblval_to_localidc(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) tblval_to_idcval(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) tblval_to_idcval(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) tblval_to_nodeval(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) tblval_to_nodeval(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) tblval_to_vectorval(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, char, String_vector&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) ... "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::assign(unsigned long, char)", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) serialize_to_tblkey(char, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in libqconf.a(qconf_format.cc.o) "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::basic_string(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: qconfget(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, char, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, int) in libqconf.a(driver_api.cc.o) hash_tbl_set(qhasharr_s, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in libqconf.a(qconf_shm.cc.o) LRU::getRemoveKey() in libqconf.a(qconf_shm.cc.o) LRU::removeKey() in libqconf.a(qconf_shm.cc.o) LRU::visitKey(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >) in libqconf.a(qconf_shm.cc.o) std::1::map<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::__list_iterator<std::1::basic_string<char, std::__1::char_traits, std::__1::allocator >, void>, std::1::less<std::1::basic_string<char, std::1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::1::char_traits, std::1::allocator > const, std::1::list_iterator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator >, void*> > > >::operator[](std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in libqconf.a(qconf_shm.cc.o) LRU::initLruMem(qhasharr_s*) in libqconf.a(qconf_shm.cc.o) ... "std::1::basic_string<char, std::1::char_traits, std::__1::allocator >::basic_string(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, unsigned long, unsigned long, std::1::allocator const&)", referenced from: tblval_to_graynodeval(std::__1::basic_string<char, std::1::char_traits, std::1::allocator > const&, std::1::set<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::less<std::1::basic_string<char, std::1::char_traits, std::1::allocator > >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > >&) in libqconf.a(qconf_format.cc.o) "std::__1::basic_string<char, std::1::char_traits, std::1::allocator >::~basic_string()", referenced from: GLOBALsub_I_qconf_log.cc in libqconf.a(qconf_log.cc.o) "std::__1::basic_string<char, std::1::char_traits, std::1::allocator >::operator=(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&)", referenced from: qconf_set_log_fmt(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in libqconf.a(qconf_log.cc.o) qconf_log_init(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, int) in libqconf.a(qconf_log.cc.o) _qconf_get_batchnode in libqconf.a(driver_api.cc.o) "operator delete(void)", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_print_key_info(char const, int, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, char const*, ...) in libqconf.a(qconf_log.cc.o) _qconf_get_children in libqconf.a(driver_api.cc.o) qconfget(std::__1::basic_string<char, std::1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&, char, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, int) in libqconf.a(driver_api.cc.o) ... "operator new(unsigned long)", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) std::__1::basic_string<char, std::1::char_traits, std::1::allocator > std::1::operator+<char, std::1::char_traits, std::1::allocator >(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, char const) in libqconf.a(driver_api.cc.o) hash_tbl_set(qhasharr_s, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in libqconf.a(qconf_shm.cc.o) LRU::getInstance() in libqconf.a(qconf_shm.cc.o) ... "_cxa_call_unexpected", referenced from: LRU::visitKey(std::1::basic_string<char, std::1::char_traits, std::1::allocator >) in libqconf.a(qconfshm.cc.o) "gxx_personality_v0", referenced from: qconf_getconf(char const, char, unsigned long, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchconf(char const, qconf_batch_nodes, char const, int) in libqconf.a(qconf.cc.o) qconf_get_batchkeys(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) qconf_getallhost(char const, string_vector_t, char const, int) in libqconf.a(qconf.cc.o) Dwarf Exception Unwind Info (eh_frame) in libqconf.a(qconf.cc.o) qconf_print_key_info(char const*, int, std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&, char const*, ...) in libqconf.a(qconf_log.cc.o) Dwarf Exception Unwind Info (eh_frame) in libqconf.a(qconf_log.cc.o) ... ld: symbol(s) not found for architecture x86_64

wenruo95 commented 5 years ago

楼主,这个问题现在解决了没,我也碰到这个问题了,mac

AceHub commented 5 years ago

mac +1

qishaowei commented 4 years ago

编译的时候试着改成 #cgo LDFLAGS: -L /usr/local/qconf/lib/ -lqconf -lm