Re: Cross Compiler for Python?

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

    Re: Cross Compiler for Python?


    Hendrik van Rooyen wrote:
    norseman wrote:
    >
    >============== =============== =============== ======
    >In case all else fails:
    >>
    >This is not a cookbook answer, but:
    > 1) gnu's gcc will compile to 16,32 or 64 bit intel architectures
    > OK, the 32 bit version compiles to 16 or 32 & the 64 should.
    > The 64 will run 32 bit programs, including the 32 bit gcc.
    > chgroot can be (messy but) useful to maintain separation.
    > 2) info gcc and look for compiler directives
    > then info nasm and look for directives
    > same for the linker
    > I'm not specific because I use Slackware and different
    > distros can use different modules. You may have an assembler
    > with a different name. Switches can be different and so
    > forth.
    >On Slackware the installpkg (for tarballs already compiled) records the
    >locations of where things go in /var/log/packages. I have to assume
    >other distros have something similar since these are used to remove
    >things later. Can we say 'updates'? If not you will need to wade
    >through the .configure and Makefiles to root out what happens to get
    >'vanilla' locations.
    >>
    >Like I said, it's not cookbook, but it will get you there and you will
    >gain quite an insight into Linux. While the path may not be well marked
    >in Linux, there usually is one.
    >>
    >Sorry I don't have a more straight forward approach.
    >>
    >- Steve
    >>
    >
    Thanks Steve, for the tips.
    >
    In a sense, I have dreaded an answer like this, as it is cold comfort
    to realise that I will be hassled off my objective to take a side trip
    through Linux's complexities, just so that I can play with the hardware
    to evaluate if we can use it for what we want to do.
    >
    I had fondly hoped that somebody would have blazed the way
    before me. But it seems not. Tough.
    >
    I will report here what I do and find - It may help some other
    poor sod some day...
    >
    - Hendrik
    >
    >
    --

    >
    =============== =============== ===============

    .....dreaded... . Yep! I know the feeling. Got lots of those T-Shirts. ;)


    I re-read your original post. I got the feeling the eBox is running a
    stripped down Linux. Is that so? If it is, then:

    You mention pcmcia. Is it external, a plug in? Do any of your
    desktops/etc have pcmcia slots? Because if so.....

    1) Card can be mounted on your machine
    2) Compile and install can be direct to card (rem 32bit output)
    just change the install path(s). Look over the eBox /lib
    ( I'm assuming Linux again) and put that lib path first in
    the compile command line.

    If no desktop pcmcia adapter - pay the $40 or so for an USB attachable
    pcmcia adapter

    sample:
    plug in card

    (if current drives on desktop are scsi or sata drives you may need to
    change sda to sdb or sdc or .... use fdisk /dev/sda to check existence.
    the single letter 'q' to exit without changing anything. Careful with
    fdisk - damage comes quickly, easily and unrepairable. All you are after
    is which letter to use. Last one before No such drive is the one.
    )

    cd /mnt
    mkdir sda
    mount /dev/sda1 /mnt/sda
    ls /mnt/sda should give base dir listing of flashdrive
    (linux will treat the pcmcia flash as a removable HardDrive)

    install to /mnt/sda/usr/local/lib (or /mnt/sda/--where ever--)
    then: back on eBox
    cd /mnt
    mkdir sda
    cd sda
    ln -s /usr usr

    I did the soft link process above on my machine, then:

    ls /mnt/sda/usr/local/lib/python2.5 should list contents correctly
    (and does on my machine since it is located in /usr/local/lib/python2.5)
    thus keeping compile and install paths working. The use of the midnight
    commander (mc) with card mounted makes transferring whole trees simple.
    Soft links were invented for a reason!

    OF COURSE, if the eBox is not running Linux, all this is useless! ;)

    Steve
    norseman@hughes .net



Working...