caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Compiling a library with findlib
@ 2007-05-14  7:06 Sébastien Hinderer
  2007-05-14 17:37 ` [Caml-list] " Eric Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: Sébastien Hinderer @ 2007-05-14  7:06 UTC (permalink / raw)
  To: caml-list

Dear all,

I am wondering what would be cleanest way of compiling a library
including C stubs using the ocamlfind program.

The library consists in the files lib.ml, lib.mli, lib_stubs.c and
constants.ml which is generated by awk scripts from C sources.

For the moment, the configure script detects wether ocamlfind is
installed or not. If it is not installed, ocamlmklib is used and
produces lib.cma, lib.cmxa, lib.a and lib.so which all seem to be
useful.

When ocamlfind is installed, though, I have no idea how to produce lib.a
and lib.so which seem to be necessary.
In particular, ocamlfind does not seem to have an interface to the
ocamlmklib connand.
So the questions I have are:

1. Is it necessary to compile/install the lib;a and lib.so files ?
2. How can these files be produced (in addition to the .cma and .cmxa
files) on a system where ocamlfindlib is installed ?

Thanks a lot for your help,
Sébastien.


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

* Re: [Caml-list] Compiling a library with findlib
  2007-05-14  7:06 Compiling a library with findlib Sébastien Hinderer
@ 2007-05-14 17:37 ` Eric Cooper
  2007-05-15  9:09   ` Sébastien Hinderer
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Cooper @ 2007-05-14 17:37 UTC (permalink / raw)
  To: caml-list

On Mon, May 14, 2007 at 09:06:09AM +0200, Sébastien Hinderer wrote:
> I am wondering what would be cleanest way of compiling a library
> including C stubs using the ocamlfind program.

If you use the OCamlMakefile, the "byte-code-library" and
"native-code-library" targets take care of this very painlessly.

-- 
Eric Cooper             e c c @ c m u . e d u


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

* Re: Compiling a library with findlib
  2007-05-14 17:37 ` [Caml-list] " Eric Cooper
@ 2007-05-15  9:09   ` Sébastien Hinderer
  2007-05-15 10:06     ` [Caml-list] " Robert Roessler
  0 siblings, 1 reply; 6+ messages in thread
From: Sébastien Hinderer @ 2007-05-15  9:09 UTC (permalink / raw)
  To: caml-list

Hi,

Eric Cooper :
> On Mon, May 14, 2007 at 09:06:09AM +0200, Sébastien Hinderer wrote:
> > I am wondering what would be cleanest way of compiling a library
> > including C stubs using the ocamlfind program.
> 
> If you use the OCamlMakefile, the "byte-code-library" and
> "native-code-library" targets take care of this very painlessly.

As I said, I'd prefer not to use OCamlMakefile if possible... Does such
a choice look unwise to you all ?

Cheers,
Sébastien.


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

* Re: [Caml-list] Re: Compiling a library with findlib
  2007-05-15  9:09   ` Sébastien Hinderer
@ 2007-05-15 10:06     ` Robert Roessler
  2007-05-15 13:04       ` Eric Cooper
  2007-05-15 13:22       ` Sébastien Hinderer
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Roessler @ 2007-05-15 10:06 UTC (permalink / raw)
  To: Caml-list

Sébastien Hinderer wrote:
> ...
> As I said, I'd prefer not to use OCamlMakefile if possible... Does such
> a choice look unwise to you all ?

Not at all... but then, perhaps like you, I believe that "make" is 
perfectly adequate for most small-to-medium build tasks, and that 
truly "open" software is designed to be built with standard tools 
available in either the stock distribution of OCaml or at least easily 
found for the dominant platforms: Windows, the major *nix distros, and 
Mac OS X. ;)

Robert Roessler
roessler@rftp.com
http://www.rftp.com


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

* Re: [Caml-list] Re: Compiling a library with findlib
  2007-05-15 10:06     ` [Caml-list] " Robert Roessler
@ 2007-05-15 13:04       ` Eric Cooper
  2007-05-15 13:22       ` Sébastien Hinderer
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Cooper @ 2007-05-15 13:04 UTC (permalink / raw)
  To: Caml-list

On Tue, May 15, 2007 at 03:06:36AM -0700, Robert Roessler wrote:
> Sébastien Hinderer wrote:
> >...
> >As I said, I'd prefer not to use OCamlMakefile if possible... Does such
> >a choice look unwise to you all ?
> 
> Not at all... but then, perhaps like you, I believe that "make" is 
> perfectly adequate for most small-to-medium build tasks, and that 
> truly "open" software is designed to be built with standard tools 
> available in either the stock distribution of OCaml or at least easily 
> found for the dominant platforms: Windows, the major *nix distros, and 
> Mac OS X. ;)

Sorry, I must have missed the OP's objection to using OCamlMakefile.
But in any case, it's just a (big, complex) Makefile, so even if you
don't want to use it as-is, you can look at what it does, and adopt a
subset of its rules for your application.

-- 
Eric Cooper             e c c @ c m u . e d u


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

* Re: Re: Compiling a library with findlib
  2007-05-15 10:06     ` [Caml-list] " Robert Roessler
  2007-05-15 13:04       ` Eric Cooper
@ 2007-05-15 13:22       ` Sébastien Hinderer
  1 sibling, 0 replies; 6+ messages in thread
From: Sébastien Hinderer @ 2007-05-15 13:22 UTC (permalink / raw)
  To: caml-list, Caml-list

Robert Roessler :
> Not at all... but then, perhaps like you, I believe that "make" is 
> perfectly adequate for most small-to-medium build tasks, and that 
> truly "open" software is designed to be built with standard tools 
> available in either the stock distribution of OCaml or at least easily 
> found for the dominant platforms: Windows, the major *nix distros, and 
> Mac OS X. ;)

Agreed.
Sébastien.


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

end of thread, other threads:[~2007-05-15 13:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14  7:06 Compiling a library with findlib Sébastien Hinderer
2007-05-14 17:37 ` [Caml-list] " Eric Cooper
2007-05-15  9:09   ` Sébastien Hinderer
2007-05-15 10:06     ` [Caml-list] " Robert Roessler
2007-05-15 13:04       ` Eric Cooper
2007-05-15 13:22       ` Sébastien Hinderer

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).