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 MAA04906; Sat, 31 Jul 2004 12:19:41 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA05418 for ; Sat, 31 Jul 2004 12:19:40 +0200 (MET DST) Received: from mwinf0304.wanadoo.fr (smtp3.wanadoo.fr [193.252.22.28]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6VAJdSH026172 for ; Sat, 31 Jul 2004 12:19:39 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0304.wanadoo.fr (SMTP Server) with SMTP id 0B7B8A804087; Sat, 31 Jul 2004 12:19:39 +0200 (CEST) Received: from pegasos (AStrasbourg-251-1-25-109.w82-126.abo.wanadoo.fr [82.126.215.109]) by mwinf0304.wanadoo.fr (SMTP Server) with ESMTP id B9EE1A804098; Sat, 31 Jul 2004 12:19:38 +0200 (CEST) Received: from luther by pegasos with local (Exim 4.34) id 1Bqr11-0004t0-SJ; Sat, 31 Jul 2004 12:22:59 +0200 Date: Sat, 31 Jul 2004 12:22:59 +0200 To: Richard Jones Cc: Sven Luther , caml-list@inria.fr Subject: Re: [Caml-list] ANNOUNCE: Wiki software written in OCaml Message-ID: <20040731102259.GA18765@pegasos> References: <20040730075621.GA5996@annexia.org> <20040730080245.GA6075@annexia.org> <20040730082701.GA30962@pegasos> <20040730084658.GA6898@annexia.org> <20040730090617.GA31469@pegasos> <20040730090647.GA7218@annexia.org> <20040730091939.GA31646@pegasos> <20040730092349.GA7444@annexia.org> <20040730120320.GA813@pegasos> <20040730160116.GA12848@annexia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20040730160116.GA12848@annexia.org> User-Agent: Mutt/1.5.6+20040523i From: Sven Luther X-Miltered: at concorde with ID 410B723B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 wiki:01 sven:01 luther:01 sven:01 luther:01 2004:99 2004:99 ocamlc:01 -linkall:01 usr:01 pcre:01 usr:01 dbi:99 postgres:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Jul 30, 2004 at 05:01:16PM +0100, Richard Jones wrote: > On Fri, Jul 30, 2004 at 02:03:20PM +0200, Sven Luther wrote: > > Mmm, i adapted it to ocaml 3.08, and added the missing ocamldbi > > build-dependency, since it failed somehow because of a double -I in the > > Makefile. > > > > Now, it fails with : > > > > ocamlc -linkall -custom -g -w s -I /usr/lib/ocaml/3.08/pcre -I > > /usr/lib/ocaml/3.08/dbi -I /usr/include/apache-1.3 -I > > /usr/lib/ocaml/3.08/postgres postgres.cma dynlink.cma str.cma pcre.cma > > unix.cma dbi.cma mod_caml_c.o mod_caml.cmo apache_c.o wrappers.o apache.cmo > > mod_caml_config.cmo cgi_escape.cmo template.cmo cgi.cmo -o mod_caml.so \ > > -cclib "-fPIC -shared -L/usr/lib/ocaml/3.08/postgres -lpostgres -lpq > > -lcamlrun -ltermcap -lunix -lstr " > > Error while linking /usr/lib/ocaml/3.08/dbi/dbi.cma(Dbi_mysql): > > Reference to undefined global `Mysql' > > make[1]: *** [mod_caml.so] Erreur 2 > > Yes, this is interesting ... > > It's because Dbi is built (by John) with MySQL support. Thus > /usr/lib/ocaml/*/dbi/dbi.cma contains a module (Dbi_mysql) which > depends on (the OCaml module) Mysql. > > John's libdbi-ocaml package suggests libmysql-ocaml-dev, but doesn't > require it. This works fine provided you're just linking a standalone > program against the Dbi library, because unless the standalone program > deliberately links against Dbi_mysql, nothing will attempt to load the > missing Mysql module. > > So far, so good. Now here's the problem: ocamldbi contains a > mechanism to build handles of any type (Dbi.Factory.connect "postgres" > "store") for example, which is implemented using a complex > registration mechanism. mod_caml requires this, because it provides a > way to pool database handles between requests. > > Dbi.Factory loads any available module, depending on how it was > compiled. Thus when you link mod_caml, and if ocamldbi was compiled > to depend on Mysql, then mod_caml depends on Mysql too! > > So the upshot is that libmysql-ocaml-dev is a real dependency, not > just a 'Suggest:'ion. Well, the problem still happens with libmysql-ocaml-dev installed though, which is what i find strange. Friendly, Sven Luther ------------------- 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