Mailing List Archive

have_NPTL proposal/question
intro:
Having to patch a package to be installed with nptl I've tried this
function (yes now I know it's wrong patch conditionally a package if not
needed).
Only few days later a user complain that the check failed (seem to
remember on amd64) .

what we have:
At the moment have_NPTL is defined in eclass/eutils.eclass, it compile a
small test program to check if glibc have nptl support.

what I've seen used in at least one other place (modified to be a
candidate substitute):
<code>
case $(getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
NPTL* )
return 0
;;
LINUXTHREADS* )
return 1
;;
* )
eerror "unknown libpthread implementation"
return 1
;;
esac
</code>

there are drawbacks on the use of getconfig (that come with glibc) ?
Maybe it's not supported from *libc ?
This is also important to know (for me ;) because an important package
is going to make this check in it' "configure" and having it break on
certain gentoo supported ARCHs may be tedious.

any hints and/or feedback welcome

--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Francesco Riosa wrote:
> case $(getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz
> ABCDEFGHIJKLMNOPQRSTUVWXYZ) in

Wow, what a bad way to use tr. Apparently the author's unfamiliar with
[:lower:] and [:upper:].

Donnie
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCgpFtXVaO67S1rtsRArMiAJ4hp1uKN41HYZyHoYhtEuOqq6uRBACfTDvv
7D5fG2yMltG2BSuah6NvIgQ=
=2xpT
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
On Wed, 11 May 2005 16:12:45 -0700 Donnie Berkholz
<spyderous@gentoo.org> wrote:
| Francesco Riosa wrote:
| > case $(getconf GNU_LIBPTHREAD_VERSION | tr
| > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
|
| Wow, what a bad way to use tr. Apparently the author's unfamiliar with
| [:lower:] and [:upper:].

We don't set LC_ALL=C...

--
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail : ciaranm at gentoo.org
Web : http://dev.gentoo.org/~ciaranm
Re: have_NPTL proposal/question [ In reply to ]
On Wed, 2005-05-11 at 23:20 +0200, Francesco Riosa wrote:

[stuff..]

> case $(getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz
> ABCDEFGHIJKLMNOPQRSTUVWXYZ) in

tr '[a-z]' '[A-Z]'

--
Ned Ludd <solar@gentoo.org>

--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
maillog: 12/05/2005-00:26:14(+0100): Ciaran McCreesh types
> On Wed, 11 May 2005 16:12:45 -0700 Donnie Berkholz
> <spyderous@gentoo.org> wrote:
> | Francesco Riosa wrote:
> | > case $(getconf GNU_LIBPTHREAD_VERSION | tr
> | > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
> |
> | Wow, what a bad way to use tr. Apparently the author's unfamiliar with
> | [:lower:] and [:upper:].
>
> We don't set LC_ALL=C...

tr a-z A-Z ?

--
) Georgi Georgiev ) Q: Why is it that Mexico isn't sending )
( chutz@gg3.net ( anyone to the '84 summer games? A: Anyone (
) +81(90)2877-8845 ) in Mexico who can run, swim or jump is )
( ------------------- ( already in LA. (
Re: have_NPTL proposal/question [ In reply to ]
On Wed, 11 May 2005 20:45:58 -0400 Ned Ludd <solar@gentoo.org> wrote:
| On Wed, 2005-05-11 at 23:20 +0200, Francesco Riosa wrote:
| [stuff..]
| > case $(getconf GNU_LIBPTHREAD_VERSION | tr
| > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
|
| tr '[a-z]' '[A-Z]'

Breaks if the user has their locale stuff set to Estonian.

--
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail : ciaranm at gentoo.org
Web : http://dev.gentoo.org/~ciaranm
Re: have_NPTL proposal/question [ In reply to ]
maillog: 12/05/2005-02:13:46(+0100): Ciaran McCreesh types
> On Wed, 11 May 2005 20:45:58 -0400 Ned Ludd <solar@gentoo.org> wrote:
> | On Wed, 2005-05-11 at 23:20 +0200, Francesco Riosa wrote:
> | [stuff..]
> | > case $(getconf GNU_LIBPTHREAD_VERSION | tr
> | > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
> |
> | tr '[a-z]' '[A-Z]'
>
> Breaks if the user has their locale stuff set to Estonian.

Works for me:

[chutz@fox38 /]$ export LC_ALL=estonian
[chutz@fox38 /]$ date
N mai 12 10:29:58 JST 2005
[chutz@fox38 /]$ echo abcdefghijklmnopqrstuvwxyz | tr a-z A-Z
ABCDEFGHIJKLMNOPQRSTUVWXYZ

--
() Georgi Georgiev () "A verbal contract isn't worth the paper ()
() chutz@gg3.net () it's printed on." - Samuel Goldwyn ()
() +81(90)2877-8845 () ()
Re: have_NPTL proposal/question [ In reply to ]
On Thu, May 12, 2005 at 10:30:55AM +0900, Georgi Georgiev wrote:
> > Breaks if the user has their locale stuff set to Estonian.
> Works for me:
> [chutz@fox38 /]$ export LC_ALL=estonian
> [chutz@fox38 /]$ date
> N mai 12 10:29:58 JST 2005
> [chutz@fox38 /]$ echo abcdefghijklmnopqrstuvwxyz | tr a-z A-Z
> ABCDEFGHIJKLMNOPQRSTUVWXYZ
Nope.
See this bug that I traced it down in:
http://bugs.gentoo.org/show_bug.cgi?id=17051#c20

See also http://bugs.gentoo.org/show_bug.cgi?id=17051#c31 for the start of the
reason why. Quite simply 'Z' comes between 'S' and 'T' in the Estonian
alphabet.

Just trying out collate as above, TR seem to ignore LC_COLLATE - I'm not sure
why, but the folks with strange alphabet orders should be complaining.

--
Robin Hugh Johnson
E-Mail : robbat2@orbis-terrarum.net
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
Re: have_NPTL proposal/question [ In reply to ]
maillog: 11/05/2005-19:18:47(-0700): Robin H. Johnson types
> On Thu, May 12, 2005 at 10:30:55AM +0900, Georgi Georgiev wrote:
> > > Breaks if the user has their locale stuff set to Estonian.
> > Works for me:
> > [chutz@fox38 /]$ export LC_ALL=estonian
> > [chutz@fox38 /]$ date
> > N mai 12 10:29:58 JST 2005
> > [chutz@fox38 /]$ echo abcdefghijklmnopqrstuvwxyz | tr a-z A-Z
> > ABCDEFGHIJKLMNOPQRSTUVWXYZ
> Nope.
> See this bug that I traced it down in:
> http://bugs.gentoo.org/show_bug.cgi?id=17051#c20
>
> See also http://bugs.gentoo.org/show_bug.cgi?id=17051#c31 for the start of the
> reason why. Quite simply 'Z' comes between 'S' and 'T' in the Estonian
> alphabet.
>
> Just trying out collate as above, TR seem to ignore LC_COLLATE - I'm not sure
> why, but the folks with strange alphabet orders should be complaining.

But the bug is only about 'sed', while 'tr' (the problem in question)
does work.

--
( Georgi Georgiev ( If you go out of your mind, do it quietly, (
) chutz@gg3.net ) so as not to disturb those around you. )
( +81(90)2877-8845 ( (
Re: have_NPTL proposal/question [ In reply to ]
On Thu, 12 May 2005 12:21:13 +0900 Georgi Georgiev <chutz@gg3.net>
wrote:
| But the bug is only about 'sed', while 'tr' (the problem in question)
| does work.

Only because the tr version you're using doesn't fully implement locale
stuff properly yet.

--
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail : ciaranm at gentoo.org
Web : http://dev.gentoo.org/~ciaranm
Re: have_NPTL proposal/question [ In reply to ]
On Wednesday 11 May 2005 07:26 pm, Ciaran McCreesh wrote:
> On Wed, 11 May 2005 16:12:45 -0700 Donnie Berkholz
>
> <spyderous@gentoo.org> wrote:
> | Francesco Riosa wrote:
> | > case $(getconf GNU_LIBPTHREAD_VERSION | tr
> | > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
> |
> | Wow, what a bad way to use tr. Apparently the author's unfamiliar with
> | [:lower:] and [:upper:].
>
> We don't set LC_ALL=C...

so run `LC_ALL=c tr ...`

it's not uncommon to see that in GNU scripts
-mike
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
On Wednesday 11 May 2005 08:59 pm, Georgi Georgiev wrote:
> maillog: 12/05/2005-00:26:14(+0100): Ciaran McCreesh types
>
> > On Wed, 11 May 2005 16:12:45 -0700 Donnie Berkholz
> >
> > <spyderous@gentoo.org> wrote:
> > | Francesco Riosa wrote:
> > | > case $(getconf GNU_LIBPTHREAD_VERSION | tr
> > | > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
> > |
> > | Wow, what a bad way to use tr. Apparently the author's unfamiliar with
> > | [:lower:] and [:upper:].
> >
> > We don't set LC_ALL=C...
>
> tr a-z A-Z ?

not all locales have alphabets that start at A and end at Z

see the silly estonian alphabet for example
-mike
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
On Wednesday 11 May 2005 05:20 pm, Francesco Riosa wrote:
> what we have:
> At the moment have_NPTL is defined in eclass/eutils.eclass, it compile a
> small test program to check if glibc have nptl support.

hasnt this been outgrown ? people should `use nptl` now i think

> there are drawbacks on the use of getconfig (that come with glibc) ?
> Maybe it's not supported from *libc ?

well i'd point out that glibc is the only libc atm to implement NPTL ... but
then i'd point out someone is working on it for uClibc ...
-mike
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
Mike Frysinger wrote:

>On Wednesday 11 May 2005 07:26 pm, Ciaran McCreesh wrote:
>
>
>>On Wed, 11 May 2005 16:12:45 -0700 Donnie Berkholz
>>
>><spyderous@gentoo.org> wrote:
>>| Francesco Riosa wrote:
>>| > case $(getconf GNU_LIBPTHREAD_VERSION | tr
>>| > abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) in
>>|
>>| Wow, what a bad way to use tr. Apparently the author's unfamiliar with
>>| [:lower:] and [:upper:].
>>
>>We don't set LC_ALL=C...
>>
>>
>
>so run `LC_ALL=c tr ...`
>
>it's not uncommon to see that in GNU scripts
>-mike
>
>
is this safe also in non GNU environments ?
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
Mike Frysinger wrote:

>On Wednesday 11 May 2005 05:20 pm, Francesco Riosa wrote:
>
>
>>what we have:
>>At the moment have_NPTL is defined in eclass/eutils.eclass, it compile a
>>small test program to check if glibc have nptl support.
>>
>>
>
>hasnt this been outgrown ? people should `use nptl` now i think
>
>
yes and no,
no, 2005.0 still default to -ntpl and -ntplonly
yes, it's used only by mono project ebuilds (grep has spoken)

>
>
>>there are drawbacks on the use of getconfig (that come with glibc) ?
>>Maybe it's not supported from *libc ?
>>
>>
>
>well i'd point out that glibc is the only libc atm to implement NPTL ... but
>then i'd point out someone is working on it for uClibc ...
>-mike
>
>
mmh ok, btw all variant of glibc had getconf ?
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
On Thursday 12 May 2005 08:58 am, Francesco Riosa wrote:
> Mike Frysinger wrote:
> >On Wednesday 11 May 2005 05:20 pm, Francesco Riosa wrote:
> >>what we have:
> >>At the moment have_NPTL is defined in eclass/eutils.eclass, it compile a
> >>small test program to check if glibc have nptl support.
> >
> >hasnt this been outgrown ? people should `use nptl` now i think
>
> yes and no,
> no, 2005.0 still default to -ntpl and -ntplonly
> yes, it's used only by mono project ebuilds (grep has spoken)

so what if 2005.0 defaults to -nptl and -nptlonly ? you're trying to decide
if you should apply a nptl workaround or not ? USE=nptl makes sense

if mono is the only thing [ab]using have_NPTL, then maybe i'll bug
latexer/dotnet guys and see why they cant utilize USE=nptl

> >>there are drawbacks on the use of getconfig (that come with glibc) ?
> >>Maybe it's not supported from *libc ?
> >
> >well i'd point out that glibc is the only libc atm to implement NPTL ...
> > but then i'd point out someone is working on it for uClibc ...
> >-mike
>
> mmh ok, btw all variant of glibc had getconf ?

uClibc isnt a 'glibc variant', but to answer your question, getconf is a
glibc-ism
-mike
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
On Thursday 12 May 2005 09:31 am, Mike Frysinger wrote:
> if mono is the only thing [ab]using have_NPTL, then maybe i'll bug
> latexer/dotnet guys and see why they cant utilize USE=nptl

aaaaaaand it's gone

so your only solution now is `use nptl`, muwahahahaha
-mike
--
gentoo-dev@gentoo.org mailing list
Re: Re: have_NPTL proposal/question [ In reply to ]
R Hill wrote:
> the only thing i know of that needs LT is Xen, and they're already
> working on NPTL support.

IIRC, Xen has problems with Thread Local Storage. They have created some
workaround, but it was very slow and buggy, and so they decided not to
use NPTL (not sure about the last point).

Suggested "fix" to glibc was `mv /lib/tls /lib/tls.old`.

Maybe the situation has changed; I haven't checked their ML for several
months.

-jkt

--
cd /local/pub && more beer > /dev/mouth
Re: Re: have_NPTL proposal/question [ In reply to ]
R Hill <dirtyepic@metawire.org> writes:

> the only thing i know of that needs LT is Xen, and they're already
> working on NPTL support.

Also the (user space) driver from Epson for the Stylus Photo R800
printer needs Linuxthreads. While much of this is available in source
code form, it includes a couple of binary libraries. These do not work
correctly using NPTL.
--
gentoo-dev@gentoo.org mailing list
Re: have_NPTL proposal/question [ In reply to ]
Mike Frysinger wrote:
> On Wednesday 11 May 2005 05:20 pm, Francesco Riosa wrote:
>
>>what we have:
>>At the moment have_NPTL is defined in eclass/eutils.eclass, it compile a
>>small test program to check if glibc have nptl support.
>
> hasnt this been outgrown ? people should `use nptl` now i think

in fact glibc has dropped support for linuxthreads on the trunk.

http://sources.redhat.com/ml/libc-alpha/2005-05/msg00022.html

the only thing i know of that needs LT is Xen, and they're already
working on NPTL support.

--
gentoo-dev@gentoo.org mailing list