Version française
Home     About     Download     Resources     Contact us    
Browse thread
3.09.3 release candidate 1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] 3.09.3 release candidate 2
On 9/13/06, Hendrik Tews <tews@cs.ru.nl> wrote:
>
>    > I do not understand why you do need .cmo files when you have a library
>    > (gramlib.cma or camlp4.cma) that includes these modules (note that .a
>    > and .cmxa are also available for native linking).
>
> But with this line of reasoning, plexer.{o,cmx} should not be
> installed either, shouln't it?

Yes, but if I remember correctly it's you that request for these files
to be installed?

So in order to be consistent either one do not expose at all the
content of a library or one install all components (.cmo, .cmi, .cmx,
.o). I tend to prefer the first one.

>
>    because these are *camlp4* modules, camlp4 loads bytecode
>    (only) dynamically from a single cmo file (only).
>
> No, for me it was like that:
> - first I didn't know, there is library with these modules
>   (how to find out what library contains a given module without
>   grepping through the build log?)
Yes not se easy, documentation job...

> - linking gramlib does not work, because the module is not
>   explicitely referenced (only during runtime the program does a
>   dynlink on something else that needs the given module)

> I could fix that with adding an artificial reference like
>
> module XXX = Plexer
>

Yes it's artificial, you can also use -linkall.

>
> (I could still imagine some camlp4 application szenario, where
> you need to use -linkall, but don't want to link all of
> gramlib.cma. Then you would need the cmo itself, right? However,
> this was not the case in my application.)

Yes but it's a choice made by the library designer.

-- 
Nicolas Pouillard