I've been using the OpenWrt SDK for a while now, to compile packages for my router. However, there is a persistent problem: I cannot compile python libs (the ones that would otherwise be installed by pip).
First of all, I must use the SDK because when I try to install using pip on the router, this error occurs (example with psutil):
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv = '"'"'/tmp/pip-install-9xnaq6hn/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9xnaq6hn/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pr9aendw/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
This error is equal to many other python libs I tried to install on the router.
I also tried moving the libraries (in the site-packages folder) from my computer to the router, which is not an option also, as the library is not recognized when I try to import it in a python script (everytime).
Finally, this is the common error I get when running, in the SDK,
make package/<package>/compile (in this case, psutil lib for python):
Note the "bad interpreter: No such file or directory" error.
My questions are: Is it really not possible to compile python libs using the newest OpenWrt SDK (18.06.2)? Are most python libraries not compatible with this OS?
I'm exhausting all my options... Maybe it is a problem with the Makefiles I'm using (please take a took at: https://pastebin.com/LG3wZjjZ ) . I really don't know...