caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Adding libraries to mod_caml
@ 2004-04-14 19:30 Matt Gushee
  2004-04-14 20:10 ` Michael Hoisie
  2004-04-15 17:46 ` Benjamin Geer
  0 siblings, 2 replies; 8+ messages in thread
From: Matt Gushee @ 2004-04-14 19:30 UTC (permalink / raw)
  To: caml-list

Hello, all (& Rich) --

I have written a library that I would like to use with mod_caml. The
library is pure OCaml, but it depends on another pure OCaml library
which in turn depends on Unix and Dbm. I have tried modifying the
mod_caml Makefile to include my library--specifically, I added the
library path to OCAMLCINCS and the .cma file to ALL_CMAS, but I continue
to get 'unbound module' errors.

What else do I need to do?

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-14 19:30 [Caml-list] Adding libraries to mod_caml Matt Gushee
@ 2004-04-14 20:10 ` Michael Hoisie
  2004-04-14 20:42   ` Matt Gushee
  2004-04-15 17:46 ` Benjamin Geer
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Hoisie @ 2004-04-14 20:10 UTC (permalink / raw)
  To: caml-list

Try adding:
CamlLoad /path/to/your.cma
to your httpd.conf

-Mike

On Wed, 14 Apr 2004 13:30:03 -0600
Matt Gushee <mgushee@havenrock.com> wrote:

> Hello, all (& Rich) --
> 
> I have written a library that I would like to use with mod_caml. The
> library is pure OCaml, but it depends on another pure OCaml library
> which in turn depends on Unix and Dbm. I have tried modifying the
> mod_caml Makefile to include my library--specifically, I added the
> library path to OCAMLCINCS and the .cma file to ALL_CMAS, but I continue
> to get 'unbound module' errors.
> 
> What else do I need to do?
> 

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-14 20:10 ` Michael Hoisie
@ 2004-04-14 20:42   ` Matt Gushee
  2004-04-15  9:00     ` Richard Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Matt Gushee @ 2004-04-14 20:42 UTC (permalink / raw)
  To: caml-list

On Wed, Apr 14, 2004 at 01:10:53PM -0700, Michael Hoisie wrote:
> Try adding:
> CamlLoad /path/to/your.cma
> to your httpd.conf

Ah! Well, that's a start. But now when I restart Apache, I get:

  Failure("error while linking /opt/ocaml/lib/site-lib/ocre/ocre.cma")
  Undefined global 'Stream'.

??

I don't think I want to CamlLoad the whole standard library ... is there
something in the mod_caml Makefile I can do to make sure Stream (and
whatever else I need) is included?

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-14 20:42   ` Matt Gushee
@ 2004-04-15  9:00     ` Richard Jones
  2004-04-15  9:34       ` Basile Starynkevitch
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Jones @ 2004-04-15  9:00 UTC (permalink / raw)
  To: caml-list

On Wed, Apr 14, 2004 at 02:42:57PM -0600, Matt Gushee wrote:
> Ah! Well, that's a start. But now when I restart Apache, I get:
> 
>   Failure("error while linking /opt/ocaml/lib/site-lib/ocre/ocre.cma")
>   Undefined global 'Stream'.

I'm not really familiar with Stream.  Is that included in the standard
library (ie. stdlib.cma)?

I'm not sure why the ALL_CMAS trick you mention in your original
posting doesn't work.  Perhaps you didn't install the new version of
mod_caml or restart Apache?

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
If I have not seen as far as others, it is because I have been
standing in the footprints of giants.  -- from Usenet

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-15  9:00     ` Richard Jones
@ 2004-04-15  9:34       ` Basile Starynkevitch
  2004-04-15 18:35         ` Matt Gushee
  0 siblings, 1 reply; 8+ messages in thread
From: Basile Starynkevitch @ 2004-04-15  9:34 UTC (permalink / raw)
  To: Richard Jones, caml-list

On Thu, Apr 15, 2004 at 10:00:07AM +0100, Richard Jones wrote:
> On Wed, Apr 14, 2004 at 02:42:57PM -0600, Matt Gushee wrote:
> > Ah! Well, that's a start. But now when I restart Apache, I get:
> > 
> >   Failure("error while linking /opt/ocaml/lib/site-lib/ocre/ocre.cma")
> >   Undefined global 'Stream'.
> 
> I'm not really familiar with Stream.  Is that included in the standard
> library (ie. stdlib.cma)?

