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

Re: Automatic dependencies for shared modules



Le 28/05/2011 06:54, Romain Beauxis a écrit :
>> I meant building sdl.cmxs in ocaml-sdl package. It's quite easy and can be
>> done in debian/rules. Have a look at postgresql-ocaml, for example. Then the
>> META, *.cmxs and *.cma should be moved to the runtime package. dh_ocaml
>> should then infer the right dependencies.
> 
> I think this highly impractical. We'd have to implement the whole
> dependency resolving in order to load the modules in the right order
> in the application.. Clearly not an option!

Findlib does most of the job. Have a look at baselib/ocsigen_loader.ml
in ocsigen for an example.

>> You said in your original e-mail that you didn't want any ocaml
>> dependencies. Did you try the --nodefined-map command-line option of
>> dh_ocaml, then?
> 
> That does not work for bytecode modules. For instance, the vorbis
> module include Vorbis and I do want to therefore get a dependency on
> the right libvorbis-ocaml-xxyyzz..
> [...] Therefore, I
> propose to include an option in dh_ocaml that would allow to accept to
> reference modules that are present in a plugin and are also provided
> by another package.

This is what --nodefined-map is supposed to do. But actually, this
option what thought for packages providing an alternative implementation
of one module, so it might explain the missing dependency you are
talking about. I would suggest you to look around --nodefined-map code
path to implement what you want.


Cheers,

-- 
Stéphane


Reply to: