kivy-ios
kivy-ios copied to clipboard
Issue building lxml for Kivy-ios
I am having issues building lxml using Kivy-ios or buildozer.
I get the same error either when I try with kivy-ios only or buildozer.
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-11.5-x86_64-3.9
creating build/temp.macosx-11.5-x86_64-3.9/src
creating build/temp.macosx-11.5-x86_64-3.9/src/lxml
/usr/bin/false -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/Volumes/Passport_mac/mac/Dev/Mawou_buildozer/.buildozer/venv/include -I/Users/mawakibidjada/.pyenv/versions/3.9.2/include/python3.9 -c src/lxml/etree.c -o build/temp.macosx-11.5-x86_64-3.9/src/lxml/etree.o -w -flat_namespace
Compile failed: command '/usr/bin/false' failed with exit code 1
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitkpqxhlhb.c -o tmp/xmlXPathInitkpqxhlhb.o
cc tmp/xmlXPathInitkpqxhlhb.o -lxml2 -o a.out
error: command '/usr/bin/false' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Volumes/Passport_mac/mac/Dev/Mawou_buildozer/.buildozer/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-plsllze8/lxml/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-plsllze8/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-efi3mmzj/install-record.txt --single-version-externally-managed --home /private/tmp/pip-target-fkpd45qq --compile --install-headers include/site/python3.9/lxml Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.2.4 is available.
You should consider upgrading via the '/Volumes/Passport_mac/mac/Dev/Mawou_buildozer/.buildozer/venv/bin/python3 -m pip install --upgrade pip' command.
# Command failed: pip install --target=/Volumes/Passport_mac/mac/Dev/Mawou_buildozer/.buildozer/applibs yagmail
# ENVIRONMENT:
# VIRTUAL_ENV = '/Volumes/Passport_mac/mac/Dev/Mawou_buildozer/.buildozer/venv'
# PATH = '/Volumes/Passport_mac/mac/Dev/Mawou_buildozer/.buildozer/venv/bin:/Volumes/Passport_mac/mac/Dev/Mawou_buildozer/venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin'
# CC = '/usr/bin/false'
# CXX = '/usr/bin/false'
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
YOUR HELP IS APPRECIATED. @AndreMiras :)
lxml is Pythonic binding for libxml2 - libxslt c libraries and needs a recipe on kivy-ios, so cannot be installed via pip.
The recipe was previously available but has never been migrated to the new toolchain (See https://github.com/kivy/kivy-ios/blob/8a2f5a621b6bbc48132b9fa48d85093db5ee786c/tools/build-lxml.sh)
Thanks @misl6!
I will try it and follow up.
@misl6 the recipe you referenced is a .sh file while python recipes are python files. How can I make it work? Thanks!
In past (that referenced file is quite old), "recipes" were bash scripts. That file that I referenced could help you find out which hacks are needed in the recipe to get it to work, but, of course, you should do a complete re-work of it.
Ok, thanks. I will work on it, but I will leave this issue open in case someone has the recipe. Thanks @misl6
Is it working with lxml alternatives like pugixml? https://pypi.org/project/pugixml/