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

Re: Hi, packaging mldonkey, rpath + other questions



On Mon, Sep 09, 2002 at 11:57:01AM +0200, Goswin Brederlow wrote:
> Christian Perrier <bubulle@debian.org> writes:
> 
> > Quoting Sven LUTHER (luther@dpt-info.u-strasbg.fr):
> > 
> > > > 2. mldonkey uses ocamlopt.opt but ocamlopt works as well. Which of the
> > > > two should I use? Should I build-depend on eigther or conflict with
> > > > one?
> > > 
> > > You should build depend on ocaml-best-compilers, and do a test for the
> > > presence of ocamlopt.opt before using it.
> > 
> > Besides Stefano and Sven advices, I may add that such a test for
> > presence of ocamlopt.opt may be found in other ocaml-bases packages...
> 
> The configure.in already has a check for:
>   AC_CHECK_PROG(OCAMLOPT, ocamlopt.opt, ocamlopt.opt)
> 
> I added another check below that:
>   AC_CHECK_PROG(OCAMLOPT, ocamlopt, ocamlopt)
> 
> That way it takes the users setting of OCAMLOPT, if that fails it uses
> ocamlopt.opt and if thats not present ocamlopt.

Nice :)))

Saddly, not all ocaml package are that clean.

> > IMHO, this allows minimal modification of original sources....and it
> > properly deals with the presence/lack of optimised compilers. I could
> > also "edit" Makefile.inc on the fly...
> > 
> > Of course, my package Build-Depends on ocaml-best-compilers as it was
> > previously written...
> > 
> > All this works well, though I'm not really an ocaml specialist (I'm
> > far more a genealogist...:-))
> 
> I want to make a binary-all package of the bytecompiled version. Unless
> I misunderstood other replies here bytecompiled ocaml (with the proper
> flags) should run on all archs without change.

:)))

If you agree, i will be nextly writing something about this in the
ocaml_packaging_policy, and we can iron out any other problem you will
be encountering about it.

> For speed reasons I also want to provide a optimised version on archs
> that support it. The above tests find the right (best) ocamlopt. But
> how do I know that there is one at all? I don't want to build a deb on
> archs that don't have ocamlopt. Using arch=i386,alpha,... in the
> control field would need a change when more archs get a ocamlopt. i
> would prefer a more automatic way.

Mmm, i thought some day about having a file shipped with the ocaml
package that list all supported architectures, so you could simply add
this to the control file (with a varsubst or something such).

But i am not entirely sure if it will work or not.

That said, if you build depend on ocaml-native-compilers, then the
package will not be build on arches that don't support the native
compilers, but i guess this is not a solution.

I am not sure there is a clean solution for this one, maybe we should
ask for help on debian-mentors ?

> Shouldn't the ocaml.deb provide ocamlopt or ocaml-nativ-compiler so
> that one can simply Build-depend on it? Or do all archs that have
> ocamlopt also have ocaml-native-compiler (which provides
> ocaml-best-compiler)? Should I just Build-depend on

Yes and now, mostly yes, the exception was ia64 with ocaml 3.04, where
the native code compiler was broken so it was not able to build the .opt
stuff. But then, again, i should maybe have removed all of the ia64
native code support in this case.

> ocaml-native-compiler or ocaml-best-compiler even though the normal
> ocamlopt would suffice?

Don't depend on ocaml-best-compiler, since it will be provided by ocaml
on arches which do not support the native code compilers.

But anyway, i don't believe the build depend on ocaml-native-compiles is
a clean way of doing this.

Friendly,

Sven Luther



Reply to: