Hello,
I'm trying out slitaz on a custom integrated board with a Geode LX processor. I am relatively new to Linux, so bear with me.
I've tried installing the Python 2.7.2 package from the slitaz repository. It installs successfully, but produces "Illegal instruction" whenever run. I've tried downloading the Python 2.7.6 source and compiling manually. The python binary seems to compile OK, but towards the end of the make it fails with:
./python -E -S -m sysconfig --generate-posix-vars
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
make: *** [pybuilddir.txt] Illegal instruction
You'll notice the same "Illegal instruction". When I run python in verbose, I receive the following:
root@slitaz:/mnt/external/Python-2.7.6# ./python -v
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /mnt/external/Python-2.7.6/Lib/site.pyc matches /mnt/external/Python-2.7.6/Lib/site.py
import site # precompiled from /mnt/external/Python-2.7.6/Lib/site.pyc
# /mnt/external/Python-2.7.6/Lib/os.pyc matches /mnt/external/Python-2.7.6/Lib/os.py
import os # precompiled from /mnt/external/Python-2.7.6/Lib/os.pyc
import errno # builtin
import posix # builtin
# /mnt/external/Python-2.7.6/Lib/posixpath.pyc matches /mnt/external/Python-2.7.6/Lib/posixpath.py
import posixpath # precompiled from /mnt/external/Python-2.7.6/Lib/posixpath.pyc
# /mnt/external/Python-2.7.6/Lib/stat.pyc matches /mnt/external/Python-2.7.6/Lib/stat.py
import stat # precompiled from /mnt/external/Python-2.7.6/Lib/stat.pyc
# /mnt/external/Python-2.7.6/Lib/genericpath.pyc matches /mnt/external/Python-2.7.6/Lib/genericpath.py
import genericpath # precompiled from /mnt/external/Python-2.7.6/Lib/genericpath.pyc
# /mnt/external/Python-2.7.6/Lib/warnings.pyc matches /mnt/external/Python-2.7.6/Lib/warnings.py
import warnings # precompiled from /mnt/external/Python-2.7.6/Lib/warnings.pyc
# /mnt/external/Python-2.7.6/Lib/linecache.pyc matches /mnt/external/Python-2.7.6/Lib/linecache.py
import linecache # precompiled from /mnt/external/Python-2.7.6/Lib/linecache.pyc
# /mnt/external/Python-2.7.6/Lib/types.pyc matches /mnt/external/Python-2.7.6/Lib/types.py
import types # precompiled from /mnt/external/Python-2.7.6/Lib/types.pyc
# /mnt/external/Python-2.7.6/Lib/UserDict.pyc matches /mnt/external/Python-2.7.6/Lib/UserDict.py
import UserDict # precompiled from /mnt/external/Python-2.7.6/Lib/UserDict.pyc
Illegal instruction
I've been working on this for a few days and found that the AMD Geode processor does not support the full i686 instruction set. I found a forum post related to a VIA processor and this same issue here.
The patch provided at the end of that forum thread was for a different Linux kernel, so I manually applied the necessary code, compiled a fresh kernel and booted it. I made sure that the processor type was set to Geode LX in the kernel build options (through menuconfig). The new kernel boots and everything seems to work fine, but the same error occurs in Python.
What is going on here? Is this actually a processor instruction related issue? The errors mention "Could not find platform dependent libraries <exec_prefix>", but I'm not sure what it's referring to if I'm still only working within the Python source tree.
Thoughts? Any help would be MUCH appreciated.
Thanks!