public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/58909] C++11's condition variables fail with static linking
Date: Thu, 28 Jan 2021 18:39:45 +0000	[thread overview]
Message-ID: <bug-58909-4-EYiOea5Rji@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58909-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58909

--- Comment #20 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't think so. The linker just doesn't resolve the undefined weak symbol for
pthread_cond_destroy is left equal to zero, and so there's a segfault when it
gets called.

$ g++ cv.C -static -g -Wl,--trace-symbol=pthread_cond_destroy -pthread
/usr/bin/ld:
/usr/lib/gcc/x86_64-redhat-linux/10/libstdc++.a(condition_variable.o):
reference to pthread_cond_destroy


IIUC it's not finding the definition in libc.a, or any definition at all.

  parent reply	other threads:[~2021-01-28 18:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29  2:43 [Bug libstdc++/58909] New: C++11's condition variables fail with static linkin joel at clambassador dot com
2013-10-29  9:53 ` [Bug libstdc++/58909] C++11's condition variables fail with static linking jakub at gcc dot gnu.org
2015-05-08 15:13 ` redi at gcc dot gnu.org
2020-12-02 16:36 ` redi at gcc dot gnu.org
2021-01-28 16:48 ` ksaunders at nowsecure dot com
2021-01-28 16:58 ` jakub at gcc dot gnu.org
2021-01-28 17:32 ` redi at gcc dot gnu.org
2021-01-28 17:42 ` redi at gcc dot gnu.org
2021-01-28 17:49 ` jakub at gcc dot gnu.org
2021-01-28 18:01 ` redi at gcc dot gnu.org
2021-01-28 18:07 ` redi at gcc dot gnu.org
2021-01-28 18:17 ` jakub at gcc dot gnu.org
2021-01-28 18:39 ` redi at gcc dot gnu.org [this message]
2021-01-28 18:48 ` jakub at gcc dot gnu.org
2021-01-28 19:00 ` redi at gcc dot gnu.org
2021-01-28 19:12 ` jakub at gcc dot gnu.org
2021-01-28 19:24 ` jakub at gcc dot gnu.org
2021-01-28 20:41 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
2021-07-22  8:10 ` glisse at gcc dot gnu.org
2021-07-22  8:55 ` redi at gcc dot gnu.org
2021-07-22 10:45 ` glisse at gcc dot gnu.org
2024-06-11  9:39 ` rguenth 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-58909-4-EYiOea5Rji@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: link
Be 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).