caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] a hard road to a new toplevel
@ 2002-02-20 20:14 Alexander V. Voinov
  2002-02-21 14:12 ` Xavier Leroy
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander V. Voinov @ 2002-02-20 20:14 UTC (permalink / raw)
  To: caml-list

Hi All,

I've recompiled (on Linux) a new version of CDK from the CVS, but try to
use it with a stock distribution of OCaml 3.04, because it does not
compile fully on the platform I'm interested in: Solaris 2.7. I try just
to consider it as a set of binary modules (disregarding those which fail
to recompile). I copied all of them into the main Caml library directory
and try to make a new toplevel, which would have access to a module I'm
interested in: Unix2. I started from 

ocamlmktop unix2.cmo -o unix2top

and subsequently added more and more modules to the absence of which it
complained. It took not less than one hour of trials. Resulting in this:

ocamlmktop string2.cmo file.cmo str.cma netstring_str.cmo
netencoding.cmo base64.cmo debug.cmo unix.cma timeout.cmo log.cmo
unix.cma concur.cmo bufrw.cmo activebuffer.cmo str.cma unix.cma 
/usr/lib/ocaml/select.o /usr/lib/ocaml/libunix2_c.a string2.cmo
filename2.cmo printexc2.cmo sys2.cmo unix2.cmo netstring_str.cmo
netencoding.cmo network.cma unix2.cmo -o unix2top

What did I do wrong? It is possible to get a transivite closure of all
these dependencies in one shot? BTW the last step were purely gcc/ld
dependecies on select.o and libunix2_c.a and there is now way to
indicate libraries in the Unix style via -lLIB.

Thank you

Alexander
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] a hard road to a new toplevel
  2002-02-20 20:14 [Caml-list] a hard road to a new toplevel Alexander V. Voinov
@ 2002-02-21 14:12 ` Xavier Leroy
  2002-02-21 23:01   ` Alexander V. Voinov
  0 siblings, 1 reply; 3+ messages in thread
From: Xavier Leroy @ 2002-02-21 14:12 UTC (permalink / raw)
  To: Alexander V. Voinov; +Cc: caml-list

> and try to make a new toplevel, which would have access to a module I'm
> interested in: Unix2. I started from 
> 
> ocamlmktop unix2.cmo -o unix2top
> 
> and subsequently added more and more modules to the absence of which it
> complained. It took not less than one hour of trials. Resulting in this:
> 
> ocamlmktop string2.cmo file.cmo str.cma netstring_str.cmo
> netencoding.cmo base64.cmo debug.cmo unix.cma timeout.cmo log.cmo
> unix.cma concur.cmo bufrw.cmo activebuffer.cmo str.cma unix.cma 
> /usr/lib/ocaml/select.o /usr/lib/ocaml/libunix2_c.a string2.cmo
> filename2.cmo printexc2.cmo sys2.cmo unix2.cmo netstring_str.cmo
> netencoding.cmo network.cma unix2.cmo -o unix2top
> 
> What did I do wrong? It is possible to get a transivite closure of all
> these dependencies in one shot?

Library files (.cma files) provide an answer to this issue: *if* the
authors of the library did a good job, they built a .cma file that
groups all .cmo files for their library, in the right order.  Then,
the final user simply links with the .cma file, and the OCaml linker
picks only the relevant .cmo files from the .cma.

If all you have initially is a bunch of .cmo files with no docs, then
I agree you run into the problem you describe.

> BTW the last step were purely gcc/ld
> dependecies on select.o and libunix2_c.a and there is now way to
> indicate libraries in the Unix style via -lLIB.

Not true:  -cclib -lunix2_c will pass a "-lunix2_c" option to gcc and ld.

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] a hard road to a new toplevel
  2002-02-21 14:12 ` Xavier Leroy
@ 2002-02-21 23:01   ` Alexander V. Voinov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander V. Voinov @ 2002-02-21 23:01 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list

Hi Xavier,

Xavier Leroy wrote:
> Library files (.cma files) provide an answer to this issue: *if* the
> authors of the library did a good job, they built a .cma file that
> groups all .cmo files for their library, in the right order.  Then,
> the final user simply links with the .cma file, and the OCaml linker
> picks only the relevant .cmo files from the .cma.

I see, this indicates what *I* did wrong: I'd better take a closer look
at the available .cma files. With this it boiled down to:

ocamlmktop extlib.cma unix.cma unix2.cma -o unix2top

> Not true:  -cclib -lunix2_c will pass a "-lunix2_c" option to gcc and ld.

For some reason it didn't work for me with the stock ocaml-3.04 + cvs
cdk, but I rolled back to cdk-3.02.

Thank you!

Alexander
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-21 23:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20 20:14 [Caml-list] a hard road to a new toplevel Alexander V. Voinov
2002-02-21 14:12 ` Xavier Leroy
2002-02-21 23:01   ` Alexander V. Voinov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).