Compile Errors with lxml.etree + Python 3.10.0a0

Bug #1881960 reported by Cooper Lees
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Medium
Unassigned

Bug Description

Seems having multiple issues, but looks Cython related.

 building 'lxml.etree' extension
  creating build/temp.linux-x86_64-3.10
  creating build/temp.linux-x86_64-3.10/src
  creating build/temp.linux-x86_64-3.10/src/lxml
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/home/travis/virtualenv/python3.10-dev/include -I/opt/python/3.10-dev/include/python3.10 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.10/src/lxml/etree.o -w
  src/lxml/etree.c: In function ‘__Pyx_PyList_Append’:
  src/lxml/etree.c:5705:23: error: lvalue required as left operand of assignment
           Py_SIZE(list) = len+1;
                         ^
  src/lxml/etree.c: In function ‘__Pyx_ListComp_Append’:
  src/lxml/etree.c:5837:23: error: lvalue required as left operand of assignment
           Py_SIZE(list) = len+1;
                         ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__LogEntry’:
  src/lxml/etree.c:225191:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:225193:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__Document’:
  src/lxml/etree.c:226254:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:226256:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__Element’:
  src/lxml/etree.c:226587:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:226589:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__MultiTagMatcher’:
  src/lxml/etree.c:228274:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:228276:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__ParserDictionaryContext’:
  src/lxml/etree.c:232830:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:232832:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__ParserContext’:
  src/lxml/etree.c:233095:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:233097:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__IncrementalFileWriter’:
  src/lxml/etree.c:235299:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:235301:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase’:
  src/lxml/etree.c:237626:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:237628:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_XPath’:
  src/lxml/etree.c:237963:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:237965:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_XSLTAccessControl’:
  src/lxml/etree.c:238595:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:238597:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_XSLT’:
  src/lxml/etree.c:238944:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:238946:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_DTD’:
  src/lxml/etree.c:240466:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:240468:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_RelaxNG’:
  src/lxml/etree.c:240832:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:240834:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_XMLSchema’:
  src/lxml/etree.c:241178:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:241180:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext’:
  src/lxml/etree.c:241300:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:241302:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree_Schematron’:
  src/lxml/etree.c:241658:5: error: lvalue required as increment operand
       ++Py_REFCNT(o);
       ^
  src/lxml/etree.c:241660:5: error: lvalue required as decrement operand
       --Py_REFCNT(o);
       ^
  src/lxml/etree.c: In function ‘__Pyx_PyList_Pop’:
  src/lxml/etree.c:262113:20: error: lvalue required as left operand of assignment
           Py_SIZE(L) -= 1;
                      ^
  Compile failed: command '/usr/bin/gcc' failed with exit code 1
  creating tmp
  cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitc643yela.c -o tmp/xmlXPathInitc643yela.o
  cc tmp/xmlXPathInitc643yela.o -lxml2 -o a.out
  error: command '/usr/bin/gcc' failed with exit code 1

Example build error: https://travis-ci.org/github/pypa/bandersnatch/jobs/694378588

Revision history for this message
scoder (scoder) wrote :

Thanks, yes, it just needs a rebuild with Cython 0.29.20, as soon as that is released.

Changed in lxml:
milestone: none → 4.5.2
importance: Undecided → Medium
status: New → Fix Committed
scoder (scoder)
Changed in lxml:
status: Fix Committed → 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.