Date: Thu, 01 Oct 2015 09:38:35 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 203465] g++ does not compile the program using the boost-libs Message-ID: <bug-203465-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203465 Bug ID: 203465 Summary: g++ does not compile the program using the boost-libs Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: gerald@FreeBSD.org Reporter: safonov.paul@gmail.com Assignee: gerald@FreeBSD.org Flags: maintainer-feedback?(gerald@FreeBSD.org) Created attachment 161587 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D161587&action= =3Dedit Full errors After the upgrade FreeBSD9 to FreeBSD10 stopped compile g++ my program using the boost-libs. uname -a: FreeBSD localhost 10.2-STABLE FreeBSD 10.2-STABLE #0: Thu Oct 1 15:16:11 K= RAT 2015 root@localhost:/usr/obj/usr/src-10/sys/KERNEL amd64 Installed ports: lang/gcc48 devel/boost-libs cat t.cpp: #include <iostream> #include <boost/program_options.hpp> #define SVCNAME "SVCNAME" using namespace std; namespace po =3D boost::program_options; int main (int argc, char *argv[]) { std::string svc_name; po::options_description desc ("Allowed options"); desc.add_options() ("help,h", "produce help message") ("name,n", po::value<std::string> (&svc_name)->default_value(SVCNAME), "service name") ; try { po::variables_map vm; po::store (po::parse_command_line (argc, argv, desc), vm); po::notify (vm); if (vm.count ("help") || vm.count ("h")) { std::cout << desc << std::endl; return 1; } } catch (std::exception &e) { std::cout << desc << std::endl; return 1; } return 0; } =D0=A1ompile with clang++ without errors: export CXX=3Dclang++ $CXX -I/usr/local/include -o t t.cpp /usr/local/lib/libboost_program_option= s.a When compiling using g++, get a lot of errors: export CXX=3Dg++48 $CXX -I/usr/local/include -o t t.cpp /usr/local/lib/libboost_program_option= s.a /tmp//ccE0v9k9.o: In function `main': t.cpp:(.text+0x92): undefined reference to `boost::program_options::options_description::options_description(std::stri= ng const&, unsigned int, unsigned int)' t.cpp:(.text+0x307): undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)' t.cpp:(.text+0x4ba): undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)' /tmp//ccE0v9k9.o: In function `boost::program_options::basic_command_line_parser<char>::basic_command_lin= e_parser(int, char const* const*)': t.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPK= PKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x76= ): undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::string, std::allocator<std::string> > const&)' /tmp//ccE0v9k9.o: In function `boost::program_options::basic_command_line_parser<char>::extra_parser(boos= t::function1<std::pair<std::string, std::string>, std::string const&>)': t.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE12extr= a_parserENS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options25basi= c_command_line_parserIcE12extra_parserENS_9function1ISt4pairISsSsERKSsEE]+0= x33): undefined reference to `boost::program_options::detail::cmdline::set_additional_parser(boost::func= tion1<std::pair<std::string, std::string>, std::string const&>)' /tmp//ccE0v9k9.o: In function `std::vector<std::string, std::allocator<std::string> > boost::program_options::to_internal<std::string>(std::vector<std::string, std::allocator<std::string> > const&)': t.cpp:(.text._ZN5boost15program_options11to_internalISsEESt6vectorISsSaISsE= ERKS2_IT_SaIS5_EE[_ZN5boost15program_options11to_internalISsEESt6vectorISsS= aISsEERKS2_IT_SaIS5_EE]+0x46): undefined reference to `boost::program_options::to_internal(std::string const&)' ... ... ... /usr/local/lib/libboost_program_options.a(utf8_codecvt_facet.o): In function `boost::program_options::detail::utf8_codecvt_facet::~utf8_codecvt_facet()': libs/program_options/src/utf8_codecvt_facet.cpp:(.text._ZN5boost15program_o= ptions6detail18utf8_codecvt_facetD0Ev[_ZN5boost15program_options6detail18ut= f8_codecvt_facetD0Ev]+0xb): undefined reference to `std::__1::codecvt<wchar_t, char, __mbstate_t>::~codecvt()' /usr/local/lib/libboost_program_options.a(utf8_codecvt_facet.o):(.rodata+0x= 30): undefined reference to `std::__1::codecvt<wchar_t, char, __mbstate_t>::~codecvt()' /usr/local/lib/libboost_program_options.a(utf8_codecvt_facet.o):(.rodata+0x= 40): undefined reference to `std::__1::locale::facet::__on_zero_shared()' /usr/local/lib/libboost_program_options.a(utf8_codecvt_facet.o):(.rodata+0x= 70): undefined reference to `std::__1::codecvt<wchar_t, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*, unsigned lo= ng) const' /usr/local/lib/libboost_program_options.a(utf8_codecvt_facet.o):(.rodata+0x= e0): undefined reference to `typeinfo for std::__1::codecvt<wchar_t, char, __mbstate_t>' collect2: error: ld returned 1 exit status --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203465-13>