Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Dynlink problems
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Dynlink problems
I still can't work out the linking problems.

The situation is this:

* /usr/sbin/apache is the main program, and exports symbols like
  ap_pstrdup to modules.

* is my module. This is written in C & OCaml (
  and requires the OCaml Apache library to run.

* The Apache library is also written in a mix of C & OCaml, and must be
  loaded dynamically because it contains shared data structures in the C

* Plug-in OCaml programs (eg: need to be dynamically
  linked with OCaml Apache lib, and access external symbols in
  /usr/sbin/apache (because these are needed by Apache).

So far I get strange errors like:

Syntax error on line 84 of /home/rich/d/merjis/test/mod_caml/test/httpd.conf:
error while linking /home/rich/d/merjis/test/mod_caml/eg_print_trans.cma.
Reference to undefined global `Callback'

I can fix that one by added stdlib.cma to the list of libraries linked
into eg_print_trans.cma, but that seems the wrong thing to do. Even
when I do this, I get:

Syntax error on line 84 of /home/rich/d/merjis/test/mod_caml/test/httpd.conf:
error while linking /home/rich/d/merjis/test/mod_caml/eg_print_trans.cma.
The external function `caml_input' is not available

.. which I haven't been able to fix because -lcamlrun is only available
as a static library (why??).


Richard Jones.
Merjis Ltd. - all your business data are belong to you.
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: