From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Re: gthread_once
Date: Sat, 18 Oct 2014 12:18:13 +0200 [thread overview]
Message-ID: <20141018101813.GB16659@port70.net> (raw)
In-Reply-To: <CALdjXpBo8GuUgi7W7iRNvUMOXGuO3H2Uek6dAxa_4cfb6uD38w@mail.gmail.com>
* Michael <msbroadf@gmail.com> [2014-10-18 13:16:52 +1100]:
> Essentially my plan is to compile my console only app for android but using
> the musl library instead of bionic. Im compling for standard x86_64 linux
> first to see if its viable. My app is plain c++ using wxwidgets (base only)
> and boost threads/system. I compiled these dependencies using CC/CXX/AR etc
> vars set to x86_64-linux-musl-gcc etc... and they compile fine and appear
> to be only linking to musl libraries as i used -v on the compliation and
> watched the directories it pulls in.
>
> Could the pthread_once be something to do with this thread
> http://sourceware-org.1504.n7.nabble.com/PATCH-Provide-pthread-atfork-in-libc-nonshared-a-and-libc-a-td246012.html#a247866
>
that's a different glibc specific problem: they have separate
libpthread which makes a lot of things hard so they do various
workarounds
in your case it seems libstdc++ uses the gthr-posix.h from libgcc
that provides the __gthread_once function which is supposed to call
pthread_once through a weak reference, but the weak ref is 0
(so uninitialized, eventhough musl have the pthread_once symbol)
i'd check
nm libstdc++.a |grep pthread_once
you should see undefined weak symbols (w) i think
and then at link time these should resolve to the pthread_once
in libc.a
next prev parent reply other threads:[~2014-10-18 10:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 2:16 gthread_once Michael
2014-10-18 10:18 ` Szabolcs Nagy [this message]
2014-10-18 15:45 ` gthread_once Rich Felker
2014-10-18 18:14 ` Szabolcs Nagy
2014-10-18 19:02 ` Rich Felker
2014-10-18 19:25 ` Jens Gustedt
2014-10-19 0:08 ` Michael
-- strict thread matches above, loose matches on Subject: below --
2014-10-17 10:36 gthread_once Michael
2014-10-17 11:42 ` gthread_once Jens Gustedt
2014-10-17 12:10 ` Rich Felker
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=20141018101813.GB16659@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).