libc++-dev:amd64 3.9.1-3 expects /usr/include/xlocale.h to be installed

Bug #1725858 reported by Andrew Paxie
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libc++ (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Environment

Test program on Artful Aardvark 17.10

$ which clang++-5.0
/usr/bin/clang++-5.0

$ clang++-5.0 --version
clang version 5.0.0-3 (tags/RELEASE_500/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ dpkg --status libc++-dev
Package: libc++-dev
Status: install ok installed
Priority: extra
Section: libdevel
Installed-Size: 4180
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Multi-Arch: same
Source: libc++
Version: 3.9.1-3
Provides: libstdc++-dev
Depends: libc++1 (= 3.9.1-3), libc++-helpers
Description: LLVM C++ Standard library (development files)
 libc++ is a new implementation of the C++ standard library, targeting C++11.
 .
 Features and Goals
 .
   * Correctness as defined by the C++11 standard.
   * Fast execution.
   * Minimal memory use.
   * Fast compile times.
   * ABI compatibility with gcc's libstdc++ for some low-level features such
     as exception objects, rtti and memory allocation.
   * Extensive unit tests.
Original-Maintainer: LLVM Packaging Team <email address hidden>
Homepage: http://libcxx.llvm.org/

Test case that fails

$ clang++-5.0 -stdlib=libc++ -c -x c++ - <<EOF
#include <locale>
EOF

In file included from <stdin>:1:
In file included from /usr/include/c++/v1/locale:182:
/usr/include/c++/v1/__locale:39:11: fatal error: 'xlocale.h' file not found
# include <xlocale.h>
          ^~~~~~~~~~~
1 error generated.

Test case that succeeds

$ clang++-5.0 -c -x c++ - <<EOF
#include <locale>
EOF

Supposed cause

As explained in
https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html
the header file `xlocale.h` has been removed from libc6-dev in release 2.26.

Further information

`/usr/include/xlocale.h` was a file installed with package
`libc6-dev:amd64 (2.24-9ubuntu2)`
on Zesty Zapus.

Package `libc6-dev:amd64 (2.26-0ubuntu2)` no longer provides it.

Also fails to compile with g++ (all versions) configured to use libc++ instead of libstdc++-v3
and all other versions of clang++.

Revision history for this message
Andrew Paxie (andrewpaxie) wrote :

Workaround

$ cd /usr/include
$ sudo ln -s locale.h xlocale.h

Revision history for this message
Andrew Paxie (andrewpaxie) wrote :

Fixed in libc++ 5.0, but this is not in any repository for artful.

Since libc++-dev 3.9.1-3 is in the universe repository for artful,
it is unreasonable to expect a fix.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libc++ (Ubuntu):
status: New → Confirmed
Changed in libc++ (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.