Hi, Drasko,
On 27 July 2013 06:01, Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
Hi all,
I tried to install a Pyton extension directly on the MIPS target via pip :
root@Marx:/# pip install netifaces
Downloading/unpacking netifaces
Running setup.py egg_info for package netifaces
...
uilding 'netifaces' extension
mipsel-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe
-mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts
-Wno-error=uo
unable to execute mipsel-openwrt-linux-uclibc-gcc: No such file or directory
error: command 'mipsel-openwrt-linux-uclibc-gcc' failed with exit status 1
Command /mnt/usb/usr/bin/python -c import
setuptools;__file__='/tmp/pip-build/netifaces/setup.py';exec(compile(open(__file__).read().s
Storing complete log in /root/.pip/pip.log
So, as you see, Python tries to invoke gcc to compile extension, and
for some reason it finds that this compiler should be
mipsel-openwrt-linux-uclibc-gcc, i.e. compiler with which Python was
compiled with.
I tried to see where Python gets this information, but all I am
getting is this :
root@WEIO:/# grep -r mipsel-openwrt-linux-uclibc-gcc /
grep: /dev/log: [ 2546.45] grep: sending ioctl 540d to a partition!
No such device o[ 2546.45] grep: sending ioctl 540d to a partition!
r address
/dev/sda1:CC= mipsel-openwrt-linux-uclibc-gcc
/dev/sda1:CONFIG_ARGS= '--target=mipsel-openwrt-linux'
'--host=mipsel-openwrt-linux' '--build=x86_64-linux-gnu'
'--program-prefix=' '
What does this mean?
And echo $CC gives me empty string.
How do we compile Python extensions in OpenWRT?
I guess you can cross-compile the package on your host machine. Take a
look at lang/python-cjson/Makefile in OpenWrt packages feed [1].
lang/python/files/python-packages.mk is the helper Makefile for this
task.
[1] http://nbd.name/gitweb.cgi?p=packages.git;a=summary
Regards
yousong
BR,
Drasko
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel