public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "christian.morales.vega at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105671] New: Unexplained "undefined reference" error Date: Fri, 20 May 2022 10:06:25 +0000 [thread overview] Message-ID: <bug-105671-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105671 Bug ID: 105671 Summary: Unexplained "undefined reference" error Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: christian.morales.vega at gmail dot com Target Milestone: --- Created attachment 53005 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53005&action=edit Full verbose build log I have found a strange issue in my project build that reproduces is Ubuntu 22.04 (gcc 11.2) and Fedora 36 (gcc 12.1.1). This is the most I have been able to reduce it: $ tar xf boost_1_79_0.tar.bz2 $ cd boost_1_79_0/ $ ./bootstrap.sh $ ./b2 --with-program_options link=static --user-config=$PWD/../user-config.jam $ cd .. $ g++ -o /dev/null test.cpp -Iboost_1_79_0 boost_1_79_0/stage/lib/libboost_program_options.a -Os -flto /usr/bin/ld: /tmp/cccbpRrv.ltrans0.ltrans.o: in function `boost::program_options::options_description::get_option_column_width() const': <artificial>:(.text+0x28cd): undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_high_mark() const' /usr/bin/ld: /tmp/cccbpRrv.ltrans0.ltrans.o: in function `boost::program_options::(anonymous namespace)::format_one(std::ostream&, boost::program_options::option_description const&, unsigned int, unsigned int) [clone .constprop.0]': <artificial>:(.text+0x2d80): undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_high_mark() const' /usr/bin/ld: <artificial>:(.text+0x2e13): undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_high_mark() const' /usr/bin/ld: <artificial>:(.text+0x3d40): undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_high_mark() const' collect2: error: ld returned 1 exit status $ I'm attaching a log showing the whole Boost.Program_options verbose build log. - Change "-Os" for "-O1" and it works - Remove the -supposedly unused- "#include <boost/asio/spawn.hpp>" line and it works.
next reply other threads:[~2022-05-20 10:06 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-20 10:06 christian.morales.vega at gmail dot com [this message] 2022-05-20 10:08 ` [Bug c++/105671] " christian.morales.vega at gmail dot com 2022-05-26 23:09 ` [Bug libstdc++/105671] [11/12/13 Regression] " jsm28 at gcc dot gnu.org 2022-05-27 10:19 ` redi at gcc dot gnu.org 2022-05-27 13:51 ` christian.morales.vega at gmail dot com 2022-05-27 14:23 ` cvs-commit at gcc dot gnu.org 2022-05-27 14:25 ` [Bug libstdc++/105671] [11/12 " redi at gcc dot gnu.org 2022-06-08 15:53 ` cvs-commit at gcc dot gnu.org 2022-06-08 16:10 ` [Bug libstdc++/105671] [11 " redi at gcc dot gnu.org 2022-07-07 23:33 ` cvs-commit at gcc dot gnu.org 2022-07-07 23:34 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105671-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).