Building Python lxml for LibreElec on Raspberry PI 2

  • I'm struggling to build Python lxml package for Kodi. It includes 2 binary modules that need to be compiled for a target platform, in my case it's Raspberry PI 2. For compilation I use Raspbian Jessie. I have followed all instructions and built statically compiled modules. On Raspbian they are imported without issues, but when I try to use those modules on LibreElec, I get the following error:

    Quick googling suggests that a probable cause may be Python version mismatch between Python used to build a binary module and Python used to import it, but there should not be any differences between 2.7.9 and 2.7.11. And, as I said, my modules are fully statically linked. ld shows no missing library dependencies.
    My guess is that Python in LibreElec may be built with different configuration options than on Raspbian so the symbol in question is disabled. Or maybe there is another reason? Can anybody help me with this?