There is a Stream module inside the standard library. It is mostly
useful when using the stream syntactic extension (provided by camlp4).


-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
http://cristal.inria.fr/~starynke --- all opinions are only mine 

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-14 19:30 [Caml-list] Adding libraries to mod_caml Matt Gushee
  2004-04-14 20:10 ` Michael Hoisie
@ 2004-04-15 17:46 ` Benjamin Geer
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Geer @ 2004-04-15 17:46 UTC (permalink / raw)
  To: Matt Gushee; +Cc: caml-list

Matt Gushee wrote:
> I added the
> library path to OCAMLCINCS and the .cma file to ALL_CMAS, but I continue
> to get 'unbound module' errors.

I had a similar problem with CamlTemplate; you might have to do what I 
did, which is link a .cmo into mod_caml that calls a trivial function in 
CamlTemplate.  This seemed to be necessary to convince Dynlink to load 
the things CamlTemplate depends on.  See camlTemplateInit.ml in the 
CamlTemplate distribution[1], and the use of camlTemplateInit.cmo in 
mod_caml's Makefile.

Ben

[1] http://saucecode.org/camltemplate/

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-15  9:34       ` Basile Starynkevitch
@ 2004-04-15 18:35         ` Matt Gushee
  2004-04-15 21:50           ` Richard Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Matt Gushee @ 2004-04-15 18:35 UTC (permalink / raw)
  To: caml-list

On Thu, Apr 15, 2004 at 10:00:07AM +0100, Richard Jones wrote:
> On Wed, Apr 14, 2004 at 02:42:57PM -0600, Matt Gushee wrote:
> > Ah! Well, that's a start. But now when I restart Apache, I get:
> > 
> >   Failure("error while linking /opt/ocaml/lib/site-lib/ocre/ocre.cma")
> >   Undefined global 'Stream'.
> 
> I'm not really familiar with Stream.  Is that included in the standard
> library (ie. stdlib.cma)?

Oh, yes. That's why I made that facetious remark about CamlLoading the
standard library.

> I'm not sure why the ALL_CMAS trick you mention in your original
> posting doesn't work.  Perhaps you didn't install the new version of
> mod_caml or restart Apache?

The above error was triggered by restarting Apache. However, I was in
fact not using the latest version (it was 1.0.6). I must confess I have
this semi-philosophical, semi-emotional resistance to *blindly*
upgrading things in the hope that it will fix the problem of the moment.
But if you think it will help I'll try it.

On Thu, Apr 15, 2004 at 11:34:47AM +0200, Basile Starynkevitch wrote:
> 
> There is a Stream module inside the standard library. It is mostly
> useful when using the stream syntactic extension (provided by camlp4).

Almost true, but not quite: we are specifically admonished *not* to use
Stream module streams (e.g. Stream.of_string "abcde") with literal
streams ([< 'foo; 'bar >])--which limits the usefulness of the Stream
module. But it can be helpful for tasks that involve scanning a string
character-by-character.

Many thanks to all who responded. I'll report back after trying the
latest mod_caml.

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

-------------------
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] 8+ messages in thread

* Re: [Caml-list] Adding libraries to mod_caml
  2004-04-15 18:35         ` Matt Gushee
@ 2004-04-15 21:50           ` Richard Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Jones @ 2004-04-15 21:50 UTC (permalink / raw)
  To: caml-list

On Thu, Apr 15, 2004 at 12:35:56PM -0600, Matt Gushee wrote:
> The above error was triggered by restarting Apache. However, I was in
> fact not using the latest version (it was 1.0.6). I must confess I have
> this semi-philosophical, semi-emotional resistance to *blindly*
> upgrading things in the hope that it will fix the problem of the moment.
> But if you think it will help I'll try it.

I think if you're doing any serious mod_caml development, then
following the CVS head is probably a good idea.  You can easily get
the latest CVS updates from savannah; see here:

https://savannah.nongnu.org/cvs/?group=modcaml

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/

-------------------
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] 8+ messages in thread

end of thread, other threads:[~2004-04-15 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-14 19:30 [Caml-list] Adding libraries to mod_caml Matt Gushee
2004-04-14 20:10 ` Michael Hoisie
2004-04-14 20:42   ` Matt Gushee
2004-04-15  9:00     ` Richard Jones
2004-04-15  9:34       ` Basile Starynkevitch
2004-04-15 18:35         ` Matt Gushee
2004-04-15 21:50           ` Richard Jones
2004-04-15 17:46 ` Benjamin Geer

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