caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Sebastien Ferre <sbf@aber.ac.uk>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Dbm: linking problem
Date: Fri, 23 Apr 2004 17:32:42 +0200	[thread overview]
Message-ID: <1082734361.8849.162.camel@ice.gerd-stolpmann.de> (raw)
In-Reply-To: <40893769.2080903@aber.ac.uk>

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


      reply	other threads:[~2004-04-23 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23 15:34 Sebastien Ferre
2004-04-23 15:32 ` Gerd Stolpmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1082734361.8849.162.camel@ice.gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=sbf@aber.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).