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 7AB427EE49 for ; Thu, 21 Feb 2013 15:34:08 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.51 as permitted sender) identity=mailfrom; client-ip=209.85.214.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f51.google.com) identity=helo; client-ip=209.85.214.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f51.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApcFABgwJlHRVdYzZmdsb2JhbABFrwSJV4ghfggWDgsLEwEUBCOCHwEBBAEnGQEbEgsBAwELBgULAwoNISEBAREBBQEKEgYTEodtAQMJBgyhGowygnuENgoZJwMKWYh7AQUMjCuCUwQHg0ADlFqBXIEdiiyDMxYphCs X-IPAS-Result: ApcFABgwJlHRVdYzZmdsb2JhbABFrwSJV4ghfggWDgsLEwEUBCOCHwEBBAEnGQEbEgsBAwELBgULAwoNISEBAREBBQEKEgYTEodtAQMJBgyhGowygnuENgoZJwMKWYh7AQUMjCuCUwQHg0ADlFqBXIEdiiyDMxYphCs X-IronPort-AV: E=Sophos;i="4.84,709,1355094000"; d="scan'208";a="3908223" Received: from mail-bk0-f51.google.com ([209.85.214.51]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Feb 2013 15:33:41 +0100 Received: by mail-bk0-f51.google.com with SMTP id ik5so4138080bkc.24 for ; Thu, 21 Feb 2013 06:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=L/I3QpMA9m22UPsspkO0Sfr1BujHWeLeZn+eb4vCtEU=; b=orhQx/ldELvl3XysgAVD/quMvDdICF91PL5+XnB7s8jDrvBtw/ncsyReIstFXSb7Cp 9xBg1DE9I/kofrBuweNJy+sYUHZTuOo8QzN9qHqq64vuT8qD6Y7hcGbx4rYjJyEBA+ic OYuFbJZPjLq47LKsXoODjkGqhhPOSk8mI4qgHyofMXoOzjEmMI2pPjz+FY9kB/hYfBjz zOvUQKjfNUvZc1bnWy09mRJTwP8j+jCebwRL4azLER1ONfDIdQLXuvwQjHi5OmvCvqSS g+v6R7Yq3XNNfK+BVkiMZzDSAdw+vOl7uX7lIA4ovSHoUGz3PtXEmdsnsQMhQSU+LeNs HCMQ== X-Received: by 10.204.11.68 with SMTP id s4mr10568631bks.74.1361457220153; Thu, 21 Feb 2013 06:33:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.83.144 with HTTP; Thu, 21 Feb 2013 06:32:58 -0800 (PST) In-Reply-To: <5126203A.9040205@gmail.com> References: <51261C28.3030108@gmail.com> <5126203A.9040205@gmail.com> From: Gabriel Scherer Date: Thu, 21 Feb 2013 15:32:58 +0100 Message-ID: To: Elisa Rebolini Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=0015174a0dfafbf20b04d63cf57b Subject: Re: [Caml-list] Ocamlbuild doc with lacaml module --0015174a0dfafbf20b04d63cf57b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Two remarks: 1. You should use "ocamlfind" to provide you with machine-portable path information on OCaml libraries (this only works with libraries that have ocamlfind support, but that's essentially all libraries worth using, and otherwise it's a packaging bug that you should report to the library author or distributor). So instead of the machine-dependent LIB variable, you could just set: LIB=3D-I,$(shell ocamlfind query lacaml) 2. You don't actually need this include-handling logic as ocamlfind can deal with that for you. To use it from ocamlbuild, the magic option is "-use-ocamlfind", and then using "-pkg(s)" instead of "-lib(s)" option. I was able to reproduce your problem on a test file, and fixed it with the following Makefile: all: ocamlbuild -use-ocamlfind -pkgs bigarray,lacaml,str,unix -verbose 2 molexc.native clean: ocamlbuild -clean doc: ocamlbuild -use-ocamlfind -pkgs bigarray,lacaml,str,unix molexc.docdir/index.html (To see a list of available ocamlfind package, use "ocamlfind list"; see _build/_log for the actual compilation lines that ocamlbuild uses, if you want to reproduce them by hand.) On Thu, Feb 21, 2013 at 2:25 PM, Elisa Rebolini wrote: > I've installed lacaml 7.0.3 by following the installation procedure > 'ocaml setup.ml -configure' > 'ocaml setup.ml -build' > 'ocaml setup.ml -install' > The path to the lacaml package is /usr/local/lib/ocaml/site-lib/lacaml > and my Makefile is > > hostname :=3D $(shell uname -n) > > # Default > LIB=3D-I,+site-lib/lacaml > > ifeq ($(hostname),clastos) > LIB=3D-I,+site-lib/lacaml > endif > > ifeq ($(hostname),bulle) > LIB=3D-I,/usr/local/lib/ocaml/3.12.1/lacaml > endif > > all: > ocamlbuild -libs bigarray,lacaml,str,unix -verbose 2 -cflags $(LI= B) > -lflags $(LIB) molexc.native > > clean: > ocamlbuild -clean > > doc: > ocamlbuild -libs bigarray,lacaml,str,unix -verbose 2 -cflags $(LI= B) > -lflags $(LIB) molexc.docdir/index.html > > thanks > -- > Elisa > > Le 21/02/2013 14:11, Gabriel Scherer a =E9crit : > > It would help to have more precise information about your setup. Could > you > > detail how you installed lacaml on your system, and provide a directory > > tarball for a simple project allowing to reproduce your problem (with t= he > > _tags file etc.)? > > > > On Thu, Feb 21, 2013 at 2:07 PM, Elisa Rebolini > wrote: > > > > Hello list, > > I'm developping a quantum chemistry software with ocaml and use lacaml > > as a binding to the LAPACK and BLAS libraries. > > I have a warning at the compilation with ocamlbuild > > Warning: Failed to build the module Lacaml requested by ocamldep > > mid rule ocaml: ml -> cmo & cmi (%=3Dparser_epsilon ): cache hit > > but the compilation is still successful and the program works as > > expected but when I try to compile the documentation I have an error > > Error: Unbound module Lacaml > > I'm not very skilled (yet?) with caml so any help would be very much > > appreciated. > > Thanks a lot > >> > >> -- > >> Caml-list mailing list. Subscription management and archives: > >> https://sympa.inria.fr/sympa/arc/caml-list > >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > >> Bug reports: http://caml.inria.fr/bin/caml-bugs > >> > > > --0015174a0dfafbf20b04d63cf57b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Two remarks:

1. You should use "ocamlfind" to provide you = with machine-portable path information on OCaml libraries (this only works = with libraries that have ocamlfind support, but that's essentially all = libraries worth using, and otherwise it's a packaging bug that you shou= ld report to the library author or distributor). So instead of the machine-= dependent LIB variable, you could just set:
=A0 LIB=3D-I,$(shell ocamlfind query lacaml)

2. You don't actual= ly need this include-handling logic as ocamlfind can deal with that for you= . To use it from ocamlbuild, the magic option is "-use-ocamlfind"= , and then using "-pkg(s)" instead of "-lib(s)" option.= I was able to reproduce your problem on a test file, and fixed it with the= following Makefile:

all:
=A0=A0=A0 ocamlbuild -use-ocamlfind -pkgs bigarray,lacaml,str,u= nix -verbose 2 molexc.native

clean:
=A0=A0=A0 ocamlbuild -clean
doc:
=A0=A0=A0 ocamlbuild -use-ocamlfind -pkgs bigarray,lacaml,str= ,unix molexc.docdir/index.html

(To see a list of available ocamlfind package, use "ocamlfind list= "; see _build/_log for the actual compilation lines that ocamlbuild us= es, if you want to reproduce them by hand.)

On Thu, Feb 21, 2013 at 2:25 PM, Elisa Rebolini <erebolini@gmail.com= > wrote:
I've installed lacaml 7.0.3 by following the installation procedure
=A0 =A0 =A0 =A0 'ocaml se= tup.ml -configure'
=A0 =A0 =A0 =A0 'ocaml se= tup.ml -build'
=A0 =A0 =A0 =A0 'ocaml se= tup.ml -install'
The path to the lacaml package is /usr/local/lib/ocaml/site-lib/lacaml
and my Makefile is

hostname :=3D $(shell uname -n)

# Default
LIB=3D-I,+site-lib/lacaml

ifeq ($(hostname),clastos)
LIB=3D-I,+site-lib/lacaml
endif

ifeq ($(hostname),bulle)
LIB=3D-I,/usr/local/lib/ocaml/3.12.1/lacaml
endif

all:
=A0 =A0 =A0 =A0 ocamlbuild -libs bigarray,lacaml,str,unix -verbose 2 -cflag= s $(LIB)
-lflags $(LIB) molexc.native

clean:
=A0 =A0 =A0 =A0 ocamlbuild -clean

doc:
=A0 =A0 =A0 =A0 ocamlbuild -libs bigarray,lacaml,str,unix -verbose 2 -cflag= s $(LIB)
-lflags $(LIB) molexc.docdir/index.html

thanks
--
Elisa

Le 21/02/2013 14:11, Gabriel Scherer a =E9crit :
> It would help to have more prec= ise information about your setup. Could you
> detail how you installed lacaml on your system, and provide a director= y
> tarball for a simple project allowing to reproduce your problem (with = the
> _tags file etc.)?
>
> On Thu, Feb 21, 2013 at 2:07 PM, Elisa Rebolini <erebolini@gmail.com> wrote:
>
> Hello list,
> I'm developping a quantum chemistry software with ocaml and use la= caml
> as a binding to the LAPACK and BLAS libraries.
> I have a warning at the compilation with ocamlbuild
> =A0 =A0 =A0 =A0 Warning: Failed to build the module Lacaml requested b= y ocamldep
> =A0 =A0 =A0 =A0 mid rule ocaml: ml -> cmo & cmi (%=3Dparser_eps= ilon ): cache hit
> but the compilation is still successful and the program works as
> expected but when I try to compile the documentation I have an error > =A0 =A0 =A0 =A0 Error: Unbound module Lacaml
> I'm not very skilled (yet?) with caml so any help would be very mu= ch
> appreciated.
> Thanks a lot
>>
>> --
>> Caml-list mailing list. =A0Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginner= s
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>
>

--0015174a0dfafbf20b04d63cf57b--