chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: getopt, getopt_long?


From: Elf
Subject: Re: [Chicken-users] Re: getopt, getopt_long?
Date: Tue, 22 Jul 2008 06:59:43 -0700 (PDT)

On Mon, 21 Jul 2008, Shawn Rutledge wrote:

On Fri, Jul 11, 2008 at 12:24 AM, Peter Bex <address@hidden> wrote:
I agree completely.  Actually, I tend to view things in the opposite way:
WTF would anyone waste time trying to keep all those packages up-to-date, if
you can just install it using chicken-setup?

Because building them takes time.  This has been my motivation for
exploring cross-compilation: on my phone it takes several hours to
compile chicken, and several more hours to compile the eggs I'm using.
So when I'm short on time I spend more of it upgrading than actual
development.  I'm hoping that when OpenMoko is auto-generating new
packages, and all I have to do to make that happen is visit the
recipe(s) to increment the version number(s), the packages will indeed
be fairly up-to-date, and it will only take a few minutes to install
them.  But on a real computer maybe it's a wash.


An alternative idea: chicken-setup on the target could access a cache
of pre-compiled eggs, on a server somewhere.  If the server doesn't
have it in the cache, then either the server can cross-compile it on
behalf of the target machine, or the target could compile and upload
it.  (that depends on whether the server has the cross-toolchain or
not)  If the server always compiles, then once again the target does
not need to have gcc, binutils, include files, dev libs etc. installed
(which takes up more space than I have flash on the phone... which is
why I have to run with an SD card to hold all the extra stuff)


a cache of precompiled eggs is entirely impractical.  the number of platforms
supported alone makes this impossible, not even allowing for variations
in the installed libraries (and library locations, on some systems) within
a single system.

however, since you already do have a cross-toolchain, what is to prevent you
from doing such a thing locally? you know your own system (i hope!) and can instruct a crosscompiler to build correctly. you wouldn't even need
chicken-setup (on the phone, that is)... all you'd need is a real machine
accessible from the phone. when cross-compiling each egg, start with an empty egg dir. at the end of the compilation, bundle (zip, targz, whatever)
the entire egg dir: viola, you have all the dependencies. :)  its a little
worse in terms of bandwidth in the worst cases, but youre more-or-less
guaranteed to not run into problems due to dependencies or compilation that
way.

if you want to take it a few steps further, write a script that sends the current versions of all your installed eggs to your server, and use something
like meta-setup to check (from the server) if anything needs upgrading, and
if so, crosscompile it and send it back to the phone.  (as the entire repo
catalog is only around 30k, this is probably a win over packing all deps with
every egg.)

another simpler possibility is to not do anything from your phone directly.
set up an environment acting like your phone on the main box and only install
etc from there.  then it should only be a matter of copying that environment to
the actual phone.


-elf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]