From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA20139; Mon, 28 Jul 2003 19:41:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA30660 for ; Mon, 28 Jul 2003 19:41:55 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h6SHftT05312 for ; Mon, 28 Jul 2003 19:41:55 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 19hC0Q-0006BT-00 for ; Mon, 28 Jul 2003 18:41:54 +0100 Date: Mon, 28 Jul 2003 18:41:54 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Dynlink problems Message-ID: <20030728174154.GA19639@redhat.com> References: <20030728094918.GA19609@redhat.com> <005201c354f2$1f2df430$ca00a8c0@warp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005201c354f2$1f2df430$ca00a8c0@warp> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dynlink:01 caml-:01 usr:01 dynamically:01 httpd:01 stdlib:01 freshmeat:01 autoconf:01 automake:01 compiles:01 rpms:01 ltd:98 linked:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I still can't work out the linking problems. http://www.annexia.org/tmp/mod_caml-0.02.tar.gz The situation is this: * /usr/sbin/apache is the main program, and exports symbols like ap_pstrdup to modules. * mod_caml.so is my module. This is written in C & OCaml (caml_init.ml) 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 part. * Plug-in OCaml programs (eg: eg_print_trans.ml) 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??). Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - 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. 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