building lxml fails on xlocale.h

Bug #1748333 reported by Kevin M. Gallagher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Invalid
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.

Revision history for this message
Kevin M. Gallagher (kevingallagher) wrote :

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

Revision history for this message
Kevin M. Gallagher (kevingallagher) wrote :

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

I was building version 1.1.29.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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