DevHeads.net

glibc-headers no longer provides xlocale.h in 2.26 (rawhide)?

During one of the releng rebuilds my package OCE is failing to build[1]
because it can't find /usr/include/xlocale.h

In both Fedora 24/25 it is provided by the glibc-headers package but it
seems to have been dropped in 2.26 in rawhide.

# dnf repoquery --whatprovides /usr/include/xlocale.h
Fedora 26 - x86_64 - Updates
5.2 MB/s | 10 MB 00:01
Fedora 26 - x86_64
6.5 MB/s | 53 MB 00:08
Last metadata expiration check: 0:00:03 ago on Sat Aug 12 13:18:38 2017.
glibc-headers-0:2.25-6.fc26.i686
glibc-headers-0:2.25-6.fc26.x86_64
glibc-headers-0:2.25-7.fc26.i686
glibc-headers-0:2.25-7.fc26.x86_64

(Rawhide)
# dnf repoquery --whatprovides /usr/include/xlocale.h
Last metadata expiration check: 0:14:04 ago on Sat Aug 12 13:05:37 2017.

Was this intentional?

Thanks,
Richard

[1] <a href="https://kojipkgs.fedoraproject.org//work/tasks/3501/20973501/build.log" title="https://kojipkgs.fedoraproject.org//work/tasks/3501/20973501/build.log">https://kojipkgs.fedoraproject.org//work/tasks/3501/20973501/build.log</a>

Comments

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Florian Weimer at 08/12/2017 - 08:28

On 08/12/2017 03:22 PM, Richard Shaw wrote:
Yes, it used to be installed by accident. The header itself clearly
said that it was an internal-only header.

We removed it without a deprecation warning because most programs had
configure checks for <xlocale.h> which started to fail after removal,
skipping the #include.

Thanks,
Florian

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Zbigniew =?utf-... at 08/12/2017 - 09:00

On Sat, Aug 12, 2017 at 03:28:15PM +0200, Florian Weimer wrote:
Heh, I just fixed two ftbfs packages with xlocale.h includes, and a bunch
more back when glibc 2.25 came out, incl. systemd. From what I've seen,
people don't test for xlocale.h because it's "part of glibc, so always there" ;)

Zbyszek

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Florian Weimer at 08/13/2017 - 14:21

On 08/12/2017 04:00 PM, Zbigniew Jędrzejewski-Szmek wrote:
It's not there if you don't use glibc.

Anyway, I was really surprised to learn that systemd sprouted an
#include <xlocale.h>. Looks like that it was introduced in this commit:

commit 11c3a36649e5e5e77db499c92f3cdcbd619efd3a
Author: Thomas Hindoe Paaboel Andersen < ... at gmail dot com>

basic: include only what we use

This is a cleaned up result of running iwyu but without forward
declarations on src/basic.

iwyu (“include what you use”,
<https://github.com/include-what-you-use/include-what-you-use>)
apparently produced misleading/incorrect results in this case. That's
annoying. I wonder if we can do anything about it. It doesn't look like
it can automatically ignore bits/ headers in its edits. 8-(

Thanks,
Florian

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Kevin Kofler at 08/13/2017 - 16:43

Florian Weimer wrote:
FreeBSD also has an xlocale.h, and the manpage claims Darwin has one too:
<a href="https://www.freebsd.org/cgi/man.cgi?query=xlocale&amp;sektion=3" title="https://www.freebsd.org/cgi/man.cgi?query=xlocale&amp;sektion=3">https://www.freebsd.org/cgi/man.cgi?query=xlocale&amp;sektion=3</a>

Kevin Kofler

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Zbigniew =?utf-... at 08/13/2017 - 15:00

On Sun, Aug 13, 2017 at 09:21:35PM +0200, Florian Weimer wrote:
Sure, it was easy enough to fix when the issue was discovered.
But this is a good example why the issue happens in many packages:
a seemingly-harmless import from a package which is known for
stability and which was already required to be present suddenly
stopped working. No warning was emitted before, and most people don't
look into system header files unless there have some good reason.

Zbyszek

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By =?ISO-8859-1?Q?... at 08/12/2017 - 18:20

On Sat, 2017-08-12 at 14:00 +0000, Zbigniew Jędrzejewski-Szmek wrote:
Thank you Zbyszek for taking care of mlt.
Richard the mlt fix is here [1].
[1]
<a href="https://src.fedoraproject.org/rpms/mlt/c/7ec11616fd9f88c0e1d6f44ec88a4c" title="https://src.fedoraproject.org/rpms/mlt/c/7ec11616fd9f88c0e1d6f44ec88a4c">https://src.fedoraproject.org/rpms/mlt/c/7ec11616fd9f88c0e1d6f44ec88a4c</a>
435e36044f?branch=master

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Antonio Trande at 08/13/2017 - 03:52

On 08/13/2017 01:20 AM, Sérgio Basto wrote:
Will 'xlocale.h' be provided newly in 'glibc'?
To fix this problem, i set 'xlocale.h' from 'libcxx-devel' package:
<a href="https://src.fedoraproject.org/rpms/icecat/c/153d3b4c3df56eb1330c0530220fd3882501028a?branch=master" title="https://src.fedoraproject.org/rpms/icecat/c/153d3b4c3df56eb1330c0530220fd3882501028a?branch=master">https://src.fedoraproject.org/rpms/icecat/c/153d3b4c3df56eb1330c0530220f...</a>

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Richard Shaw at 08/13/2017 - 07:07

On Sun, Aug 13, 2017 at 3:52 AM, Antonio Trande <anto. ... at gmail dot com>
wrote:

I saw that libcxx-devel provided the file as well but I didn't investigate
further to see if was appropriate to use...

Looking at the case of OCE is assumes it's available on OSX and Linux,
doesn't look like it's absolutely required so I'm patching around it for
now.

Thanks,
Richard

Re: glibc-headers no longer provides xlocale.h in 2.26 (rawhide)

By Zbigniew =?utf-... at 08/13/2017 - 10:07

On Sun, Aug 13, 2017 at 07:07:31AM -0500, Richard Shaw wrote:
Did you try to:
1. just remove the xlocale.h include (usually this just works)
2. replace it with locale.h include
?

xlocale.h is usually included for locale_t, and locale.h provides that.

Zbyszek