Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510440 - sys-libs/ncurses: configure --with-pthread --with-reentrant
Summary: sys-libs/ncurses: configure --with-pthread --with-reentrant
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-16 00:28 UTC by Luke-Jr
Modified: 2024-01-17 03:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild patch to add threads support (ncurses-threads.patch,2.61 KB, patch)
2014-05-21 02:50 UTC, Luke-Jr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2014-05-16 00:28:57 UTC
Why is ncurses built --without-pthread --without-reentrant without even a USE flag to make a thread-safe version possible? This is causing a ton of race conditions reported by Helgrind :(
Comment 1 SpanKY gentoo-dev 2014-05-18 16:57:22 UTC
there's a comment in the ebuild already explains why: the ABI breaks.  threading/etc... requires the ABI to be bumped from 5 to 6.  we're waiting for the ABI to generally be bumped and then we'll enable these extra features at that time.

a USE flag isn't really appropriate here.
Comment 2 Luke-Jr 2014-05-18 21:25:30 UTC
(In reply to SpanKY from comment #1)
> there's a comment in the ebuild already explains why: the ABI breaks. 
> threading/etc... requires the ABI to be bumped from 5 to 6. 

Ah, I misinterpreted the comment to refer only to the chtype/mmask-t settings since those were singled out.

> we're waiting for the ABI to generally be bumped and then we'll enable
> these extra features at that time.

In the meantime, users of multithreads curses applications are hitting race conditions which screw up my terminal because of this :(

> a USE flag isn't really appropriate here.

Why not? Seems the perfect scenario for the threads USE flag. Other software packages also break ABI compatibility when built with/without threads support, so there is nothing special here (unless I missed something).
Comment 3 SpanKY gentoo-dev 2014-05-19 16:34:11 UTC
(In reply to Luke-Jr from comment #2)

sorry, but that's not a compelling reason.  we're talking about the SONAME changing here, not adding/removing a handful of functions.
Comment 4 Luke-Jr 2014-05-19 20:39:34 UTC
(In reply to SpanKY from comment #3)
> (In reply to Luke-Jr from comment #2)
> 
> sorry, but that's not a compelling reason.  we're talking about the SONAME
> changing here, not adding/removing a handful of functions.

Even better, it means both threadsafe and non-threadsafe versions can be installed at the same time.

Will you accept a patch to cleanly do this?
Comment 5 SpanKY gentoo-dev 2014-05-20 22:06:54 UTC
(In reply to Luke-Jr from comment #4)

go through the headers with all those flags enabled and see if there's an API difference.  i'd give this serious consideration.
Comment 6 Luke-Jr 2014-05-21 02:50:12 UTC
Created attachment 377322 [details, diff]
ebuild patch to add threads support

(In reply to SpanKY from comment #5)
> (In reply to Luke-Jr from comment #4)
> 
> go through the headers with all those flags enabled and see if there's an
> API difference.  i'd give this serious consideration.

There *are* differences, but since the SONAME is different, it shouldn't affect anything that doesn't explicitly support those differences and build against them.

I wasn't sure what the best way to do the global is, but please take a look at the attached draft ebuild patch. With USE='unicode threads', this results in 4 library sets being built, each with their own headers, pkgconfig, etc.
Comment 7 SpanKY gentoo-dev 2015-08-12 09:07:14 UTC
Comment on attachment 377322 [details, diff]
ebuild patch to add threads support

sorry, but no, we're not adding this to the ncurses-5 package.  that's too much of a headache to manage and not worth the effort.
Comment 8 SpanKY gentoo-dev 2015-08-12 10:03:42 UTC
(In reply to Luke-Jr from comment #6)

seems the use of SONAME was overloaded.  i was talking about .so.[56] but you were talking about libncurses{,w,t,tw}.so.5.

since upstream supports this naming convention, i'll merge it into ncurses-6.0.
Comment 9 SpanKY gentoo-dev 2015-08-12 10:38:58 UTC
USE=threads now exists in ncurses-6.0 and installs the t variants alongside

http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f812f0eafe80c5dc524b300f41c7d32b35e8f6f1
Comment 10 Luke-Jr 2015-08-12 15:45:31 UTC
Thanks