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

Re: SML/NJ Packaging Difficulties



On Tue, Jul 15, 2003 at 08:04:07PM -0700, Aaron Matthew Read wrote:
> The smlnj package (the compiler) is implemented in sml and needs a
> working implementation to build. Upstream, a set of pre-compiled
> binary files (~4 MB each) are supplied for each platform.
> 
> When I initially supplied the smlnj package, I shortsightedly only
> included the binary images required to build the i386 and powerpc
> platforms, since those were the only platforms for which I had a
> working runtime package.
> 
> Since then, I have received a patch to get the runtime working on
> hppa, and am now confronted by my lack of forethought. Since the
> boot files are binary, I cannot simply patch them on. Since the boot
> files upstream only represent a subset of Debian supported
> architectures (with the possibility of cross-compiling more in the
> future), I cannot provide a definitive set of boot files.
> 
> I think this problem is a manifestation of bad design of this
> package. I'm curious if anyone has dealt with similar problems
> (platform-specific binaries required to build their package) or has
> any ideas about a better design for such problems.
> 
> Here are some of my ideas:
> 1. Eliminate the need for the boot images, somehow creating them from
>    scratch. A working sml implementation is needed since the compiler
>    is written in sml. I don't see any reasonable way to implement this
>    solution.
> 2. Download the appropriate boot image while building the package. I
>    doubt this would be in the spirit of Debian Policy, if not a direct
>    violation.
> 3. For each platform, create a source package, for example: smlnj-x86
>    which would contain the appropriate boot image. These packages
>    would provide smlnj as a virtual package. Seems the best solution.
> 
> I am not confident enough with the third idea to begin without seeing
> if anyone has any other ideas, or an elaboration on one of mine.

Notice that the ocaml packages also include some initial images, but i
believe they are not used really. I just copy them somewhere else and
back when cleaning so i don't get problem with the generation of the
patch.

How it actually works is that a minimal ocaml compiler is generated from
C code, and this one is used to bootstrap the initial compiler suite,
which is then used to rebuild everything.

I believe that maybe smlnj has some similar mechanism, maybe you should
ask upstream about this.

Friendly,

Sven Luther



Reply to: