467,075 Members | 996 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,075 developers. It's quick & easy.

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

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

Oct 23 '07 #1
  • viewed: 2254
Share:
1 Reply
On 23 Okt, 15:20, Otacon22 <otaco...@email.itwrote:
>
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

Oct 23 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by rollasoc | last post: by
1 post views Thread by Rob Woodworth | last post: by
6 posts views Thread by ampo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.