Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: brianr on January 13, 2016, 08:52:47 AM

Title: New to A20 and Python
Post by: brianr on January 13, 2016, 08:52:47 AM
Hi Folks,

Hopefully these questions will have a quick resolution. I have an A20 board running the Debian image spoiled by Olimex. So Python seems to work OK, been able to install idle and pip. However installation of the pyA20 package fails, it can't compile the libraries. I can't post the exact message but it looks to be that the compiler command is wrong.

So, how do you install the latest pyA20 package?

What is the magic to get the C/C++ compiler going? Gcc is unknown, the compilers appear to be there.

Cheers

Brian

Title: Re: New to A20 and Python
Post by: brianr on January 13, 2016, 12:12:02 PM
For the record the pyA20 install via pip gives:

Detected processor:  sun7i (Probably Allwinner A20)

building 'pyA20.gpio.gpio' extension

creating build/temp.linux-armv7l-2.7

creating build/temp.linux-armv7l-2.7/pyA20

creating build/temp.linux-armv7l-2.7/pyA20/gpio

arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio_lib.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio_lib.o

unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Title: Re: New to A20 and Python
Post by: Gerrit on January 13, 2016, 04:29:43 PM
looks like you are trying to cross compile it, if you are compiling on the board you just need gcc not arm-linux-gnueabihf-gcc, if gcc is not on the system try

sudo apt-get install build-essential
Title: Re: New to A20 and Python
Post by: brianr on January 13, 2016, 05:49:59 PM
Yep that helped somewhat!