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

Re: Ocaml-Debian (More Info)



On Tue, Oct 31, 2000 at 10:36:50AM -0800, Brent Fulgham wrote:
> Sven,
> 
> I'm wondering about OCaml versus OCaml-Opt.
> 
> Most OCaml build rules create both options, and
> my packages currently place both into /usr/bin.

Yes, this is correct.

If you look more closesly at for example the mlgtk package which i maintain
and am also upstream author, you will notice the correct way of doing things. 

You need to check for the existence of the opt compiler before compiling
the opt version of libraries and such.

Remember, the m68k architecture, which is one of the debian core
architectures, don't has native code support, and doing otherwise would break
the package for them (not being able to build a package is considered a
release critical bug, and you would get a quick bug report against it)

> I think this is probably wrong -- we should probably
> provide an arch-indep version with bytecode, then
> arch-specific packages by platform.

Yes, that would be the ideal, and i have planned to do this. But two things
have hindered me yet :

  * The documentation on doing multi-binary packages are nowhere to be found,
    and i didn't really have time to investigate this.

  * current bytecode compiler produce arch-independent code only if you link
    without the -custom option. This is supposed to change in the 3.0.1 or
    3.0.2 release of ocaml. I am waiting for it to make the suggested change
    to the ocaml package, and then repercute this to all dependent packages.

> Do you think this has any merit?  Or are we better
> off just creating optimized versions of all programs,
> and just omitting the byte-code version?

No, both version need to be provided. Not just because you use native code
means everyone will use nativecode. Particularly, some people may use both
(bytecode compilation is much quicker, and used at first, only compiling
natively for the production version). Also some functionalities are not
provided in both versions of the package.

Also remember the bit about the m68k port, and maybe other ports where the
native code compiler is not supported.

Ideally, i would want to have an alternative mechanism to provide ocamlc and
ocamlopt version following a global switch or something such. Also the same
could go for ocamlc.opt and ocamlopt.opt. Hadn't had time for it right now
though, and anyway it would need discution on the debian-ocaml-maint list as
it concerns various people packaging ocaml related packages.

There was a mail on the caml list concerning autoconf and ocaml which could be
usefull for this, also there is the OcamlMakefile (or whatever it wascalled)
which could help being packaged.

Hope this helps, and i am ccing the debian-ocaml-maint list.

Friendly,

Sven LUTHER



Reply to: