From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTP id 321315D6 for ; Wed, 14 Aug 2019 13:42:50 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.64,385,1559512800"; d="scan'208,217";a="395410148" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 14 Aug 2019 15:42:48 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 220EB7EF26; Wed, 14 Aug 2019 15:42:48 +0200 (CEST) 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 90FC17EF07 for ; Wed, 14 Aug 2019 15:42:40 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=kakadu.hafanana@gmail.com; spf=Pass smtp.mailfrom=kakadu.hafanana@gmail.com; spf=None smtp.helo=postmaster@mail-vs1-f43.google.com IronPort-PHdr: =?us-ascii?q?9a23=3AOnh6CxAgTNeIK0rY402sUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPT5o8bcNUDSrc9gkEXOFd2Cra4d0ayP6fGrATBIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSizexfK1+IA+roQnPssQajpduJ6kswRbVv3VEfP?= =?us-ascii?q?hby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnD?= =?us-ascii?q?UBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulS?= =?us-ascii?q?wKLCAy/n3JhcNsjaJbuBOhqAJ5w47Ie4GeKf5ycrrAcd8GWWZNW8BcXDFDDIyh?= =?us-ascii?q?dYsCF+UOPehaoIf9qVUArgawCxewC+700DBEmmX70Lcm3+g9EwzL2hErEdIUsH?= =?us-ascii?q?TTqdX4LKIcXvq2zKbS0DrDcu5d1DD+6IfScRAuu+yDXa9qfcrR00YvGRnKjlOK?= =?us-ascii?q?pozjJTyYzesNs22B4OphUeKjkXIoqwZ0ojW2wMonl4fHhoUQyl/e9CV5xp44Jd?= =?us-ascii?q?iiR056Z96oCp5QtyWCO4tzQsIiR2Botz0gxr0DvZ62ejUBxpc/xxPHdfCLb4yF?= =?us-ascii?q?7gjgWeuROzt0mm9pdbClixu9/0WtzPD3WNOu31ZQtCVFl8HBtnAT2BzX7ciKUv?= =?us-ascii?q?598V2g2TaLzgzT9PpELV0tmarVJJMszKQ8lpUUsUTEES/2nFv5gLWKeUUj/+ik?= =?us-ascii?q?8+XnYrP4qZ+AL4J4lB3yP6A0lsG8Aek0KBYCU3WZ9Oim27Du81X1QLBQgf03lq?= =?us-ascii?q?nZvoraJcMepqOhAA9ayIUj5AyiADe7ytgYnWMILFxfdxKBlYfpPUvBLev3Dfe6?= =?us-ascii?q?mVuskTNry+raMb3mB5XBNmLDn6v5fbZh905czxI+wsxF6JJRDrENOfbzWk7qtN?= =?us-ascii?q?zEFRI5KAy1w+P/CNpnzI8eWGSPArWYMKzIq1OI6PgvcKGwY9o3vz3wL+kj0MVv?= =?us-ascii?q?l3gl0QsfeqKk2YoRLmu1BPN6C1iSaDzimIFSP30Nu18dRe/jhEDKBT1aZH++Qu?= =?us-ascii?q?Q87z8yDougBK/MQ4mshPqK2yLtTc4eXXxPFl3ZSSSgTI6DQfpZLXvKepYwwAxB?= =?us-ascii?q?bqCoTsoa7T/rsQb7z7R9Ke+No38XsJvi0J5+4OiBzEhvpwwxNNyU1iS2d08xnm?= =?us-ascii?q?4MQGVrjqV2oEg41EzalKYk2LpXEttc4/4PWQA/Z8aFk75KTuvqUweERe+nDU68?= =?us-ascii?q?S4z/Uz40R9M1hdQJZhQlFg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AiBQD/DlRdhivZVdFmHAEBAQQBAQcEA?= =?us-ascii?q?QGBZ4EWgSoBRIEEKoQegR2CXosPgg+KYYgohhyBZwkBAwEMGxQBAYQ/AoMNGwc?= =?us-ascii?q?BBDQTAQQBAQQBAQQBAwcBEwEBAQgLCwgphS4MgjopAYJnAQICASMdARsdAQMBC?= =?us-ascii?q?wYDAgs3AgIiAREBBQEcBhMbgwcBgWkBAw4PjwuQDzyLI4EVBQEXgnsFRoN1Chk?= =?us-ascii?q?nDV8DgT0CBxKBIoR0hnWCFoERgiZsPoQMg0OCWASMKBuBA4Z7gR2HQY1BbQcCg?= =?us-ascii?q?h+BboQWYI1PG4MdgQ6UEqICg3EPIYFGgXlNI1AxgjsJgjkag1iEIIY2PzCPTgE?= =?us-ascii?q?B?= X-IPAS-Result: =?us-ascii?q?A0AiBQD/DlRdhivZVdFmHAEBAQQBAQcEAQGBZ4EWgSoBRIE?= =?us-ascii?q?EKoQegR2CXosPgg+KYYgohhyBZwkBAwEMGxQBAYQ/AoMNGwcBBDQTAQQBAQQBA?= =?us-ascii?q?QQBAwcBEwEBAQgLCwgphS4MgjopAYJnAQICASMdARsdAQMBCwYDAgs3AgIiARE?= =?us-ascii?q?BBQEcBhMbgwcBgWkBAw4PjwuQDzyLI4EVBQEXgnsFRoN1ChknDV8DgT0CBxKBI?= =?us-ascii?q?oR0hnWCFoERgiZsPoQMg0OCWASMKBuBA4Z7gR2HQY1BbQcCgh+BboQWYI1PG4M?= =?us-ascii?q?dgQ6UEqICg3EPIYFGgXlNI1AxgjsJgjkag1iEIIY2PzCPTgEB?= X-IronPort-AV: E=Sophos;i="5.64,385,1559512800"; d="scan'208,217";a="395410115" X-MGA-submission: =?us-ascii?q?MDGrrf3o3PhGbtgdY4PNQK8gra0wdDZ5LfHWMT?= =?us-ascii?q?aoHfXpM8hazWBs5zdulKa1HBkMt553Jq5cK01E3mxBqIXtlk04IPaHgp?= =?us-ascii?q?vceRzpka9OLEYBF5pLuvgHPqeHj/J95kaQSch5sdMOPWY9oZMgS6zEyo?= =?us-ascii?q?ANqzdI5OdMPye2Q+svIv3Vxw=3D=3D?= Received: from mail-vs1-f43.google.com ([209.85.217.43]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 14 Aug 2019 15:42:39 +0200 Received: by mail-vs1-f43.google.com with SMTP id y16so74455461vsc.3 for ; Wed, 14 Aug 2019 06:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a8DnfLulLsrPktb7Aic6BsIghy3i8+vjwd14xZ1eVdw=; b=lL7s3aWfIN55GubqMfsK6IyuLAVaGU94w6AmuqxzuYyqDNykznTXzvm3QFWQmz2dKH nivhQqm7kH09Ti4oT54gT914GeF3FgI/mWAgTGnsMm2QSCEucmn3sUhhSHOwklxBzARx X8Dq5YbsQHG9cwCbygAni2sTMsxH6lvJEieSCTsUofdX1+0EW7+czoDqAPYeXnY8QYzs 82JVQYa9wPwlsuP6rHlnushz+hRatYb1CtOkWRngtEoFVMiKnW+dzB2UHEeVhogR3/Un 6urs3VyCXFXKzu3CQCbDO6ZcMOIcGh4w5CAIumTAGa1JP+5JXUKqCz2xFpsDONSUPv1N nQYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a8DnfLulLsrPktb7Aic6BsIghy3i8+vjwd14xZ1eVdw=; b=gBGu5ezQ4EfMWtXG+KzILOjA4s3136nz2DT2+meBjxCanKEcVUW3hJdhVvPy65IWL5 p+AWTGQ0WSGfS4Yy/pzHCcPfrr5tIDSdDE/muRFjoYJkaEoVbcBYp2/yFrvcoUUi8sxD thnlsy/iwJyaT35dSN2A1Tv0FULRp7RxeYN7NfK2S1fPmjnww3NnneDQBZ8uWN/zMg1p j0jzzpHheo9eWsyXCYLqRAMQkJrzt63F8kiwRh08Pq4Dp+sTDLBssSOOOWdkaBqmw1Hp Sr+2Njxg2hm/gnIZyaJ42ahHMd0a7q6wMhAwCzR1lTT8XGhUNsuXEpoq+NveDKWHSlNe Bmdw== X-Gm-Message-State: APjAAAXmvIwirsH8NYMi6vsDji2iqy2Z1qeH5PTQk2P7ofTb7VXxT1K/ z63e/St7klevwn5t/2ng02+68hmZ9xzliZ/jHLc= X-Google-Smtp-Source: APXvYqwQpfqKX4QAzb9AqegzxfW+CDAalGPItgwDL1GjwIX/I26C4mu2R+iQVKYk7LwE5/73OfjTlQyfouClOCaaTMY= X-Received: by 2002:a67:79d4:: with SMTP id u203mr30575212vsc.85.1565790158128; Wed, 14 Aug 2019 06:42:38 -0700 (PDT) MIME-Version: 1.0 References: <8D32A371-FD47-434F-928A-C07D002BB712@uca.fr> In-Reply-To: <8D32A371-FD47-434F-928A-C07D002BB712@uca.fr> From: Kakadu Date: Wed, 14 Aug 2019 16:42:26 +0300 Message-ID: To: =?UTF-8?Q?Jocelyn_S=C3=A9rot?= Cc: Caml Mailinglist Content-Type: multipart/alternative; boundary="0000000000002b0a28059013ee96" Subject: Re: [Caml-list] A (silly ?) question about opam and ocamlfind Reply-To: Kakadu X-Loop: caml-list@inria.fr X-Sequence: 17765 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000002b0a28059013ee96 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, There is old school package manager for OCaml called `ocamlfind` which gives in your case an error about missing package 'dummy'. To make your package discoverable by ocamlfind you need to install your cmxa's with right META file. It is usually done using command 'ocamlfind install dummy META dummy.cmxa' and discoverable later using `ocamlfind query dummy`. Something like this in opam file should help: build: [ [make] ] install: ["ocamlfind" "install" "dummy" "META" file1file2 ] You can also try new fancy way of installing by providing opam an explicit list of files that should be copied but I'm not very familiar with it. Documentation will probably help. Happy hacking, Dmitrii On Wed, Aug 14, 2019 at 4:20 PM Jocelyn S=C3=A9rot w= rote: > Dear Camlers, > > I=E2=80=99ve been fighting for one entire day with a problem without succ= ess and > the more i dig, the more confused i am :( > > Suppose i define a small opam package - let=E2=80=99s call it =C2=AB dumm= y =C2=BB : > > opam-version: "2.0" > name: "dummy" > version: "0.0" > synopsis: "A dummy OPAM package" > maintainer: "JS" > authors: "JS" > license: "MIT" > depends: [ "ocaml" "ocamlfind" ] > build: [ > [make] > ] > > where [make] simply builds the library files [mylib.cma] and [mylib.cmxa] > (by directly calling ocamlc/opt or using dune - this does not matter here= ). > > What is the correct way to make this package available to other programs = : > > [opam pin add .] > > or > > [opam install .] > > ? > > I=E2=80=99ve tried both solutions but systematically get : > > ocamlfind ocamlc -package dummy -linkpkg -o main main.ml > ocamlfind: Package `dummy' not found > > when trying to compile [main.ml], where this file contains, for example > : =C2=AB let _ =3D Mylib.dump () =C2=BB (and where [dump] is a function d= efined in > mylib.ml =C2=BB > > When simply pinning the package, [opam info dummy] gives : > > <><> dummy: information on all versions > <><><><><><><><><><><><><><><><><><> =F0=9F=90=AB > name dummy > all-versions 0.0 > > <><> Version-specific details > <><><><><><><><><><><><><><><><><><><><><><><> =F0=9F=90=AB > version 0.0 > pin file:///Users/jserot/Dev/ml/opam/simple/build/raw > url.src: "file:///Users/jserot/Dev/ml/opam/simple/build/raw" > authors: "JS" > maintainer: "JS" > license: "MIT" > depends: "ocaml" "ocamlfind" > synopsis A dummy OPAM package > > which tends does not show any installed version of the package (and hence > could explain why ocamlfind does not find it ?) > > After installing the package ([opam install .]), [opam info dummy] gives = : > > $ opam info dummy > > <><> dummy: information on all versions > <><><><><><><><><><><><><><><><><><> =F0=9F=90=AB > name dummy > all-installed-versions 0.0 [4.06.0] > all-versions 0.0 > > <><> Version-specific details > <><><><><><><><><><><><><><><><><><><><><><><> =F0=9F=90=AB > version 0.0 > pin file:///Users/jserot/Dev/ml/opam/simple/build/raw > url.src: "file:///Users/jserot/Dev/ml/opam/simple/build/raw" > authors: "JS" > maintainer: "JS" > license: "MIT" > depends: "ocaml" "ocamlfind" > synopsis A dummy OPAM package > $ > > which now seems to indicates that the package is =C2=AB installed =C2=BB = (though i > do not fully understand the distinction between the former case..). > But i still get the message > > ocamlfind ocamlc -package dummy -linkpkg -o main main.ml > ocamlfind: Package `dummy' not found > > There must be sth i=E2=80=99m doing wrong (or have not understood in the = way opam > works).. > Any help appreciated. > > Jocelyn > > > > > > > --0000000000002b0a28059013ee96 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

