English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Rewriting the Digest module causes linking errors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-03-17 (09:53)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] Rewriting the Digest module causes linking errors
"Mark Shinwell" <mshinwell@janestreet.com> writes:

> On Wed, Mar 17, 2010 at 09:27:30AM +0100, Goswin von Brederlow wrote:
>> I want to rewrite the Digest module to expose a more lowlevel interface
>> to the md5 digest and add support to digest Bigarrays. I've patched the
>> respective files involved and it all looks alright but when I try to
>> build ocaml I get the following error:
>> File "_none_", line 1, characters 0-1:
>> Error: Error while linking boot/stdlib.cma(Digest):
>> The external function `caml_md5_update_string' is not available
>> make[2]: *** [ocamlc] Error 2
>> make[2]: Leaving directory `/home/mrvn/src/debian/ocaml/ocaml-3.11.2'
>> make[1]: *** [world] Error 2
>> make[1]: Leaving directory `/home/mrvn/src/debian/ocaml/ocaml-3.11.2'
>> make: *** [build-stamp] Error 2
>> Can anyone explain why the new functions are not available?
> You need to bootstrap the compiler.  I think "make bootstrap" will do the
> trick, although you may have to run it twice if I remember correctly.
> Mark

Well, it is a bootstraping problem it seems but "make bootstrap" is not
the answere.

I need to build this in two passes. First only patch md5.[ch] and build
ocamlc. Then patch the rest and build with the ocamlc from the first
build copied to boot/.

Seems like ocamlc always uses its internal list of primitives even if it
compiles for a new runtime that will have different primitives.