mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] pthread_getname_np implementation
@ 2020-12-19  7:23 musl
  2020-12-19 17:42 ` Érico Nogueira
  0 siblings, 1 reply; 3+ messages in thread
From: musl @ 2020-12-19  7:23 UTC (permalink / raw)
  To: musl

Hi all,

i'm new to this list.

I'm trying to compile qt5-5.15.2 with gcc10.2 and musl-1.2.1, and after 
some hours compiling i get:

platform/default/thread.cpp: In function ‘std::string 
mbgl::platform::getCurrentThreadName()’:
platform/default/thread.cpp:14:5: error: ‘pthread_getname_np’ was not 
declared in this scope; did you mean ‘pthread_setname_np’?
    14 |     pthread_getname_np(pthread_self(), name, sizeof(name));
       |     ^~~~~~~~~~~~~~~~~~
       |     pthread_setname_np

I found this thread about musl/pthread_getname_np 
https://www.openwall.com/lists/musl/2019/07/09/2 ,
which says
"Based on the previous discussion of this and others' comments, I think
adding it[pthread_getname_np] is probably the right thing to do. I'll 
look at it after
rolling the release. Ping the list again if I don't get around to it
soon."
So here is the ping :-)

If there's another way around to get qt5 to compile, that's of course 
also ok for me.

Thanks,

Johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] pthread_getname_np implementation
  2020-12-19  7:23 [musl] pthread_getname_np implementation musl
@ 2020-12-19 17:42 ` Érico Nogueira
  2020-12-20 11:15   ` musl
  0 siblings, 1 reply; 3+ messages in thread
From: Érico Nogueira @ 2020-12-19 17:42 UTC (permalink / raw)
  To: musl

On Sat Dec 19, 2020 at 4:23 AM -03,  wrote:
> Hi all,
>
> i'm new to this list.
>
> I'm trying to compile qt5-5.15.2 with gcc10.2 and musl-1.2.1, and after
> some hours compiling i get:
>
> platform/default/thread.cpp: In function ‘std::string
> mbgl::platform::getCurrentThreadName()’:
> platform/default/thread.cpp:14:5: error: ‘pthread_getname_np’ was
> not
> declared in this scope; did you mean ‘pthread_setname_np’?
> 14 | pthread_getname_np(pthread_self(), name, sizeof(name));
> | ^~~~~~~~~~~~~~~~~~
> | pthread_setname_np
>
> I found this thread about musl/pthread_getname_np
> https://www.openwall.com/lists/musl/2019/07/09/2 ,
> which says
> "Based on the previous discussion of this and others' comments, I think
> adding it[pthread_getname_np] is probably the right thing to do. I'll
> look at it after
> rolling the release. Ping the list again if I don't get around to it
> soon."
> So here is the ping :-)
>
> If there's another way around to get qt5 to compile, that's of course
> also ok for me.

You can patch it out [1]

[1] https://github.com/void-linux/void-packages/blob/e64dd67f43c409d2b2db08214084e842d92ad620/srcpkgs/qt5/patches/0014-musl-set_thread_name_np.patch

Implementing it in musl shouldn't be terribly hard either, I think.

>
> Thanks,
>
> Johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] pthread_getname_np implementation
  2020-12-19 17:42 ` Érico Nogueira
@ 2020-12-20 11:15   ` musl
  0 siblings, 0 replies; 3+ messages in thread
From: musl @ 2020-12-20 11:15 UTC (permalink / raw)
  To: musl


> You can patch it out [1]
> 
> [1]
> https://github.com/void-linux/void-packages/blob/e64dd67f43c409d2b2db08214084e842d92ad620/srcpkgs/qt5/patches/0014-musl-set_thread_name_np.patch

It did work, thanks, i was able to build qt5 with musl.
There were some more errors, i'll look into the void-linux build for 
that.

Thanks also very much for making the patch to implement 
pthread_getname_np into musl.

Johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-20 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19  7:23 [musl] pthread_getname_np implementation musl
2020-12-19 17:42 ` Érico Nogueira
2020-12-20 11:15   ` musl

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).