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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Otacon22

    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:

    ( 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

  • Paul Boddie

    #2
    Re: Cross-compiling porting of io.h, distutils compilator argument

    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:



    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."



    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

    Comment

    Working...