GCC version (python)

Hi all,

I am having some issues installing packages with pip in Openwrt on an RPi 4B. The python version is 3.8.5. I am getting an error during compiling, which after investigating, is caused by the fact that GCC 7.4 is called for compiling. But when I start python it clearly states "[GCC 8.4.0] on linux" .

If anyone can shed some light onto this, I'd be very grateful. Thank you.

OpenWrt is not self-hosting, meaning that you can't compile OpenWrt on a runnning OpenWrt system - but rather need a general purpose distribution and its build environment to cross-compile it. While there is an alibi gcc package available for installation, it can't do much more than compiling a hello-world like source (as more advanced build dependencies are not available at runtime).

As a consequence, you can use pip to install interpreted python dependencies, but as soon as you'd need to compile anything on-target, it's game over. If you still need this functionality nevertheless, you'll have to look into compiling OpenWrt from source, packaging the dependencies, etc.

1 Like

Thank you, that is very informative.

I have built from source before, so I should be OK. I want to drive an SPI display with a couple of buttons through python, so i can read system stats on it, and display critical errors. So I need SPI and GPIO modules and they are mostly c. I am also experimenting with sysfs spidev.

Thanks again.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.