Bug 101657 - strtod.c:32:10: fatal error: xlocale.h: No such file or directory
Summary: strtod.c:32:10: fatal error: xlocale.h: No such file or directory
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
Depends on:
Reported: 2017-06-30 06:51 UTC by Vinson Lee
Modified: 2017-07-07 10:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Vinson Lee 2017-06-30 06:51:37 UTC
mesa: 277621bbb724b0a627a0f5473bdeb82e02fdf389 (master 17.2.0-devel)

SCons build fails with glibc 2.26.

$ scons
  Compiling src/util/strtod.c ...
src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory
 #include <xlocale.h>

glibc 2.26 removed xlocale.h. 

Comment 1 Eric Engestrom 2017-06-30 16:26:56 UTC
To be clear, the bug here is that SCons (scons/gallium.py) defines HAVE_XLOCALE_H without actually checking that it does indeed have xlocale.h.

As far as I can tell, there is no way to perform such a check on SCons, so I think the define should be removed, and the corresponding functionality [1] will not work when built from scons.

Is there any other alternative?

 * Wrapper around strtod which uses the "C" locale so the decimal
 * point is always '.'
Comment 2 Emil Velikov 2017-06-30 16:41:41 UTC

Above suggests that there may be a way. Although, I think we want to hunk/rework the implementation. But that for another day.
Comment 3 Eric Engestrom 2017-07-07 10:57:02 UTC
Fixed by:

commit c5d0dc7fa5566941a49ede8c83a0cfe0a33a3d7f
Author: Vinson Lee <vlee@freedesktop.org>
Date:   Wed Jul 5 14:16:11 2017 -0700

    scons: Check for xlocale.h before defining HAVE_XLOCALE_H.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.