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 5FFB47F72A for ; Wed, 10 Aug 2016 12:53:47 +0200 (CEST) IronPort-PHdr: 9a23:1XDo9h2E/RhfaignsmDT+DRfVm0co7zxezQtwd8ZsegfK/ad9pjvdHbS+e9qxAeQG96KsrQc16GO4+igATVGusfZ9ihaMdRlbFwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oMyKJV0Uz2LtKfMqdVPt/F2X7pFXyaJZaY8JgiPTpXVJf+kEjUhJHnm02yjG28Gr4ZR4+D5Rsf9yv+RJUKH9YrhqBecAVGduGykP6cbqrRjOSxeUrjtZCz1O00kAPw+Qzxbk15zqhRH9suN71GHOL8DwFr85Qxyt6q5qTFnjjyJRZBAj92SCqcVzha5G6Eairh92z5OSYIibPfx3eKr1ctYTRG4HVcFUAX8SSrigZpcCWrJSdd1TqJPw8h5X9UOz 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-ua0-f169.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kakadu.hafanana@gmail.com) identity=pra; client-ip=209.85.217.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kakadu.hafanana@gmail.com designates 209.85.217.169 as permitted sender) identity=mailfrom; client-ip=209.85.217.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@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-ua0-f169.google.com) identity=helo; client-ip=209.85.217.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="postmaster@mail-ua0-f169.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CvAADCBqtXhqnZVdFdhRcHuxyGHQKBVQc7EQEBAQEBAQEBEQEBAQgLCwkZL4IyBAETAYIUAQUSEQQZARsdAQMMBgULDQICJgICIQEBEQEFARwGExQOh3QBAxejP4EyPjKLO4FqglsFhlUKGScNVINeAQEBAQYBAQEBGwIGEHGJdoJDgUk0gwGCWgWIJoZkiX40giuKK4I8gWuBSoZDhUuILYQHgjgTHoEPNIIvAxELgU85MocsAQEB X-IPAS-Result: A0CvAADCBqtXhqnZVdFdhRcHuxyGHQKBVQc7EQEBAQEBAQEBEQEBAQgLCwkZL4IyBAETAYIUAQUSEQQZARsdAQMMBgULDQICJgICIQEBEQEFARwGExQOh3QBAxejP4EyPjKLO4FqglsFhlUKGScNVINeAQEBAQYBAQEBGwIGEHGJdoJDgUk0gwGCWgWIJoZkiX40giuKK4I8gWuBSoZDhUuILYQHgjgTHoEPNIIvAxELgU85MocsAQEB X-IronPort-AV: E=Sophos;i="5.28,499,1464645600"; d="scan'208";a="229520929" Received: from mail-ua0-f169.google.com ([209.85.217.169]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 10 Aug 2016 12:53:45 +0200 Received: by mail-ua0-f169.google.com with SMTP id k90so63787140uak.1 for ; Wed, 10 Aug 2016 03:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Crl+SQzHe1gcQ3YwBJ33aFdMgft4cLB8qc3D4YnK6LU=; b=RQPltvgZj9bjRxM1xDGQEV9kwECmqmuNZJG+93ZPCjhwd4Z4WvYjZXYkpNH3gGaZPB yTfBSCWuv5f+p0t5nKbvAJPcGFK5WWaVUL6teZtU4vlRfTjyhC2qy34qHNGTukiqDGO2 NNZPBBPhQsgg9X9kKD4lqR3cf5F2v01fSAsE/H/6KcCX6sYJS/8lBI5p5VJGZHg8wEFD Vs1NFLbUtrXdMLHmIWYVHVvztmIz1pB2Vb5LKjYJiVI9SgoymS7WBvA81Iy+mNFfb9k9 GvgD0NqbqqafO2HLHEJOUHaS8u/J61CRjRcxrkQ6Q8plhciVw9f3py1t+2L5nLgJ/++D w5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Crl+SQzHe1gcQ3YwBJ33aFdMgft4cLB8qc3D4YnK6LU=; b=W4Fgtr+FsEO8HVtHGYgRObgBlS9+oya9m5QV/2GcT8vm5yO9pGN1y/8z/wJ5e0uWMr wXEXaLwTT07/MPBQvHWi8lm6+PRhvdZbjdVkhPfTMZOeBZhwn2WFx7PSd3HpkpZu1EmY 7UfnISE83tfmWM/aRxJuBDqx55t61MCGh8tNfDAwwU3Ou+H7WqeyH2OiGUinpWkJYAnU mOjDUUxm0l8KuKKUsnu39dCqp+py1HfiUjGEVnXLm6lLpYhaVU+qjM/DpnyxIs8S/b2Y /PKbgDJZjDI2W26Cla092KC1dHZGpXecL3BUsN/djmZs6wa1sCcpIhjWM4wiztNHQ5DW zwlQ== X-Gm-Message-State: AEkoousiJxJwJIFJc/PEILhkvE8pmowUZImGI6XOw/mYQ6yQ5tY/BGegmRHcmyyggdSgZ7rdojq6c0TXwFaqjw== X-Received: by 10.31.236.66 with SMTP id k63mr1598720vkh.48.1470826424844; Wed, 10 Aug 2016 03:53:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.52.6 with HTTP; Wed, 10 Aug 2016 03:53:24 -0700 (PDT) In-Reply-To: <591153db-3b69-cacc-35cc-83096ca2a145@gmail.com> References: <1113f97f-4ad4-3589-6ff5-4e20d8657e5f@gmail.com> <591153db-3b69-cacc-35cc-83096ca2a145@gmail.com> From: Kakadu Date: Wed, 10 Aug 2016 13:53:24 +0300 Message-ID: To: =?UTF-8?Q?Kov=C3=A1cs_Roland?= Cc: Caml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Beginner - Cannot set up Core and Batteries It seems that you have done `opam switch` and now some packages are not installed. (I.e. opam doesn't look for packages installled in /usr/lib anymore.) So, toplevel gives you an error about unknown topfind. It's likely that `opam install core batteries utop` will fix that. But it is a little bit strange that utop still prints the same. It is likely that you have a little bit dirty environment. You can try to reopen terminal and try again and see that result differs. Don't forget to do `eval $(opam config env)` at the beginnning! Kakadu On Wed, Aug 10, 2016 at 1:48 PM, Kov=C3=A1cs Roland wro= te: > Hi! > > Thans for the tip! > > I've tried and utop still prints exactly the same, and it still imports > camlp4, while ocaml prints another error now: > > $ ocaml > OCaml version 4.02.3 > > Cannot find file topfind. > Unknown directive `thread'. > > Roland > > > 2016-08-10 12:19 keltez=C3=A9ssel, Kakadu =C3=ADrta: >> >> Can you try the same without line about `camlp4` in your ~/.ocamlinit >> file? It is very likely that you will not need it at all because >> modern versions of libraries doesn't require it anymore. >> >> Also, I can recommend you to compile ocaml locally using `opam switch >> 4.02.3 && eval $(opam config env)` command. >> >> kakadu >> >> >> >> >> >> On Wed, Aug 10, 2016 at 8:52 AM, Kov=C3=A1cs Roland = wrote: >>> >>> Hello Everyone! >>> >>> I'm completely new to OCaml, but I've read that it's a good practice to >>> start by having both Batteries and the Core module installed. >>> I'm using Ubuntu 16.04, and installed ocaml, opam, utop from the offici= al >>> PPAs as it seemed that the one provided for Ubuntu (avsm/ppa) is not >>> working >>> for 16.04! >>> >>> After installation I did opam init, and all the setups it asked me to d= o. >>> In >>> my .ocamlinit file I have what I've found as a fix for the error 'unbou= nd >>> module'. >>> For one time utop found the modules, but since then it gives me an erro= r. >>> >>> >>> Cheers, >>> Roland >>> -------------------------------------------------------------------- >>> Judging by the output of opam, the packages should be installed correct= ly >>> : >>> >>> $ opam list >>> # Installed packages for system: >>> base-bigarray base Bigarray library distributed with the >>> OCaml >>> compi >>> base-bytes base Bytes library distributed with the OCaml >>> compiler >>> base-ocamlbuild base OCamlbuild binary and libraries >>> distributed >>> with >>> base-threads base Threads library distributed with the OCa= ml >>> compil >>> base-unix base Unix library distributed with the OCaml >>> compiler >>> batteries 2.5.2 a community-maintained standard library >>> extension >>> bin_prot 113.33.03 A binary protocol generator >>> cmdliner 0.9.8 Declarative definition of command line >>> interfaces >>> conf-m4 1 Virtual package relying on m4 >>> core 113.33.03 Industrial strength alternative to OCaml= 's >>> standa >>> core_kernel 113.33.03 Industrial strength alternative to OCaml= 's >>> standa >>> cppo 1.3.2 Equivalent of the C preprocessor for OCa= ml >>> progra >>> depext 1.0.1 Query and install external dependencies = of >>> OPAM p >>> fieldslib 113.33.03 Syntax extension to define first class >>> values >>> rep >>> js-build-tools 113.33.04 Collection of tools to help building Jane >>> Street >>> ocamlbuild 0 Build system distributed with the OCaml >>> compiler >>> ocamlfind 1.6.2 A library manager for OCaml >>> ppx_assert 113.33.03 Assert-like extension nodes that raise >>> useful >>> err >>> ppx_bench 113.33.03 Syntax extension for writing in-line >>> benchmarks i >>> ppx_bin_prot 113.33.03 Generation of bin_prot readers and write= rs >>> from t >>> ppx_compare 113.33.03 Generation of comparison functions from >>> types >>> ppx_core 113.33.03 Standard library for ppx rewriters >>> ppx_custom_printf 113.33.03 Printf-style format-strings for >>> user-defined >>> stri >>> ppx_deriving 4.0 Type-driven code generation for OCaml >>> >=3D4.02 >>> ppx_driver 113.33.03 Feature-full driver for OCaml AST >>> transformers >>> ppx_enumerate 113.33.03 Generate a list containing all values of= a >>> finite >>> ppx_expect 113.33.03 Cram like framework for OCaml >>> ppx_fail 113.33.03 Add location to calls to failwiths >>> ppx_fields_conv 113.33.03 Generation of accessor and iteration >>> functions fo >>> ppx_here 113.33.03 Expands [%here] into its location >>> ppx_inline_test 113.33.03 Syntax extension for writing in-line tes= ts >>> in >>> oca >>> ppx_jane 113.33.03 Standard Jane Street ppx rewriters >>> ppx_let 113.33.03 Monadic let-bindings >>> ppx_optcomp 113.33.03 Optional compilation for OCaml >>> ppx_pipebang 113.33.03 A ppx rewriter that inlines reverse >>> application o >>> ppx_sexp_conv 113.33.03 Generation of S-expression conversion >>> functions f >>> ppx_sexp_message 113.33.03 A ppx rewriter for easy construction of >>> s-express >>> ppx_sexp_value 113.33.03 A ppx rewriter that simplifies building >>> s-express >>> ppx_tools 5.0+4.02.0 Tools for authors of ppx rewriters and >>> other >>> synt >>> ppx_type_conv 113.33.03 Support Library for type-driven code >>> generators >>> ppx_typerep_conv 113.33.03 Generation of runtime types from type >>> declaration >>> ppx_variants_conv 113.33.03 Generation of accessor and iteration >>> functions fo >>> re 1.6.1 RE is a regular expression library for >>> OCaml >>> result 1.2 Compatibility Result module >>> sexplib 113.33.03 Library for serializing OCaml values to >>> and >>> from >>> typerep 113.33.03 typerep is a library for runtime types. >>> variantslib 113.33.03 Part of Jane Street's Core library >>> >>> >>> -------------------------------------------------------------------- >>> My .ocmalinit : >>> >>> #use "topfind";; >>> #thread;; >>> #camlp4o;; >>> #require "core.std";; >>> #require "core.syntax";; >>> #require "batteries";; >>> >>> let () =3D >>> try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") >>> with Not_found -> () >>> ;; >>> >>> -------------------------------------------------------------------- >>> What ocaml prints : >>> >>> $ ocaml >>> OCaml version 4.02.3 >>> Findlib has been successfully loaded. Additional directives: >>> #require "package";; to load a package >>> #list;; to list the available packages >>> #camlp4o;; to load camlp4 (standard syntax) >>> #camlp4r;; to load camlp4 (revised syntax) >>> #predicates "p,q,...";; to set these predicates >>> Topfind.reset();; to force that packages will be reloaded >>> #thread;; to enable threads >>> >>> /usr/lib/ocaml/threads: added to search path >>> /usr/lib/ocaml/unix.cma: loaded >>> /usr/lib/ocaml/threads/threads.cma: loaded >>> /usr/lib/ocaml/dynlink.cma: loaded >>> /usr/lib/ocaml/camlp4: added to search path >>> /usr/lib/ocaml/camlp4/camlp4o.cma: loaded >>> No such package: core.std >>> /home/zen3ger/.opam/system/lib/core: added to search path >>> /usr/lib/ocaml/nums.cma: loaded >>> /home/zen3ger/.opam/system/lib/num-top: added to search path >>> /home/zen3ger/.opam/system/lib/num-top/num_top.cma: loaded >>> Camlp4 Parsing version 4.02.3 >>> >>> /home/zen3ger/.opam/system/lib/num: added to search path >>> /usr/lib/ocaml/bigarray.cma: loaded >>> /usr/lib/ocaml/str.cma: loaded >>> /home/zen3ger/.opam/system/lib/bytes: added to search path >>> /home/zen3ger/.opam/system/lib/batteries: added to search path >>> /home/zen3ger/.opam/system/lib/batteries/batteries.cma: loaded >>> /home/zen3ger/.opam/system/lib/batteries/batteriesConfig.cmo: loaded >>> /home/zen3ger/.opam/system/lib/batteries/batteriesHelp.cmo: loaded >>> /home/zen3ger/.opam/system/lib/batteries/batteriesPrint.cmo: loaded >>> /home/zen3ger/.opam/system/lib/batteries/batteriesThread.cma: loaded >>> /home/zen3ger/.opam/system/lib/batteries/batteriesThread.cma: loaded >>> >>> >>> -------------------------------------------------------------------- >>> What utop prints : >>> >>> Findlib has been successfully loaded. Additional directives: >>> #require "package";; to load a package >>> #list;; to list the available packages >>> #camlp4o;; to load camlp4 (standard syntax) >>> #camlp4r;; to load camlp4 (revised syntax) >>> #predicates "p,q,...";; to set these predicates >>> Topfind.reset();; to force that packages will be reloaded >>> #thread;; to enable threads >>> >>> No such package: core.std >>> No such package: core.syntax >>> No such package: batteries >>> >