From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4696F820A1 for ; Fri, 9 Aug 2013 11:43:54 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of steph@glondu.net) identity=pra; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="steph@glondu.net"; x-sender="steph@glondu.net"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of steph@glondu.net) identity=mailfrom; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="steph@glondu.net"; x-sender="steph@glondu.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@redisdead.crans.org designates 138.231.136.39 as permitted sender) identity=helo; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="steph@glondu.net"; x-sender="postmaster@redisdead.crans.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsAAIS4BFKK54gnmWdsb2JhbABbhx64SoJ1gRkWDgEBAQEBCAsLBxQogiUBBSMEUQEQCxoCBRYLAgIJAwIBAgFFBg0BBwKIDASoFZEsgSiOQDMHgmeBJwOXYYYmjkM X-IPAS-Result: ApsAAIS4BFKK54gnmWdsb2JhbABbhx64SoJ1gRkWDgEBAQEBCAsLBxQogiUBBSMEUQEQCxoCBRYLAgIJAwIBAgFFBg0BBwKIDASoFZEsgSiOQDMHgmeBJwOXYYYmjkM X-IronPort-AV: E=Sophos;i="4.89,844,1367964000"; d="scan'208";a="28908916" Received: from redisdead.crans.org ([138.231.136.39]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 09 Aug 2013 11:43:53 +0200 Received: from [10.125.1.2] (fbx.up7.fr [81.56.96.177]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by redisdead.crans.org (Postfix) with ESMTPSA id 72DB12142; Fri, 9 Aug 2013 11:43:53 +0200 (CEST) Message-ID: <5204B9D9.2060500@glondu.net> Date: Fri, 09 Aug 2013 11:43:53 +0200 From: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7 MIME-Version: 1.0 To: Maxence Guesdon CC: caml-list@inria.fr References: <20130809110908.0c2145c9@alcazar> <5204B5E7.9000409@glondu.net> <20130809113348.3a174c2f@alcazar> In-Reply-To: <20130809113348.3a174c2f@alcazar> X-Enigmail-Version: 1.5.1 OpenPGP: id=49881AD3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Problem native dynlink loading cryptokit Le 09/08/2013 11:33, Maxence Guesdon a =C3=A9crit : >>> Here is a test program: >>> [...] >>> gives me the following error: >>> >>> Fatal error: exception Failure("error loading shared >>> library: /home/guesdon/.opam/4.00.1/lib/cryptokit/cryptokit.cmxs: >>> undefined symbol: caml_sha1_init") >>> >>> Am I doing something wrong ? Or is something missing in cryptokit >>> build ? >> >> It works for me (with system packages). >> >> caml_sha1_init should be in cryptokit.cmxs. The output of >> >> objdump -j .text -T /path/to/cryptokit.cmxs >> >> should contain all the C functions defined in cryptokit, plus some >> caml_curry* functions and camlCryptokit__* functions (compiled from >> OCaml). Is it true for you? >=20 > No, I only have camlCryptokit__sha1_init_3833 which I assume corresponds > to the function of src/cryptokit.ml: > external sha1_init: unit -> string =3D "caml_sha1_init" Then, I suspect stubs were forgotten during the build of cryptokit.cmxs. In the output of: ocamlobjinfo /path/to/cryptokit.cmxa there should be the following lines: Extra C object files: -lcryptokit_stubs -lz Extra C options: Do you have the same lines? If so, maybe -linkall is missing in the call to ocamlopt -shared (the one that builds cryptokit.cmxs). Cheers, --=20 St=C3=A9phane