Cross-compiling porting of io.h, distutils compilator argument

O

Otacon22

Hi all,
I want to create a robot with a router board based on processor
atheros 2.6, called "fonera".
I have installed a version of linux, Openwrt and python and i want to
use it for some reasons, but i have problems to have access to GPIO
pins on the board to read and write on harware(pic, memories...) so i
want to include into python a porting of io.h
I founded an already python wrapped version of io.h called ioport.c
that i found here:
http://www.hare.demon.co.uk/ioport/ioport.html
( i can't use pyparallel because i need to specify port
address ,different from parallel )
but i have a problem: the compiler for that platform can be used only
in cross compiling mode, and i have it on my pc, so it is compiled for
my pc, and i can't use it on my router.

I know that to compile that module to been used i need to use
distutils, but distutils, when i run it, say me that can't find the
compiler gcc, so the only way that i have to compile this module is to
compile it on my pc, but i need to use the cross-compilator.So i need
to specify to distutils the path of the compilator, and also where to
pick io.h, because the io.h version for openwrt is different, and i
have it with the cross-compilator, so i need also to specify the path
of include libraries.
If someone know how i can also directly use the gcc cross-compilator
to build the module, without using distutils, but i need also to know
when i compile it, then howto use on python as library.

thanks

Otacon22
 
P

Paul Boddie

If someone know how i can also directly use the gcc cross-compilator
to build the module, without using distutils, but i need also to know
when i compile it, then howto use on python as library.

I think that this bug/patch is the most promising for cross-compiling
Python, although I'm not sure if it meets your requirements exactly:

http://bugs.python.org/issue1597850

Perhaps Python 2.6 will get improved cross-compilation support with
this patch applied.

Meanwhile, the following patch says this about distutils: "Although
scons doesn't support cross-builds either, it at least doesn't prevent
them."

http://bugs.python.org/issue841454

I know of patches which support cross-compilation using cmake as well,
although I don't see the core developers embracing things like SCons
or cmake in preference to distutils, regardless of any lack of support
distutils might have in this area.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top