There is old school p= ackage manager for OCaml called `ocamlfind` which gives in your case an err= or about missing package 'dummy'. To make your package discoverable= by ocamlfind you need to install your cmxa's with right META file. It = is usually done using command 'ocamlfind install dummy META dummy.cmxa&= #39; and discoverable later using `ocamlfind query dummy`. Something like t= his in opam file should help:

build: [
<= div>=C2=A0 [make]
]
install: ["ocamlfind" &qu= ot;install" "dummy" "META" file1file2 ]
<= div>

You can also try new fancy way of install= ing by providing opam an explicit list of files that should be copied but I= 'm not very familiar with it. Documentation will probably help.

Happy hacking,
Dmitrii
On Wed, A= ug 14, 2019 at 4:20 PM Jocelyn S=C3=A9rot <jocelyn.serot@uca.fr> wrote:
= Dear Camlers,

I=E2=80=99ve been fighting for one entire = day with a problem without success and the more i dig, the more confused i = am :(

Suppose i define a small opam package - let= =E2=80=99s call it =C2=AB dummy=C2=A0=C2=BB :

opam-version: "2.0"
name: "dummy"
= version: "0.0"
synopsis: "A dummy OPAM package&quo= t;
maintainer: "JS"
authors: "JS"
license: "MIT"
depends: [ "ocaml" &q= uot;ocamlfind" ]
build: [
=C2=A0 [make]
= ]

where [make] simply builds the library fil= es [mylib.cma] and [mylib.cmxa] (by directly calling ocamlc/opt or using du= ne - this does not matter here).

What is the corre= ct way to make this package available to other programs :

[opam pin add .]=C2=A0

or=C2=A0=

[opam install .]

?
=

I=E2=80=99ve tried both solutions but systematically ge= t :

ocamlfind ocamlc -package dummy -linkpkg -o main main.ml
ocamlfind: Package `dummy' not found=
when trying to compile [main.ml], where this file contains, for exam= ple :=C2=A0=C2=AB=C2=A0let _ =3D Mylib.dump ()=C2=A0=C2=BB (and where [dump= ] is a function defined in my= lib.ml=C2=A0=C2=BB=C2=A0

When simply pinning the package, [opam info dummy] giv= es :

<><> dummy: information on= all versions <><><><><><><&g= t;<><><><><><><><><>&= lt;><>=C2=A0 =F0=9F=90=AB=C2=A0
name =C2=A0 =C2=A0 =C2=A0 =C2=A0 dummy
all-versions<= span style=3D"color:rgb(0,0,0)"> 0.0

<>= <> Version-specific details &= lt;><><><><><><><><><= ><><><><><><><><><>= ;<><><><>=C2=A0 =F0=9F=90=AB=C2=A0
<= div style=3D"margin:0px;font-size:10px;font-family:Monaco">version =C2=A0 =C2=A0 0.0
authors:=C2=A0 =C2=A0 "JS"
maintainer: "JS"=
license:=C2=A0 =C2=A0 "MIT"
depends:=C2=A0 =C2=A0 "ocaml" &q= uot;ocamlfind"
synopsis=C2=A0 =C2=A0= A dummy OPAM package

which tends does not show an= y installed version of the package (and hence could explain why ocamlfind d= oes not find it ?)

After installing the package ([= opam install .]), [opam info dummy] gives :

$ opam info dummy

<><> dummy= : information on all versions <><><><><&g= t;<><><><><><><><><>&= lt;><><><>=C2=A0 =F0=9F=90=AB=C2=A0
name =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 dummy=
all-installed-versions = 0.0 [4.06.0]
all-versions =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.0

<><> Version-specific details <><><>= <><><><><><><><><><= ;><><><><><><><><><&g= t;<>=C2=A0 =F0=9F=90=AB=C2=A0
version =C2=A0 =C2=A0 0.0
pin =C2=A0 =C2=A0 =C2= =A0 =C2=A0 file:///Users/jserot/Dev/ml/opam/simple/build/raw
url.src:=C2=A0 =C2=A0 "file:///Users/jse= rot/Dev/ml/opam/simple/build/raw"
autho= rs:=C2=A0 =C2=A0 "JS"
maintainer: "JS"
licens= e:=C2=A0 =C2=A0 "MIT"
depends:<= /span>=C2=A0 =C2=A0 "ocaml" "ocamlfind"
synopsis=C2=A0 =C2=A0 A dummy OPAM package
$=C2=A0

which now seems to indicates that the package is =C2=AB=C2= =A0installed=C2=A0=C2=BB (though i do not fully understand the distinction = between the former case..).
But i still get the message=C2=A0

ocamlfind ocamlc -pa= ckage dummy -linkpkg -o main m= ain.ml
ocamlfind: Package `dummy' not found

There m= ust be sth i=E2=80=99m doing wrong (or have not understood in the way opam = works)..
Any help appreciated.

Jocelyn






--0000000000002b0a28059013ee96--