building lxml fails on xlocale.h

Bug #1748333 reported by Kevin M. Gallagher on 2018-02-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Undecided
Unassigned

Bug Description

I'm running Debian stretch and have all of the dependencies I need.

Here's my output produced by a `pip install`:

    In file included from /usr/include/libxslt/xsltInternals.h:24:0,
                     from src/lxml/etree.c:650:
    /usr/include/libxslt/xsltlocale.h:20:10: fatal error: xlocale.h: No such file or directory
     #include <xlocale.h>
              ^~~~~~~~~~~
    compilation terminated.
    Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit_hmd5up3.c -o tmp/xmlXPathInit_hmd5up3.o
    /tmp/xmlXPathInit_hmd5up3.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
     main (int argc, char **argv) {
     ^~~~
    cc tmp/xmlXPathInit_hmd5up3.o -lxml2 -o a.out
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

If you search around, lots of other people have this issue lately in different contexts. As a solution, people are recommending a symlink: ln -s /usr/include/locale.h /usr/include/xlocale.h

As stated here: https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27

glibc removed xlocale.h at version 2.26.

My bad, this is more of a bug in libxslt...

Looks like they fixed it here: https://github.com/GNOME/libxslt/commit/8b4babb8f742a1a189df4c4569e68eda308df68f

I was building version 1.1.29.

scoder (scoder) wrote :

Thanks for reporting back. Closing as "not a bug in lxml".

Changed in lxml:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers