Cross compile, python, ccache

hi guys

i using lede 17.01.4 on raspberrypi 3

and i want to install python-iptables by pip or source whatever

but there is an error

pip3 install python-iptables

image
so i think that if i 'm install ccache then it will be find ~
but install ccache has error too
image

now i'm lost
i saw about cross compile and tried this openwrt guide in my vmware ubuntu
image

but i don't know about cross compile well.....

is that possible cross compile python-iptables package ?

anything helpful information for this problem?

Trying to compile on an OpenWRT instance can be challenging. With a Raspberry Pi, you may have some luck. You'll need to install all the "standard" GNU build dependencies and the header sets for the needed libraries on the device itself.

The initial failure you're seeing appears to be that /usr/bin/gcc isn't able to compile on your instance, at least as it is configured now.

You could create a package Makefile and cross-compile it on a "build" machine.

I have also run into problems with pip and Python venv use under OpenWRT, even with pure-Python packages in that it seems to not "respect" the venv.

so i could create python-iptables package Makefile and cross compile in my vmware ubuntu to targeting LEDE
right ?

and is it possible with opkg ? or other way ?

could you give me a keyword or referneces ? plz !

I've never tried to install a complete, functional build chain on an OpenWRT device, due to flash-size constraints and knowing how terribly slow it is to compile anything on an older Raspberry Pi (which is likely faster than most home routers).

The instructions for installing the build chain on a Linux machine can be found at https://openwrt.org/docs/guide-developer/build-system/start

For a Makefile for your package, I'd look at a similar Python 3 package already "working" and adapt it to your needs. There is some documentation at https://openwrt.org/docs/guide-developer/packages and I also found Packaging guidelines to be very valuable.