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 RAA17621; Fri, 23 Apr 2004 17:32:49 +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 RAA17602 for ; Fri, 23 Apr 2004 17:32:48 +0200 (MET DST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3NFWlYM027407 for ; Fri, 23 Apr 2004 17:32:47 +0200 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BH2fV-0008Ln-00; Fri, 23 Apr 2004 17:32:45 +0200 Received: from [80.129.114.185] (helo=gate.gerd-stolpmann.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BH2fV-0007RS-00; Fri, 23 Apr 2004 17:32:45 +0200 Received: from ice.gerd-stolpmann.de (ice.gerd-stolpmann.de [192.168.0.13]) by gate.gerd-stolpmann.de (Postfix) with ESMTP id 1AB355816; Fri, 23 Apr 2004 17:32:44 +0200 (CEST) Received: by ice.gerd-stolpmann.de (Postfix, from userid 1000) id D9612B032; Fri, 23 Apr 2004 17:32:42 +0200 (CEST) Subject: Re: [Caml-list] Dbm: linking problem From: Gerd Stolpmann To: Sebastien Ferre Cc: caml-list@inria.fr In-Reply-To: <40893769.2080903@aber.ac.uk> References: <40893769.2080903@aber.ac.uk> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1082734361.8849.162.camel@ice.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 23 Apr 2004 17:32:42 +0200 X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:a6865a839c0178d9aa0ce41878507ea2 X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 gerd:01 stolpmann:01 fre:99 2004:99 ocamlrun:01 ocamlrun:01 ndbm:01 ndbm:01 gerd:01 stolpmann:01 viktoriastr:01 64293:01 darmstadt:01 libc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fre, 2004-04-23 at 17:34, Sebastien Ferre wrote: > Hello, > > I try to build a cross-platform program that uses the > Dbm library. More specifically, I want to use a version > of DBM that allows for arbitrary size data (like GDBM, > unlike DBM). > > On my RedHat station, it works fine as 'libndbm.a' is > linked to 'libdb2.a'. (One database file is created with > extension 'db'.) > > But on a Solaris station, I got the Dbm_error("dbm_store failed"), > and from my experiments it seems that this occurs when > the data is over 1024 bytes. I don't know which library > is actually used. (2 database files are created with extension > 'dir' and 'pag'.) However, I found the library 'libgdbm.a' > but I don't know how to force ocamlrun to link this > library instead of the default one. > > My questions are: > 1. How do I know which libraries are to be linked at execution > time (by ocamlrun) ? > 2. Can I specify a different library to be used, and how ? > (possibly without recompiling the OCaml library Dbm) > > Thanks for your help! For GODI, I had the same problem: How to force linking with gdbm when a system-wide ndbm is present (often enough, directly in libc). I could achieve this only with a quite heavy patch: https://gps.dynxs.de/wwwsvn/trunk307/godi/godi-ocaml-src/patches/patch-aa-configure?view=auto&rev=143 https://gps.dynxs.de/wwwsvn/trunk307/godi/godi-ocaml-src/patches/patch-ab-cldbm?view=auto&rev=130 The reason is that one cannot call the ndbm functions, one must call the corresponding gdbm functions instead. The ndbm layer for gdbm generally does not work in this case. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de ------------------------------------------------------------ ------------------- 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